This is the mail archive of the cygwin-patches@cygwin.com 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]

question on limits.h


My reading of POSIX says that LLONG_MIN and friends must always be defined, and 
not just when the version of C is new enough: 
http://www.opengroup.org/onlinepubs/009695399/basedefs/limits.h.html
At any rate, I was surprised when I noticed that coreutils was redefining 
ULLONG_MAX because it couldn't find it in limits.h.

2005-05-27  Eric Blake  <ebb9@byu.net>

	(LLONG_MIN, LLONG_MAX, ULLONG_MAX): Always define.

Index: cygwin/include/limits.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/include/limits.h,v
retrieving revision 1.15
diff -u -r1.15 limits.h
--- cygwin/include/limits.h     19 May 2005 19:45:28 -0000      1.15
+++ cygwin/include/limits.h     27 May 2005 14:15:47 -0000
@@ -107,7 +107,6 @@
 #define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1)
 #endif
 
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 /* Minimum and maximum values a `signed long long int' can hold.  */
 #undef LLONG_MIN
 #define LLONG_MIN (-LLONG_MAX-1)
@@ -117,7 +116,6 @@
 /* Maximum value an `unsigned long long int' can hold.  (Minimum is 0).  */
 #undef ULLONG_MAX
 #define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
-#endif
 
 /* Maximum number of iovcnt in a writev (an arbitrary number) */
 #undef IOV_MAX




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