]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4 (_AC_INIT_PREPARE): Remove conf$$* on exit.
authorAkim Demaille <akim@epita.fr>
Sun, 25 Feb 2001 10:44:37 +0000 (10:44 +0000)
committerAkim Demaille <akim@epita.fr>
Sun, 25 Feb 2001 10:44:37 +0000 (10:44 +0000)
* m4sh.m4 (_AS_LN_S_PREPARE, _AS_BROKEN_TEST_PREPARE):
s/conftest/conf$$/ to avoid race conditions.
From Lars J. Aas.

ChangeLog
acgeneral.m4
lib/autoconf/general.m4
lib/m4sugar/m4sh.m4
m4sh.m4

index b26c90d5f3b2082979542d8e3c7d832213bdf307..463baf84a18c75c398628b137ef391630480c32f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-02-25  Akim Demaille  <akim@epita.fr>
+
+       * acgeneral.m4 (_AC_INIT_PREPARE): Remove conf$$* on exit.
+       * m4sh.m4 (_AS_LN_S_PREPARE, _AS_BROKEN_TEST_PREPARE):
+       s/conftest/conf$$/ to avoid race conditions.
+       From Lars J. Aas.
+
 2001-02-25  Akim Demaille  <akim@epita.fr>
 
        * acspecific.m4 (AC_PROG_INSTALL): Use ac_path_separator.
index 315309d664eb45f0ff8c60afcb0ebebe3c46fde6..09deb3900f0cfaa00f8c2637fab7040bb8604d29 100644 (file)
@@ -1442,7 +1442,7 @@ trap 'exit_status=$?
   test "$ac_signal" != 0 &&
     echo "$as_me: caught signal $ac_signal" >&AS_MESSAGE_LOG_FD
   echo "$as_me: exit $exit_status" >&AS_MESSAGE_LOG_FD
-  rm -rf conftest* confdefs* core core.* *.core $ac_clean_files &&
+  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
     exit $exit_status
      ' 0
 for ac_signal in 1 2 13 15; do
index 315309d664eb45f0ff8c60afcb0ebebe3c46fde6..09deb3900f0cfaa00f8c2637fab7040bb8604d29 100644 (file)
@@ -1442,7 +1442,7 @@ trap 'exit_status=$?
   test "$ac_signal" != 0 &&
     echo "$as_me: caught signal $ac_signal" >&AS_MESSAGE_LOG_FD
   echo "$as_me: exit $exit_status" >&AS_MESSAGE_LOG_FD
-  rm -rf conftest* confdefs* core core.* *.core $ac_clean_files &&
+  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
     exit $exit_status
      ' 0
 for ac_signal in 1 2 13 15; do
index 82f500f38fe2332ded7d0be9f5f1dff1a2546057..fcd87c9dbfb775274c0d0ee0fd2a57a0cb5fcd2a 100644 (file)
@@ -317,25 +317,27 @@ fi
 # _AS_LN_S_PREPARE
 # ----------------
 # Don't use conftest.sym to avoid filename issues on DJGPP, where this
-# would yield conftest.sym.exe for DJGPP < 2.04.
+# would yield conftest.sym.exe for DJGPP < 2.04.  And do use `conftest'
+# as base name to avoid prohibiting concurrency (e.g., concurrent
+# config.statuses).
 m4_defun([_AS_LN_S_PREPARE],
-[rm -f conftest conftest.exe conftest.file
-echo >conftest.file
-if ln -s conftest.file conftest 2>/dev/null; then
+[rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
   # We could just check for DJGPP; but this test a) works b) is more generic
   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conftest.exe; then
+  if test -f conf$$.exe; then
     # Don't use ln at all; we don't have any links
     as_ln_s='cp -p'
   else
     as_ln_s='ln -s'
   fi
-elif ln conftest.file conftest 2>/dev/null; then
+elif ln conf$$.file conf$$ 2>/dev/null; then
   as_ln_s=ln
 else
   as_ln_s='cp -p'
 fi
-rm -f conftest conftest.exe conftest.file
+rm -f conf$$ conf$$.exe conf$$.file
 ])# _AS_LN_S_PREPARE
 
 
@@ -384,19 +386,19 @@ done; }
 m4_defun([_AS_BROKEN_TEST_PREPARE],
 [# Find out how to test for executable files. Don't use a zero-byte file,
 # as systems may use methods other than mode bits to determine executability.
-cat >conftest.file <<_ASEOF
+cat >conf$$.file <<_ASEOF
 @%:@! /bin/sh
 exit 0
 _ASEOF
-chmod +x conftest.file
-if test -x conftest.file >/dev/null 2>&1; then
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
   as_executable_p="test -x"
-elif test -f conftest.file >/dev/null 2>&1; then
+elif test -f conf$$.file >/dev/null 2>&1; then
   as_executable_p="test -f"
 else
   AS_ERROR([cannot check whether a file is executable on this system])
 fi
-rm -f conftest.file
+rm -f conf$$.file
 ])# _AS_BROKEN_TEST_PREPARE
 
 
diff --git a/m4sh.m4 b/m4sh.m4
index 82f500f38fe2332ded7d0be9f5f1dff1a2546057..fcd87c9dbfb775274c0d0ee0fd2a57a0cb5fcd2a 100644 (file)
--- a/m4sh.m4
+++ b/m4sh.m4
@@ -317,25 +317,27 @@ fi
 # _AS_LN_S_PREPARE
 # ----------------
 # Don't use conftest.sym to avoid filename issues on DJGPP, where this
-# would yield conftest.sym.exe for DJGPP < 2.04.
+# would yield conftest.sym.exe for DJGPP < 2.04.  And do use `conftest'
+# as base name to avoid prohibiting concurrency (e.g., concurrent
+# config.statuses).
 m4_defun([_AS_LN_S_PREPARE],
-[rm -f conftest conftest.exe conftest.file
-echo >conftest.file
-if ln -s conftest.file conftest 2>/dev/null; then
+[rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
   # We could just check for DJGPP; but this test a) works b) is more generic
   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conftest.exe; then
+  if test -f conf$$.exe; then
     # Don't use ln at all; we don't have any links
     as_ln_s='cp -p'
   else
     as_ln_s='ln -s'
   fi
-elif ln conftest.file conftest 2>/dev/null; then
+elif ln conf$$.file conf$$ 2>/dev/null; then
   as_ln_s=ln
 else
   as_ln_s='cp -p'
 fi
-rm -f conftest conftest.exe conftest.file
+rm -f conf$$ conf$$.exe conf$$.file
 ])# _AS_LN_S_PREPARE
 
 
@@ -384,19 +386,19 @@ done; }
 m4_defun([_AS_BROKEN_TEST_PREPARE],
 [# Find out how to test for executable files. Don't use a zero-byte file,
 # as systems may use methods other than mode bits to determine executability.
-cat >conftest.file <<_ASEOF
+cat >conf$$.file <<_ASEOF
 @%:@! /bin/sh
 exit 0
 _ASEOF
-chmod +x conftest.file
-if test -x conftest.file >/dev/null 2>&1; then
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
   as_executable_p="test -x"
-elif test -f conftest.file >/dev/null 2>&1; then
+elif test -f conf$$.file >/dev/null 2>&1; then
   as_executable_p="test -f"
 else
   AS_ERROR([cannot check whether a file is executable on this system])
 fi
-rm -f conftest.file
+rm -f conf$$.file
 ])# _AS_BROKEN_TEST_PREPARE