mingw has wint_t as unsigned int, but defined WINT_MAX as 0xffff to match WCHAR_MAX. Without this patch, stdint.m4 claims mingw's header is C99 compliant, then crashes the m4 testsuite (now that m4 uses the gnulib unit tests) when encountering the invalid WINT_MAX. With this patch, test-stdint.c passes once again on mingw. Is this patch okay to apply?
Other holdups in releasing m4 1.4.10: - mingw's atof/strtod does not parse infinity or nan, but gnulib's strtod module does not yet provide this capability either. I hope to work on this soon, if no one beats me to it. - gnulib's unistd module does not provide the types gid_t, uid_t, or useconds_t, all of which are undefined in mingw, but Bruno's recent testsuite additions means that test-unistd.c crashes on mingw in trying to use these types. 2007-05-29 Eric Blake <[EMAIL PROTECTED]> * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug. Index: m4/stdint.m4 =================================================================== RCS file: /sources/gnulib/gnulib/m4/stdint.m4,v retrieving revision 1.29 diff -u -p -r1.29 stdint.m4 --- m4/stdint.m4 28 Apr 2007 18:05:58 -0000 1.29 +++ m4/stdint.m4 29 May 2007 23:12:05 -0000 @@ -147,7 +147,7 @@ struct s { int check_SIG_ATOMIC: SIG_ATOMIC_MIN <= (sig_atomic_t) 0 && (sig_atomic_t) 0 < SIG_ATOMIC_MAX ? 1 : -1; int check_SIZE: (size_t) 0 < SIZE_MAX ? 1 : -1; int check_WCHAR: WCHAR_MIN <= (wchar_t) 0 && (wchar_t) 0 < WCHAR_MAX ? 1 : - 1; - int check_WINT: WINT_MIN <= (wint_t) 0 && (wint_t) 0 < WINT_MAX ? 1 : -1; + int check_WINT: WINT_MIN <= (wint_t) 0 && (wint_t) 0 < WINT_MAX && (wint_t) (WINT_MAX + 1) <= (wint_t) 0 ? 1 : -1; /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ int check_UINT8_C: