diff options
author | Eric Blake <ebb9@byu.net> | 2009-09-07 06:45:59 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-10-02 06:29:58 -0600 |
commit | 1b6986bdbf9454a758ed2c24f8f7d91e34e6bc75 (patch) | |
tree | 84c0f85f21bf20cb0af7f14d7823dabc16923bfe /modules | |
parent | 0d54f471901494f8fc5b638fbcc0768a42caddc7 (diff) | |
download | gnulib-1b6986bdbf9454a758ed2c24f8f7d91e34e6bc75.tar.gz |
renameat: new module
Passes on Linux and cygwin 1.7 native renameat, and on systems
lacking renameat, but fails on Solaris 9 and 10 for now.
* modules/renameat: New file.
* lib/renameat.c (renameat): Likewise.
* m4/renameat.m4 (gl_FUNC_RENAMEAT): Likewise.
* m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add witnesses.
* modules/stdio (Makefile.am): Substitute them.
* lib/stdio.in.h (renameat): Declare it.
* MODULES.html.sh (systems lacking POSIX:2008): Mention module.
* doc/posix-functions/renameat.texi (renameat): Likewise.
* modules/renameat-tests: New test.
* tests/test-renameat.c: Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/renameat | 33 | ||||
-rw-r--r-- | modules/renameat-tests | 14 | ||||
-rw-r--r-- | modules/stdio | 2 |
3 files changed, 49 insertions, 0 deletions
diff --git a/modules/renameat b/modules/renameat new file mode 100644 index 0000000000..efe4a0f7f9 --- /dev/null +++ b/modules/renameat @@ -0,0 +1,33 @@ +Description: +renameat(): rename a file, relative to two directories + +Files: +lib/at-func2.c +lib/renameat.c +m4/renameat.m4 + +Depends-on: +extensions +fcntl-h +filenamecat +openat +rename +same-inode +stdio +stpcpy + +configure.ac: +gl_FUNC_RENAMEAT +gl_STDIO_MODULE_INDICATOR([renameat]) + +Makefile.am: + +Include: +<fcntl.h> +<stdio.h> + +License: +GPL + +Maintainer: +Jim Meyering, Eric Blake diff --git a/modules/renameat-tests b/modules/renameat-tests new file mode 100644 index 0000000000..20122dad6c --- /dev/null +++ b/modules/renameat-tests @@ -0,0 +1,14 @@ +Files: +tests/test-rename.h +tests/test-renameat.c + +Depends-on: +progname +xgetcwd + +configure.ac: + +Makefile.am: +TESTS += test-renameat +check_PROGRAMS += test-renameat +test_renameat_LDADD = $(LDADD) @LIBINTL@ diff --git a/modules/stdio b/modules/stdio index 22b83f730d..8f75e19a6b 100644 --- a/modules/stdio +++ b/modules/stdio @@ -54,6 +54,7 @@ stdio.h: stdio.in.h -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \ -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \ -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \ + -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \ -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \ @@ -72,6 +73,7 @@ stdio.h: stdio.in.h -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ + -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ |