autoconf-patches
[Top][All Lists]
Advanced

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

37-conf$$.patch


From: Akim Demaille
Subject: 37-conf$$.patch
Date: Sun, 25 Feb 2001 11:47:59 +0100

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * 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.

Index: acgeneral.m4
--- acgeneral.m4 Sat, 24 Feb 2001 19:32:45 +0100 akim (ace/27_acgeneral. 
1.169.8.131 644)
+++ acgeneral.m4 Sun, 25 Feb 2001 10:03:13 +0100 akim (ace/27_acgeneral. 
1.169.8.131 644)
@@ -1442,7 +1442,7 @@ m4_define([_AC_INIT_PREPARE],
   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: m4sh.m4
--- m4sh.m4 Sat, 24 Feb 2001 20:19:04 +0100 akim (ace/b/41_m4sh.m4 1.24 644)
+++ m4sh.m4 Sun, 25 Feb 2001 10:02:26 +0100 akim (ace/b/41_m4sh.m4 1.24 644)
@@ -317,25 +317,27 @@ m4_define([AS_ERROR],
 # _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 @@ m4_define([AS_MKDIR_P],
 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



reply via email to

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