This is the mail archive of the libc-hacker@sourceware.org mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

[regex] Provide a default definition of SIZE_MAX


regex is currently using SIZE_MAX. However, first of all this is relying on stdint.h being included implicitly (via other headers) because that's where SIZE_MAX is defined. Second, regex cannot rely on C99 headers. This patch fixes this problem by providing a default definition of this macro.

Paolo
2005-12-06  Paolo Bonzini  <bonzini@gnu.org>

	* posix/regex_internal.h (SIZE_MAX): Provide a default definition.

--- regex_internal.h.old	2005-12-06 09:47:00.000000000 +0100
+++ regex_internal.h	2005-12-06 09:46:37.000000000 +0100
@@ -120,6 +120,10 @@
 # define __attribute(arg)
 #endif
 
+#ifndef SIZE_MAX
+#define SIZE_MAX ((size_t)-1)
+#endif
+
 extern const char __re_error_msgid[] attribute_hidden;
 extern const size_t __re_error_msgid_idx[] attribute_hidden;
 

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