Failure running make check under wine for mingw cross-compile

Niels Möller nisse at
Tue Mar 12 10:13:12 CET 2013

bodrato at writes:

> The code that needs to be debugged is:
> #include <stdio.h>
> int main (int argc, char **argv)
> {
>   char b[10];
>   if (sscanf (" ", "%s", b) != EOF)
>     { printf ("FAIL\n"); return (-1); }
>   return (0);
> }

I tried this slightly different program:

  #include <stdio.h>
  int main (int argc, char **argv)
    char b[10];
    int ret = sscanf (" ", "%s", b);
    printf("ret = %d\n", ret);
    if (ret != EOF)
      { printf ("FAIL\n"); return 1; }
    return (0);


  $ gcc -O -Wall sscanf-test.c && ./a.out
  ret = -1
  $ i586-mingw32msvc-gcc -O -Wall sscanf-test.c && wine ./a.exe
  ret = 0

So it seems the libc used with mingw behaves differently than glibc. I
guess it would be good if someone could run this program on a real
w*ndows box as well, to see if wine just is bug-compatible with windows.

I copied my binary to if anybody dares
run it.

I have also seen failure of the t-printf testcase in this mingw32 cross
compiler + wine setup, but I can't reproduce that now.


Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.

More information about the gmp-bugs mailing list