-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Paul Eggert on 4/5/2007 10:07 AM: >> - int check_WINT: WINT_MIN <= 0 && 0 < WINT_MAX ? 1 : -1; >> + int check_WINT: WINT_MIN <= (wint_t) 0 && (wint_t) 0 < WINT_MAX ? 1 : -1; > > This fix looks suspicious to me, as I think it might cause the test to > improperly succeed where it used to fail, on hosts with bugs other > than Cygwin. > > What exactly is the Cygwin bug? Why does this change detect it?
On cygwin, wint_t is unsigned, but WINT_MIN was INT_MIN. Comparing WINT_MIN to a signed 0 succeeded (using signed comparison), but comparing it to (wint_t)0 correctly detected that WINT_MIN was not 0 (because it forced an unsigned compare). It shows two bugs - first, that WINT_MIN was not 0; and second, that WINT_MIN was a signed value even though wint_t is not. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGFVAN84KuGfSFAYARAsXQAJ48YulAQj3WGc4fwM4I+iHwq0m82ACgmECo NfcRYW105j8+CD+GQ2MraPQ= =nzXc -----END PGP SIGNATURE-----
