* m4/unlinkat.m4: New file, extracted from m4/openat.m4.
* m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_UNLINKAT,
REPLACE_UNLINKAT, HAVE_UNLINKAT. Don't test for unlinkat.
* modules/unlinkat: New file, extracted from modules/openat. Correct
the dependency conditions.
* modules/openat (Files): Remove lib/unlinkat.c.
(Depends-on): Remove rmdir, unlink.
(configure.ac): Remove AC_LIBOBJ of unlinkat.
* modules/unlinkat-tests: New file, extracted from modules/openat-tests.
* modules/openat-tests (Files): Remove tests/test-unlinkat.c,
tests/test-rmdir.h, tests/test-unlink.h.
(Depends-on): Remove unlinkdir.
(Makefile.am): Remove rules for test-unlinkat.
* doc/posix-functions/unlinkat.texi: Mention module 'unlinkat' instead
of module 'openat'.
* NEWS: Mention the change.
* modules/linkat-tests (Depends-on): Add unlinkat.
* modules/mkfifoat-tests (Depends-on): Likewise.
* modules/readlinkat-tests (Depends-on): Likewise.
+2011-11-03 Bruno Haible <bruno@clisp.org>
+
+ New module 'unlinkat', split off from module 'openat'.
+ * m4/unlinkat.m4: New file, extracted from m4/openat.m4.
+ * m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_UNLINKAT,
+ REPLACE_UNLINKAT, HAVE_UNLINKAT. Don't test for unlinkat.
+ * modules/unlinkat: New file, extracted from modules/openat. Correct
+ the dependency conditions.
+ * modules/openat (Files): Remove lib/unlinkat.c.
+ (Depends-on): Remove rmdir, unlink.
+ (configure.ac): Remove AC_LIBOBJ of unlinkat.
+ * modules/unlinkat-tests: New file, extracted from modules/openat-tests.
+ * modules/openat-tests (Files): Remove tests/test-unlinkat.c,
+ tests/test-rmdir.h, tests/test-unlink.h.
+ (Depends-on): Remove unlinkdir.
+ (Makefile.am): Remove rules for test-unlinkat.
+ * doc/posix-functions/unlinkat.texi: Mention module 'unlinkat' instead
+ of module 'openat'.
+ * NEWS: Mention the change.
+ * modules/linkat-tests (Depends-on): Add unlinkat.
+ * modules/mkfifoat-tests (Depends-on): Likewise.
+ * modules/readlinkat-tests (Depends-on): Likewise.
+
2011-11-02 Bruno Haible <bruno@clisp.org>
New module 'fchmodat', split off from module 'openat'.
Date Modules Changes
-2011-11-01 openat This module no longer provides the fchmodat()
+2011-11-03 openat This module no longer provides the unlinkat()
+ function. If you need this function, you now need
+ to request the 'unlinkat' module.
+
+2011-11-02 openat This module no longer provides the fchmodat()
function. If you need this function, you now need
to request the 'fchmodat' module.
POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/unlinkat.html}
-Gnulib module: openat
+Gnulib module: unlinkat
Portability problems fixed by Gnulib:
@itemize
-# serial 39
+# serial 40
# See if we need to use our replacement for Solaris' openat et al functions.
dnl Copyright (C) 2004-2011 Free Software Foundation, Inc.
GNULIB_FSTATAT=1
GNULIB_MKDIRAT=1
- AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- GNULIB_UNLINKAT=1
-
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- AC_CHECK_FUNCS_ONCE([mkdirat openat unlinkat])
+ AC_CHECK_FUNCS_ONCE([mkdirat openat])
AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
- AC_REQUIRE([gl_FUNC_UNLINK])
case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
yes+yes)
- # GNU/Hurd has unlinkat, but it has the same bug as unlink.
- if test $REPLACE_UNLINK = 1; then
- REPLACE_UNLINKAT=1
- fi ;;
+ ;;
yes+*)
# Solaris 9 has *at functions, but uniformly mishandles trailing
# slash in all of them.
REPLACE_OPENAT=1
- REPLACE_UNLINKAT=1
;;
*)
HAVE_OPENAT=0
- HAVE_UNLINKAT=0 # No known system with unlinkat but not openat
gl_PREREQ_OPENAT;;
esac
if test $ac_cv_func_mkdirat != yes; then
--- /dev/null
+# unlinkat.m4 serial 1
+dnl Copyright (C) 2004-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Written by Jim Meyering.
+
+AC_DEFUN([gl_FUNC_UNLINKAT],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_FUNCS_ONCE([unlinkat])
+ AC_REQUIRE([gl_FUNC_UNLINK])
+ AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
+ if test $ac_cv_func_unlinkat = no; then
+ HAVE_UNLINKAT=0
+ else
+ if test $gl_cv_func_lstat_dereferences_slashed_symlink != yes; then
+ # Solaris 9 has *at functions, but uniformly mishandles trailing
+ # slash in all of them.
+ REPLACE_UNLINKAT=1
+ else
+ # GNU/Hurd has unlinkat, but it has the same bug as unlink.
+ if test $REPLACE_UNLINK = 1; then
+ REPLACE_UNLINKAT=1
+ fi
+ fi
+ fi
+])
filenamecat-lgpl
getcwd-lgpl
same-inode
+unlinkat
configure.ac:
Depends-on:
ignore-value
symlink
+unlinkat
configure.ac:
lib/openat.h
lib/openat-priv.h
lib/openat-proc.c
-lib/unlinkat.c
m4/openat.m4
m4/mode_t.m4
mkdir [test $HAVE_MKDIRAT = 0]
open
openat-die
-rmdir [test $REPLACE_UNLINKAT = 1]
save-cwd
stdbool
sys_stat
unistd
-unlink [test $REPLACE_UNLINKAT = 1]
configure.ac:
gl_FUNC_OPENAT
if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
AC_LIBOBJ([openat])
fi
-if test $ac_cv_func_unlinkat = no || test $REPLACE_UNLINKAT = 1; then
- AC_LIBOBJ([unlinkat])
-fi
Makefile.am:
Files:
tests/test-lstat.h
tests/test-mkdir.h
-tests/test-rmdir.h
tests/test-stat.h
-tests/test-unlink.h
tests/test-fstatat.c
tests/test-mkdirat.c
tests/test-openat.c
-tests/test-unlinkat.c
tests/signature.h
tests/macros.h
ignore-value
progname
symlink
-unlinkdir
configure.ac:
Makefile.am:
TESTS += \
- test-fstatat test-mkdirat test-openat test-unlinkat
+ test-fstatat test-mkdirat test-openat
check_PROGRAMS += \
- test-fstatat test-mkdirat test-openat test-unlinkat
+ test-fstatat test-mkdirat test-openat
test_fstatat_LDADD = $(LDADD) @LIBINTL@
test_mkdirat_LDADD = $(LDADD) @LIBINTL@
test_openat_LDADD = $(LDADD) @LIBINTL@
-test_unlinkat_LDADD = $(LDADD) @LIBINTL@
Depends-on:
ignore-value
symlinkat
+unlinkat
configure.ac:
--- /dev/null
+Description:
+unlinkat() function: Remove a file at a directory.
+
+Files:
+lib/unlinkat.c
+lib/at-func.c
+lib/openat.h
+lib/openat-priv.h
+m4/unlinkat.m4
+
+Depends-on:
+dirent
+dosname
+errno
+extensions
+fchdir
+fcntl-h
+openat
+openat-die
+rmdir [test $HAVE_UNLINKAT = 0]
+save-cwd
+stdbool
+sys_stat
+unistd
+unlink [test $HAVE_UNLINKAT = 0]
+
+configure.ac:
+gl_FUNC_UNLINKAT
+if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then
+ AC_LIBOBJ([unlinkat])
+fi
+gl_UNISTD_MODULE_INDICATOR([unlinkat])
+
+Makefile.am:
+
+Include:
+<unistd.h>
+
+License:
+GPL
+
+Maintainer:
+Jim Meyering, Eric Blake
--- /dev/null
+Files:
+tests/test-unlinkat.c
+tests/test-rmdir.h
+tests/test-unlink.h
+tests/signature.h
+tests/macros.h
+
+Depends-on:
+ignore-value
+progname
+symlink
+unlinkdir
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-unlinkat
+check_PROGRAMS += test-unlinkat
+test_unlinkat_LDADD = $(LDADD) @LIBINTL@