libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(HEAD) speedup for max args check on *BSD


From: Todd Vierling
Subject: (HEAD) speedup for max args check on *BSD
Date: Fri, 16 Apr 2004 15:44:55 -0400 (EDT)

Oy, the "checking for maximum length of command line arguments" is slow,
especially on old iron.  So:

2004-04-16  Todd Vierling  <address@hidden>

        * l4/libtool.m4: Add a special case for modern *BSD to fetch the
        maximum arg length directly from the kernel.

=====

Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.62
diff -u -r1.62 libtool.m4
--- m4/libtool.m4       15 Apr 2004 17:05:26 -0000      1.62
+++ m4/libtool.m4       16 Apr 2004 19:43:03 -0000
@@ -1107,6 +1107,16 @@
     lt_cv_sys_max_cmd_len=8192;
     ;;

+  netbsd* | freebsd* | openbsd* )
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
+    fi
+
  *)
     # Make teststring a little bigger before we do anything with it.
     # a 1K string should be a reasonable start.

-- 
-- Todd Vierling <address@hidden> <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]