[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: check for max cmd line length
From: |
Robert Boehne |
Subject: |
Re: check for max cmd line length |
Date: |
Mon, 09 Jul 2001 12:03:44 -0500 |
Marcus Brinkmann wrote:
>
> On Fri, Jun 29, 2001 at 01:07:45AM +0100, Gary V. Vaughan wrote:
> > Fair enough. If Marcus doesn't have a chance to get back to us before the
> > weekend,
>
> I'm here, just very busy. Next time I boot to the Hurd I'll make the test,
> which should be within the next hours.
>
> > then by all means commit a change to HEAD. One thing to watch out
> > for is not to accidentally match ``linux-gnu'' when matching against ``gnu''
> > (i.e. hurd) in a $host_os case.
>
> You need to match
>
> gnu*)
>
> as we have gnu0.2, etc.
>
Ok, at long last here is a patch to handle systems with no
command line argument limits, GNU Hurd specifically.
2001-07-09 Robert Boehne <address@hidden>
* libtool.m4 (AC_LIBTOOL_SYS_MAX_CMD_LEN): Set max_cmd_len
to -1 on hurd, it has no command line argument limits.
* ltmain.in Handle max_cmd_len=-1 for systems that don't have
command line argument limits.
--
Robert Boehne Software Engineer
Ricardo Software Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email: address@hidden
2001-07-09 Robert Boehne <address@hidden>
* libtool.m4 (AC_LIBTOOL_SYS_MAX_CMD_LEN): Set max_cmd_len
to -1 on hurd, it has no command line argument limits.
* ltmain.in Handle max_cmd_len=-1 for systems that don't have
command line argument limits.
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.186
diff -u -r1.186 libtool.m4
--- libtool.m4 2001/07/06 01:08:58 1.186
+++ libtool.m4 2001/07/09 16:58:44
@@ -552,6 +552,14 @@
lt_cv_sys_max_cmd_len=12288; # 12K is about right
;;
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1; # 12K is about right
+ break
+ ;;
+
*)
# If test is not a shell built-in, we'll probably end up computing a
# maximum length that is only half of the actual maximum length, but
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/ltmain.in,v
retrieving revision 1.264
diff -u -r1.264 ltmain.in
--- ltmain.in 2001/07/01 23:33:12 1.264
+++ ltmain.in 2001/07/09 16:58:44
@@ -3257,7 +3257,7 @@
fi
if len=`expr "X$cmds" : ".*"` &&
- test $len -le $max_cmd_len; then
+ test $len -le $max_cmd_len || test $max_cmd_len -le -1; then
:
else
# The command line is too long to link in one step, link piecewise.
@@ -4256,7 +4256,7 @@
eval cmds=\"$old_archive_cmds\"
if len=`expr "X$cmds" : ".*"` &&
- test $len -le $max_cmd_len; then
+ test $len -le $max_cmd_len || test $max_cmd_len -le -1; then
:
else
# the command line is too long to link in one step, link in parts
- Re: check for max cmd line length,
Robert Boehne <=