This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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]

ARG_MAX and glob.c [PATCH]


In attempting to compile glob.c, I found that it uses ARG_MAX, which
is defined in sys/syslimits.h, although it doesn't include this file.
SUSv3 specifies that ARG_MAX is defined in limits.h, but limits.h does
not include sys/syslimits.h. I suggest that limits.h should include
sys/syslimits.h, and glob.c should include limits.h. Please apply.

Cheers,
Shaun

diff -u -u -r1.1 limits.h
--- ./libc/include/limits.h	11 Sep 2002 18:36:39 -0000	1.1
+++ ./libc/include/limits.h	28 Nov 2005 17:38:23 -0000
@@ -2,6 +2,7 @@
 # define _LIBC_LIMITS_H_	1

 #include <newlib.h>
+#include <sys/syslimits.h>

 # ifdef _MB_LEN_MAX
 #  define MB_LEN_MAX	_MB_LEN_MAX
diff -u -u -r1.2 glob.c
--- ./libc/sys/linux/stdlib/glob.c	2 Dec 2004 19:30:56 -0000	1.2
+++ ./libc/sys/linux/stdlib/glob.c	28 Nov 2005 17:38:23 -0000
@@ -73,6 +73,7 @@
 #include <dirent.h>
 #include <errno.h>
 #include <glob.h>
+#include <limits.h>
 #include <pwd.h>
 #include <stdio.h>
 #include <stdlib.h>


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