summaryrefslogtreecommitdiff
path: root/lib/faccessat.c
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* faccessat: revert recent EOVERFLOW changePaul Eggert2020-12-281-13/+1
| | | | | | | | | | | | | | | I misunderstood the glibc source code. Deduced from Adhemerval Zanella’s proposed glibc patch in: https://sourceware.org/pipermail/libc-alpha/2020-December/121131.html * doc/posix-functions/faccessat.texi: It is not a problem. * lib/canonicalize-lgpl.c, lib/canonicalize.c, lib/faccessat.c: (FACCESSAT_NEVER_OVERFLOWS): Remove. All uses removed. * lib/faccessat.c: Revert to simpler version now that LSTAT_FOLLOWS_SLASHED_SYMLINK must be false. * m4/faccessat.m4 (gl_FUNC_FACCESSAT_EOVERFLOW): Remove. All uses removed. * modules/canonicalize, modules/canonicalize-lgpl (Files): Remove m4/faccessat.m4.
* faccessat: work around F_OK EOVERFLOW bugPaul Eggert2020-12-241-1/+13
| | | | | | | | | | | | | | Also, tune when LSTAT_FOLLOWS_SLASHED_SYMLINK. * doc/posix-functions/faccessat.texi: Mention the problem. * lib/faccessat.c (FACCESSAT_NEVER_EOVERFLOWS) (LSTAT_FOLLOWS_SLASHED_SYMLINK): Default to 0. (rpl_faccessat): If !FACCESSAT_NEVER_EOVERFLOWS, check for F_OK and EOVERFLOW, which means we can return 0. If LSTAT_FOLLOWS_SLASHED_SYMLINK, don't worry about file names ending in slashes, as faccessat should already do the right thing for them. * m4/faccessat.m4 (gl_FUNC_FACCESSAT_EOVERFLOW): New macro. (gl_FUNC_FACCESSAT): Use it.
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* Include <stdlib.h> when needed.Bruno Haible2019-06-301-0/+3
| | | | | | | | | | | | | | * lib/areadlinkat.c: Include <stdlib.h>, needed for free() in at-func.c. * lib/faccessat.c: Likewise. * lib/fchmodat.c: Likewise. * lib/fchownat.c: Likewise. * lib/fstatat.c: Likewise. * lib/mkfifoat.c: Likewise. * lib/mknodat.c: Likewise. * lib/readlinkat.c: Likewise. * lib/symlinkat.c: Likewise. * lib/utimensat.c: Likewise. * lib/mkdirat.c: Likewise. Include also the specification header.
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* faccessat: port to macOS (Bug#29231)Paul Eggert2017-11-111-7/+53
| | | | | | | | | | | | | | | | | | | | | | | | macOS faccessat has the same bug that lstat does: if the file name ends in '/' it ignores the trailing slash. Problem reported for Emacs by Vincent Zhang. * doc/posix-functions/faccessat.texi (faccessat): Document this. * lib/faccessat.c (_GL_INCLUDING_UNISTD_H): Define and undef around the initial includes. Include errno.h, string.h, sys/stat.h. (orig_faccessat) [HAVE_FACCESSAT]: New function. Include "unistd.h" after defining it. (rpl_faccessat) [HAVE_FACCESSAT]: New implementation. * lib/unistd.in.h (faccessat) [REPLACE_FACCESSAT]: Handle in the usual way. * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Replace faccessat if lstat dereferences symlinks, since faccessat is likely to have the same problem. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Default REPLACE_ACCESSAT. * modules/faccessat (Depends-on): Add fstatat. Depend if REPLACE_FACCESSAT is 1, too. (configure.ac): Link if REPLACE_FACCESSAT is 1. * modules/faccessat-tests (Depends-on): Add symlink. * modules/unistd (unistd.h): Substitute REPLACE_FACCESSAT. * tests/test-faccessat.c (main): Test for the bug.
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* faccessat: port to Solaris 10Paul Eggert2012-10-141-0/+1
| | | | | | * lib/faccessat.c: Include <fcntl.h>, for AT_EACCESS. Needed on Solaris 10, which doesn't have AT_EACCESS, so we need the Gnulib fcntl.h, which defines it.
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-011-1/+1
| | | | | Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
* openat: simplify use of at-func.cEric Blake2009-09-191-5/+0
| | | | | | | | | | | | | | * lib/at-func.c (includes): Include prerequisites here, to simplify requirements on client files. * lib/openat-priv.h: Add double-inclusion guard. * lib/faccessat.c (includes): Simplify. * lib/fchmodat.c (includes): Likewise. * lib/fchownat.c (includes): Likewise. * lib/mkdirat.c (includes): Likewise. * lib/mkfifoat.c (includes): Likewise. * lib/symlinkat.c (includes): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* doc: fix comments in recent patchesEric Blake2009-09-061-3/+3
| | | | | | | | | | | * lib/faccessat.c: Mention correct function. * lib/fchmodat.c: Likewise. * lib/fchownat.c: Likewise. * lib/symlinkat.c: Likewise. * doc/posix-headers/fcntl.texi (fcntl.h): Cygwin 1.7 has AT_* constants. Signed-off-by: Eric Blake <ebb9@byu.net>
* faccessat: new moduleEric Blake2009-09-031-0/+49
* 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>