[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnulib] xsize.h needs SIZE_MAX defined on Windows
From: |
Derek Robert Price |
Subject: |
[Bug-gnulib] xsize.h needs SIZE_MAX defined on Windows |
Date: |
Sun, 07 Mar 2004 17:47:12 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 |
Hey all, here's a patch for lib/xsize.h: Basically, a default value for
SIZE_MAX needs to be provided under Windows. I did the same thing it
looks like Paul did in lib/quotearg.c and defined it to ((size_t) -1)
when no value has been found in the includes.
Index: lib/xsize.h
===================================================================
RCS file: /cvs/ccvs/lib/xsize.h,v
retrieving revision 1.1
diff -u -p -r1.1 xsize.h
--- lib/xsize.h 15 Feb 2004 22:55:53 -0000 1.1
+++ lib/xsize.h 7 Mar 2004 22:29:44 -0000
@@ -28,6 +28,11 @@
# include <stdint.h>
#endif
+/* Windows does not supply a definition for SIZE_MAX. */
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
/* The size of memory objects is often computed through expressions of
type size_t. Example:
void* p = malloc (header_size + n * element_size).
Thanks,
Derek
--
*8^)
Email: address@hidden
Get CVS support at <http://ximbiot.com>!