Date: Thu, 11 Sep 1997 18:05:36 +0300 (IDT) From: Eli Zaretskii To: Robert Hoehne cc: Oberhumer Markus , djgpp-workers AT delorie DOT com Subject: Re: c1args.c patches In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Thu, 11 Sep 1997, Robert Hoehne wrote: > Oh No!! It is not the limited tarnsfer buffer but the way like > xargs is designed. It is probaly the only program currently > in use on DJGPP which examines the system limitation for the > maximal argument lenght. And this is for DJGPP 4096!! And what's wrong with this? I have dwelled on this issue for quite a while when I ported `xargs', but finally decided to leave it alone. The code in `xargs' uses up to 2KB (4096 - 2048) of arguments before it decides that the command line is too long and should be divided into few chunks. This is consistent with the DJGPP's minimum transfer buffer size of 2KB. `xargs' also has a switch to make the limit other than the default, so if you need it, you can use it. A better way would be to change `sysconf' so that it returns the actual size of the transfer buffer. It's a trivial change, so now seems like a good time to do that. > -#define _POSIX_ARG_MAX 4096 /* but only for exec's to other djgpp programs */ > +#define _POSIX_ARG_MAX 16384 /* but only for exec's to other djgpp programs */ I think this is wrong, because the transfer buffer may be stubedited to make it less than that. If anything, you should make the limit *smaller* (2K), not larger. Enlarging it is unsafe.