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]

Re: ARG_MAX and glob.c [PATCH]


On 3/31/06, Jeff Johnston <jjohnstn@redhat.com> wrote:
Sorry the delay Shaun.

I do not see why this change is necessary for you.

First of all, libc/sys/linux/stdlib/glob.c includes "collate.h" which
includes <limits.h>.

Now, when I run on my FC4 system, the <limits.h> we use when running
i686-pc-linux-gnu linux is libc/sys/linux/include/limits.h which does a
number of things and eventually gets to:

#ifdef  __USE_POSIX
/* POSIX adds things to <limits.h>.  */
# include <bits/posix1_lim.h>
#endif

This in turn includes a number of header files which eventually includes
<linux/limits.h> which defines ARG_MAX.

Why don't you see this chain?  You should be seeing the same thing for
your i386-linux-newlib configuration.

-- Jeff J.

Hello Jeff,


No worries about the delay in replying. I think my delay in replying
rivals your own!

This glob work was for arm-elf (gloss-linux) rather than
i386-linux-newlib. It used a stub version of collate.h, which can be
seen below. It's not good style for glob.c to depend on collate.h to
include limits.h for it. glob.c should include limits.h itself if it
wishes to use ARG_MAX. I stand by my original patch, which I can
repost if you like.

Cheers,
Shaun

--- /dev/null   2006-06-25 13:04:47.285393520 -0600
+++ libc/include/collate.h      2006-06-01 15:50:04.000000000 -0600
@@ -0,0 +1,6 @@
+#ifndef _COLLATE_H_
+#define _COLLATE_H_
+
+#define __collate_load_error 1
+
+#endif


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