This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: stdint.h bug


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Corinna Vinschen on 4/4/2007 1:38 AM:
> On Apr  3 19:29, Eric Blake wrote:
>> 	* include/stdint.h (WINT_MIN, WINT_MAX): Fix definition.
> 
> Thanks, applied.

A two-line patch, and I _still_ managed to botch it.  POSIX requires that
WINT_MIN be unsigned if (wint_t)0 promotes to an unsigned type.

Or in other words, (-1 < WINT_MIN) == ((wint_t) -1 < 0) must be true.

2007-04-05  Eric Blake  <ebb9@byu.net>

	* include/stdint.h (WINT_MIN): Fix sign.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----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

iD8DBQFGFaQV84KuGfSFAYARAmW8AJ9QGdXtWbUxllUGN9n0FgONCtOHWACcDxRT
gD5ZhCiGstr+Dx4lr8tsgi8=
=sA5w
-----END PGP SIGNATURE-----
Index: include/stdint.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/include/stdint.h,v
retrieving revision 1.8
diff -u -p -r1.8 stdint.h
--- include/stdint.h	4 Apr 2007 07:37:53 -0000	1.8
+++ include/stdint.h	6 Apr 2007 01:31:37 -0000
@@ -158,7 +158,7 @@ typedef unsigned long long uintmax_t;
 #endif
 
 #ifndef WINT_MIN
-#define WINT_MIN 0
+#define WINT_MIN 0U
 #define WINT_MAX UINT_MAX
 #endif
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]