GMP-6.1.2 [mingw32]: t-scanf.exe fails
Keith Marshall
keithmarshall at users.sourceforge.net
Sat May 27 15:00:52 UTC 2017
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 27/05/17 14:44, Keith Marshall wrote:
> subsequently running:
>
> $ make check
>
> *without* TESTS_ENVIRONMENT=wine (see separate report), results in one
> failure (all other tests pass):
>
> make[5]: Entering directory `/home/keith/src/mingw/gcc-build/gmp-6.1.2-shared/tests/misc'
> PASS: t-printf.exe
> FAIL: t-scanf.exe
On further investigation, I see that gmp_sscanf() delegates the call
to the system sscanf() function; this may actually be a bug in wine's
implementation of that function, (in the antique wine-1.4.1 version
installed here). This trivial program:
$ cat foo.c
#include <stdio.h>
int main ()
{
char buf[128];
int foo = sscanf (" ", "%s", buf);
printf ("%d\n", foo);
return 0;
}
when compiled, and run natively on the Linux host, yields:
$ gcc foo.c -o foo
$ ./foo
- -1
but when cross-compiled and run under wine, it yields:
$ mingw32-gcc foo.c -o foo.exe
$ ./foo.exe
0
yet the same foo.exe, when copied to a WinXP VM and run there, (in MSYS
shell), yields:
$ uname -a
MINGW32_NT-5.1 ... 1.0.19(0.48/3/2) 2016-07-13 17:45 i686 Msys
$ ./foo.exe
- -1
- --
Regards,
Keith.
Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
iQIcBAEBAgAGBQJZKZSkAAoJEMCtNsY0flo/M8gP+wfvMmutwrKIskD0p/qjvhCT
sEy79INaQOb0IsXPCnJZ9OhAwAtlzQpKrQVVKGENqyvq0DjWbwH68SyyAJF2QeAU
xTXGFjwI8IHSH1Rgta0iv5RAdktCXRzjgaYkCxPuGqHMC9jL7+KN+oZGBqbZ7eYo
ZmZ/m5D8vyOzLlyHPgQjZiZptEWUiYGFt1LzUQn3MghZ1hxnuPrm8utJGHiIeIpf
XLYM9XgqubZ3rP4NZGLqppUJUIQAZSfSvS2ZryooemeTr5mWZwFFXc2AMf/v4mvU
nl7NzAauMNYENp6DY4jCjF1g+6Sb6X20lhwUY008CtY83a8eobR60Ye2UwBqzlIP
6WxSf46ft5WDVCFmf/59Blwr/a5K5ilRFnU91TFfqEbOUWpIF4zTRMGoC/lkYTxl
2sfUb2Jq05TAt3CNbwu0o02TlNaGCjqK26pOAFeTHydG40JkOyoNK+/w/ezDnl1C
ItoLu8wqfHlkkbXgi7ruOhIpSz6Ya4OznQxp05pjD2K3IDb3G+dqDB1PDStQ2aN9
APYGZfkJ5w35+pBTujMsxAGr8lHWGkn2G06Rzri0TWbUhVSIxVT5Hv1J+rW1J4LH
8G/HZHhxv0j/JprvNdzlQE5gKpj1bhBWvQcHZqOWVY+8BpEdNV3SU7r5l6wH6zuv
2/RE0UENM/Ug/4iO/FTT
=c/lT
-----END PGP SIGNATURE-----
More information about the gmp-bugs
mailing list