Date: Tue, 16 Sep 1997 09:54:07 +0200 (METDST) From: Robert Hoehne To: Eli Zaretskii Cc: Oberhumer Markus , DJGPP workers Subject: Re: c1args.c patches In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 15 Sep 1997, Eli Zaretskii wrote: > You have overlooked that ARG_MAX is a macro that calls `sysconf'. Look > at the beginning of xargs.c I did, but either I cannot understand the code or you have overlooked it or we are speaking about different xargs (I use xargs from find41s.zip). The code at the beginning of xargs.c is the following (only the relevant part): --------------------------------------------------------------- #ifdef HAVE_LIMITS_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #include #if !defined(SIGCHLD) && defined(SIGCLD) #define SIGCHLD SIGCLD #endif /* COMPAT: SYSV version defaults size (and has a max value of) to 470. We try to make it as large as possible. */ #if !defined(ARG_MAX) && defined(_SC_ARG_MAX) #define ARG_MAX sysconf (_SC_ARG_MAX) #endif #ifndef ARG_MAX #define ARG_MAX NCARGS #endif ------------------------------------------------------- And of course this file includes config.h which includes sys/config.h where HAVE_LIMITS_H is defined to 1. In limits.h is ARG_MAX defined so the line with defining ARG_MAX to use sysconf is never reached. Of course I would agree also to use sysconf for determining the actual values, but I think this should be done then in limits.h. > I think patching `sysconf' is the way to go. When defining ARG_MAX to use sysconf in limits.h this would be the solution. Robert