Mail Archives: djgpp-workers/2001/05/18/16:29:45
> From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
> Date: Fri, 18 May 2001 19:51:43 +0200
>
> testring="ABCDEF"
> while test `$CONFIG_SHELL $0 --fallback-echo "X$testring" >/dev/null 2>&1`
> == `echo "X$testring" >/dev/null 2>&1` &&
> new_result=`expr "X$testring" : ".*" 2>&1` &&
> lt_cv_sys_max_cmd_len=$new_result &&
> test $i != 32 # 1 MB should be enough
> do
> i=`expr $i + 1`
> testring=$testring$testring
> done
[snip]
> Also, isn't the transfer buffer supposed to be an upper limit to
> the number of arguments, or is that only when invoking DOS apps?
Yes, the transfer buffer (minus the size of the environment) is the
limit when invoking DJGPP programs (DOS programs have their usual
126-char limit). But IIRC there's one exception: when Bash invokes
Bash (or some other Unixy shell). I think if you step through the
code, you will see that Bash calls `system' (perhaps via `popen'), and
`system' invokes Unixy shells via a disk file, like this:
sh disk-file
where disk-file holds the entire command line. Clearly, when invoked
like this, the sky is the limit ;-)
In other words, to be effective, this test should invoke some other
DJGPP program, not a shell. (But perhaps someone should actually step
through the code as Bash runs it and make sure my feeble memory
doesn't fail me, before we draw any conclusions.)
- Raw text -