[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_PROG_MKDIR_P documentation
From: |
Ralf Wildenhues |
Subject: |
Re: AC_PROG_MKDIR_P documentation |
Date: |
Thu, 1 Jun 2006 20:23:27 +0200 |
User-agent: |
Mutt/1.5.11+cvs20060403 |
> Stepan Kasal <address@hidden> writes:
>
> > The documentation says that FreeBSD 5.0 and NetBSD-current contain a
> > race-free implementations of mkdir -p.
> > Do they also understand -m and --?
[...]
> > And what about OpenBSD, does any of the readers here know?
I went ahead and checked these BSD systems:
http://www.freebsd.org/cgi/cvsweb.cgi/src/bin/mkdir/mkdir.c
http://cvsweb.netbsd.org/bsdweb.cgi/src/bin/mkdir/mkdir.c
http://www.openbsd.org/cgi-bin/cvsweb/src/bin/mkdir/mkdir.c
All of them support -m.
FreeBSD has a race-free mkdir -p since rev. 1.23 of mkdir.c, but I
wouldn't trust it before rev. 1.25, dated 2002, in FreeBSD 5.0.
NetBSD has a race-free mkdir -p since rev. 1.28 of mkdir.c, but I
wouldn't trust it before rev. 1.29, dated 2003, in NetBSD 2.0.2.
OpenBSD has a race-free mkdir -p since rev. 1.7 of mkdir.c, 1998,
OpenBSD 2.4, but looking at the source code, I found a small
bug in it (which is not so relevant to intended usage though):
http://cvs.openbsd.org/cgi-bin/query-pr-wrapper?full=yes&numbers=5141
> > If yes, is there any way to detect them, too?
>
> Not that I know of; I don't have such systems easily available.
Hmm, could take to AC_REQUIRE([AC_CANONICAL_HOST]) and match from
there (matching right from `uname -rs' output seems to ugly and
maintenance-intensive to me), but that may all be overkill. Not sure.
Cheers,
Ralf
- Re: AC_PROG_MKDIR_P documentation,
Ralf Wildenhues <=