On 10/28/2010 10:55 AM, James Youngman wrote: > On Thu, Oct 28, 2010 at 7:33 AM, Markus Duft <md...@gentoo.org> wrote: >> through trial and error, i found out that with a 3K environment, 50K seems >> to work well, which seems rather odd then - as arguments would be 47K in the >> worst case then, right? >> >> i have no idea how we could be able to reliably find a "real" limit on >> interix, other than a configure check which tries to exec until it works... >> however, the check would need to grow the env to the maximum, too. >> >> as "start values" the check could use the same as the arg_max init stuff >> (sysconf(_SC_ARG_MAX) or ARG_MAX, whichever is bigger), and then decrease >> them until it works. >> >> thoughts? > > This means we would have to give up any hope of supporting > cross-compilation with Interix as the target, or for that case simply > configure a known-working limit. If we take the second option, we'll > have a limit that only applies in the cross-compilation case, which is > likely to produce an obscure bug further down the road. I would > rather not leave any rarely-exercised cases at all.
yeah, right - so either forbid cross compilation, or set hard limits based upon my explorations...? i vote for the hard limits. i know it's not good, but there is no chance interix get's a hotfix in this regard either, so... and the limit is the same for all windows and will prolly not change (at least in the next few years). redefining ARG_MAX in arg-max.h for interix to (64512 - 8192) does the trick. for _some_ reason, it does not work to set it to the full 64K or even only 60K... some system overhead must be hidden somewhere... (BTW. libtool has a hard coded limit for max command line argument length on interix too (which is wrong too: 196608 (lol)), because determination is seemingly impossible, and a fix very unlikely). markus > > James,