diff options
author | Eric Blake <ebb9@byu.net> | 2009-09-03 13:41:18 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-09-03 21:20:52 -0600 |
commit | 973333dc422903c68f8a34c9612ef583ed0cb6ff (patch) | |
tree | 02f428311a381899122c527ec05b31d5129e6c86 /m4/faccessat.m4 | |
parent | bc366ae145683ca7ec1695c69cd2b4ed8f5bc589 (diff) | |
download | gnulib-973333dc422903c68f8a34c9612ef583ed0cb6ff.tar.gz |
faccessat: new module
* modules/faccessat: New file.
* lib/faccessat.m4: Likewise.
* m4/faccessat.m4 (gl_FUNC_FACCESSAT): Likewise.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
* modules/unistd (Makefile.am): Use it.
* lib/unistd.in.h (faccessat): Declare it.
(F_OK, X_OK, W_OK, R_OK): Provide definitions.
* lib/fcntl.in.h (AT_SYMLINK_FOLLOW, AT_EACCESS): Likewise.
* MODULES.html.sh (File system functions): Mention it.
* doc/posix-functions/faccessat.texi (faccessat): Likewise.
* doc/posix-headers/fcntl.texi (fcntl.h): Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'm4/faccessat.m4')
-rw-r--r-- | m4/faccessat.m4 | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/m4/faccessat.m4 b/m4/faccessat.m4 new file mode 100644 index 0000000000..f21dc13eed --- /dev/null +++ b/m4/faccessat.m4 @@ -0,0 +1,21 @@ +# serial 1 +# See if we need to provide faccessat replacement. + +dnl Copyright (C) 2009 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 Eric Blake. + +AC_DEFUN([gl_FUNC_FACCESSAT], +[ + AC_REQUIRE([gl_FUNC_OPENAT]) + AC_REQUIRE([gl_FUNC_EUIDACCESS]) + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_FUNCS_ONCE([access]) + AC_CHECK_FUNCS_ONCE([faccessat]) + if test $ac_cv_func_faccessat = no; then + HAVE_FACCESSAT=0 + fi +]) |