diff options
author | Bruno Haible <bruno@clisp.org> | 2011-11-03 12:03:53 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-11-04 10:55:30 +0100 |
commit | 531e3287a33c005edeeba10b0ab0910c6686e049 (patch) | |
tree | 564111cc0d0d8f9566f8f180334f7ab26b7316f9 /modules | |
parent | 84c3f9cf54eaa688c5a1a26925886535079a91de (diff) | |
download | gnulib-531e3287a33c005edeeba10b0ab0910c6686e049.tar.gz |
New module 'fstatat', split off from module 'openat'.
* lib/openat.h (statat, lstatat): Enable only if GNULIB_FSTATAT is
defined.
* m4/fstatat.m4: New file. extracted from m4/openat.m4.
* m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_FSTATAT. Don't invoke
gl_FUNC_FSTATAT.
(gl_FUNC_FSTATAT): Moved to m4/fstatat.m4.
* modules/fstatat: New file, extracted from modules/openat.
* modules/openat (Files): Remove lib/fstatat.c.
(Depends-on): Remove lstat.
(configure.ac): Remove AC_LIBOBJ of fstatat.
* modules/fstatat-tests: New file, extracted from modules/openat-tests.
* modules/openat-tests (Files): Remove tests/test-fstatat.c,
tests/test-lstat.h, tests/test-stat.h.
(Depends-on): Remove getcwd-lgpl.
(Makefile.am): Remove rules for test-fstatat.
* doc/posix-functions/fstatat.texi: Mention module 'fstatat' instead
of module 'openat'.
* NEWS: Mention the change.
* modules/getcwd (Depends-on): Add fstatat.
* modules/linkat (Depends-on): Likewise.
* modules/mkfifoat-tests (Depends-on): Likewise.
* modules/utimensat (Depends-on): Add fstatat. Remove openat.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/fstatat | 45 | ||||
-rw-r--r-- | modules/fstatat-tests | 19 | ||||
-rw-r--r-- | modules/getcwd | 1 | ||||
-rw-r--r-- | modules/linkat | 1 | ||||
-rw-r--r-- | modules/mkfifoat-tests | 1 | ||||
-rw-r--r-- | modules/openat | 5 | ||||
-rw-r--r-- | modules/openat-tests | 9 | ||||
-rw-r--r-- | modules/utimensat | 2 |
8 files changed, 70 insertions, 13 deletions
diff --git a/modules/fstatat b/modules/fstatat new file mode 100644 index 0000000000..77e7a9b931 --- /dev/null +++ b/modules/fstatat @@ -0,0 +1,45 @@ +Description: +fstatat() function: Return information about a file at a directory. + +Files: +lib/fstatat.c +lib/at-func.c +lib/openat.h +lib/openat-priv.h +m4/fstatat.m4 + +Depends-on: +dirent +dosname +errno +extensions +fchdir +fcntl-h +fstat +lstat +openat +openat-die +save-cwd +stdbool +sys_stat +unistd + +configure.ac: +gl_FUNC_FSTATAT +if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then + AC_LIBOBJ([fstatat]) +fi +AC_REQUIRE([AC_C_INLINE]) dnl because 'inline' is used in lib/openat.h +gl_MODULE_INDICATOR([fstatat]) dnl for lib/openat.h +gl_SYS_STAT_MODULE_INDICATOR([fstatat]) + +Makefile.am: + +Include: +<sys/stat.h> + +License: +GPL + +Maintainer: +Jim Meyering, Eric Blake diff --git a/modules/fstatat-tests b/modules/fstatat-tests new file mode 100644 index 0000000000..f33ff11f0d --- /dev/null +++ b/modules/fstatat-tests @@ -0,0 +1,19 @@ +Files: +tests/test-fstatat.c +tests/test-lstat.h +tests/test-stat.h +tests/signature.h +tests/macros.h + +Depends-on: +getcwd-lgpl +ignore-value +progname +symlink + +configure.ac: + +Makefile.am: +TESTS += test-fstatat +check_PROGRAMS += test-fstatat +test_fstatat_LDADD = $(LDADD) @LIBINTL@ diff --git a/modules/getcwd b/modules/getcwd index aa3fe69a86..3bd2ba783e 100644 --- a/modules/getcwd +++ b/modules/getcwd @@ -17,6 +17,7 @@ d-ino [test $REPLACE_GETCWD = 1] memmove [test $REPLACE_GETCWD = 1] openat [test $REPLACE_GETCWD = 1] fstat [test $REPLACE_GETCWD = 1] +fstatat [test $REPLACE_GETCWD = 1] opendir [test $REPLACE_GETCWD = 1] closedir [test $REPLACE_GETCWD = 1] stdbool [test $REPLACE_GETCWD = 1] diff --git a/modules/linkat b/modules/linkat index 77f08d01b4..3902e35f9e 100644 --- a/modules/linkat +++ b/modules/linkat @@ -17,6 +17,7 @@ errno [test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1] fcntl-h [test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1] filenamecat-lgpl [test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1] fstat [test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1] +fstatat [test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1] getcwd-lgpl [test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1] openat [test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1] link [test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1] diff --git a/modules/mkfifoat-tests b/modules/mkfifoat-tests index b50bbf5767..4c0e23fff2 100644 --- a/modules/mkfifoat-tests +++ b/modules/mkfifoat-tests @@ -5,6 +5,7 @@ tests/signature.h tests/macros.h Depends-on: +fstatat ignore-value symlink unlinkat diff --git a/modules/openat b/modules/openat index 167fa92147..503c12135e 100644 --- a/modules/openat +++ b/modules/openat @@ -3,7 +3,6 @@ Open a file at a directory. Files: lib/at-func.c -lib/fstatat.c lib/mkdirat.c lib/openat.c lib/openat.h @@ -23,7 +22,6 @@ fstat gettext-h intprops largefile -lstat mkdir [test $HAVE_MKDIRAT = 0] open openat-die @@ -35,9 +33,6 @@ unistd configure.ac: gl_FUNC_OPENAT AC_LIBOBJ([openat-proc]) -if test $ac_cv_func_fstatat = no || test $REPLACE_FSTATAT = 1; then - AC_LIBOBJ([fstatat]) -fi if test $HAVE_MKDIRAT = 0; then AC_LIBOBJ([mkdirat]) fi diff --git a/modules/openat-tests b/modules/openat-tests index bdefca3f83..cb38d2e114 100644 --- a/modules/openat-tests +++ b/modules/openat-tests @@ -1,15 +1,11 @@ Files: -tests/test-lstat.h tests/test-mkdir.h -tests/test-stat.h -tests/test-fstatat.c tests/test-mkdirat.c tests/test-openat.c tests/signature.h tests/macros.h Depends-on: -getcwd-lgpl ignore-value progname symlink @@ -18,9 +14,8 @@ configure.ac: Makefile.am: TESTS += \ - test-fstatat test-mkdirat test-openat + test-mkdirat test-openat check_PROGRAMS += \ - test-fstatat test-mkdirat test-openat -test_fstatat_LDADD = $(LDADD) @LIBINTL@ + test-mkdirat test-openat test_mkdirat_LDADD = $(LDADD) @LIBINTL@ test_openat_LDADD = $(LDADD) @LIBINTL@ diff --git a/modules/utimensat b/modules/utimensat index a70ca8cbb2..9f3ec7efcf 100644 --- a/modules/utimensat +++ b/modules/utimensat @@ -8,7 +8,7 @@ m4/utimensat.m4 Depends-on: sys_stat extensions -openat [test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1] +fstatat [test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1] utimens [test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1] configure.ac: |