This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: ARG_MAX and glob.c [PATCH]
- From: "Shaun Jackman" <sjackman at gmail dot com>
- To: newlib at sources dot redhat dot com
- Date: Mon, 20 Mar 2006 16:08:11 -0700
- Subject: Re: ARG_MAX and glob.c [PATCH]
- References: <7f45d9390511280941l547095d6k@mail.gmail.com>
- Reply-to: "Shaun Jackman" <sjackman at gmail dot com>
Ping?
On 11/28/05, Shaun Jackman <sjackman@gmail.com> wrote:
> 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>
>