Mail Archives: cygwin/2007/04/03/21:29:06
--------------060307090204020708020201
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Christopher Faylor on 4/3/2007 1:13 PM:
> On Tue, Apr 03, 2007 at 06:15:14PM +0000, Eric Blake wrote:
>> Cygwin defines wint_t as unsigned int (valid, per POSIX), but then defines
>>
>> #ifndef WINT_MIN
>> #define WINT_MIN (-2147483647 - 1)
>> #define WINT_MAX (2147483647)
>> #endif
>>
>> which is invalid given the underlying type of wint_t. Can we get this fixed
>> (either make wint_t a signed type, or change WINT_MIN and WINT_MAX)?
>
> Patch?
Well, I was hoping for some feedback as to whether changing wint_t to be
signed was preferable over changing WINT_MIN. But further research shows
Linux also uses an unsigned type for wint_t, so:
2007-04-03 Eric Blake <ebb9 AT byu DOT net>
* include/stdint.h (WINT_MIN, WINT_MAX): Fix definition.
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9 AT byu DOT 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
iD8DBQFGEv9/84KuGfSFAYARAo1OAJ9Ig6W0WqaMfGWN4njXieB8AJb0pwCgh3FE
x5B6wtRLeWqvadttHSbl6Hw=
=fB6i
-----END PGP SIGNATURE-----
--------------060307090204020708020201
Content-Type: text/plain;
name="cygwin.patch6"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="cygwin.patch6"
Index: include/stdint.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/include/stdint.h,v
retrieving revision 1.7
diff -u -p -r1.7 stdint.h
--- include/stdint.h 3 Jul 2006 12:30:04 -0000 1.7
+++ include/stdint.h 4 Apr 2007 01:27:08 -0000
@@ -1,6 +1,6 @@
/* stdint.h - integer types
- Copyright 2003, 2006 Red Hat, Inc.
+ Copyright 2003, 2006, 2007 Red Hat, Inc.
This file is part of Cygwin.
@@ -158,8 +158,8 @@ typedef unsigned long long uintmax_t;
#endif
#ifndef WINT_MIN
-#define WINT_MIN (-2147483647 - 1)
-#define WINT_MAX (2147483647)
+#define WINT_MIN 0
+#define WINT_MAX UINT_MAX
#endif
/* Macros for minimum-width integer constant expressions */
--------------060307090204020708020201
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
--------------060307090204020708020201--
- Raw text -