Hello again,

actually, I have a few questions about AC_PROG_MKDIR_P:

The documentation says that FreeBSD 5.0 and NetBSD-current contain a
race-free implementations of mkdir -p.
Do they also understand -m and --?
If yes, is there any way to detect them, too?

And what about OpenBSD, does any of the readers here know?

In any case, I'd like to propose the following two tiny doc changes.

Have a nice day,
        Stepan
2006-05-31  Stepan Kasal  <[EMAIL PROTECTED]>

        * doc/autoconf.texi (Particular Programs) <AC_PROG_MKDIR_P>:
        Document that ${MKDIR_P} understands --.
        * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Improve the
        comment.

Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.1029
diff -u -r1.1029 autoconf.texi
--- doc/autoconf.texi   27 May 2006 22:22:01 -0000      1.1029
+++ doc/autoconf.texi   31 May 2006 11:18:28 -0000
@@ -3548,6 +3548,8 @@
 @command{configure}.  Also, @code{AS_MKDIR_P} does not accept options,
 but @code{MKDIR_P} can use the @option{-m} option, e.g., a makefile might
 invoke @code{$(MKDIR_P) -m 0 dir} to create an inaccessible directory.
+Moreover, @code{MKDIR_P} understands @option{--} which should be used
+if any of the parameters might start with a dash.
 Finally, @code{AS_MKDIR_P} does not check for race condition
 vulnerability, whereas @code{AC_PROG_MKDIR_P} does.
 @end defmac
Index: lib/autoconf/programs.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/programs.m4,v
retrieving revision 1.59
diff -u -r1.59 programs.m4
--- lib/autoconf/programs.m4    30 May 2006 07:28:02 -0000      1.59
+++ lib/autoconf/programs.m4    31 May 2006 11:18:29 -0000
@@ -622,12 +622,11 @@
 # setting umask.
 #
 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# Some implementations (such as Solaris 8's) contain a race condition:
+# if a parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
 # concurrently, both version can detect that a/ is missing, but only
 # one can create it and the other will error out.  Consequently we
-# restrict ourselves to GNU mkdir (using the --version option ensures
-# this).
+# restrict ourselves to known race-free implementations.
 #
 # Automake used to define mkdir_p as `mkdir -p .', in order to
 # allow $(mkdir_p) to be used without argument.  As in

Reply via email to