summaryrefslogtreecommitdiff
path: root/lib/unlinkat.c
Commit message (Collapse)AuthorAgeFilesLines
* statat: now obsoletePaul Eggert2022-03-091-2/+3
| | | | | | | | | * lib/openat.h (statat, lstatat): Now deprecated. All uses removed, and replaced with fstatat. * modules/statat: Mark as obsolete, because it’s confusing: it’s not clear whether it should use AT_NO_AUTOMOUNT, which is implied by stat and by lstat, but not by fstatat. * tests/test-statat.c: Disable deprecated-declarations warnings.
* license: fix GPLv3 texts to use a comma instead of semicolon.Bernhard Voelker2022-01-051-1/+1
| | | | | | | | | See: https://www.gnu.org/licenses/gpl-3.0.html#howto Run: $ git grep -l 'Foundation; either version 3' \ | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/' * All files using GPLv3: Adjust via the above command.
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* stat failing with EOVERFLOW implies existencePaul Eggert2020-12-241-1/+2
| | | | | | | | | | | | | | | | | * lib/euidaccess.c (euidaccess): * lib/file-has-acl.c (file_has_acl): * lib/link.c (link, rpl_link): * lib/mkdir.c (rpl_mkdir): * lib/mkfifo.c (rpl_mkfifo): * lib/mknod.c (rpl_mknod): * lib/ptsname_r.c (__ptsname_r): * lib/symlink.c (rpl_symlink): * lib/symlinkat.c (rpl_symlinkat): * lib/unlink.c (rpl_unlink): * lib/unlinkat.c (rpl_unlinkat): * lib/utime.c (utime): If stat fails with EOVERFLOW the file exists, so treat it that way in file-existence tests that do not need struct stat values.
* Use module 'filename' instead of module 'dosname'.Bruno Haible2020-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/at-func.c: Include filename.h instead of dosname.h. * lib/unlinkat.c: Likewise. * modules/areadlinkat (Depends-on): Add filename. Remove dosname. * modules/areadlinkat-with-size (Depends-on): Likewise. * modules/faccessat (Depends-on): Likewise. * modules/fchmodat (Depends-on): Likewise. * modules/fchownat (Depends-on): Likewise. * modules/fstatat (Depends-on): Likewise. * modules/mkdirat (Depends-on): Likewise. * modules/mkfifoat (Depends-on): Likewise. * modules/readlinkat (Depends-on): Likewise. * modules/selinux-at (Depends-on): Likewise. * modules/symlinkat (Depends-on): Likewise. * modules/unlinkat (Depends-on): Likewise. * modules/utimensat (Depends-on): Likewise. * lib/at-func2.c: Include filename.h instead of dosname.h. * modules/linkat (Depends-on): Add filename. Remove dosname. * modules/renameatu (Depends-on): Likewise. * lib/canonicalize.c: Include filename.h instead of dosname.h. * lib/canonicalize-lgpl.c: Likewise. * modules/canonicalize (Depends-on): Add filename. * modules/canonicalize-lgpl (Depends-on): Likewise. * lib/dirname.h: Include filename.h instead of dosname.h. * modules/dirname-lgpl (Depends-on): Add filename. Remove dosname. * lib/fchdir.c: Include filename.h instead of dosname.h. * modules/fchdir (Depends-on): Add filename. Remove dosname. * lib/openat.c: Include filename.h instead of dosname.h. * modules/openat (Depends-on): Add filename. Remove dosname. * lib/rmdir.c: Include filename.h instead of dosname.h. * modules/rmdir (Depends-on): Add filename. Remove dosname. * lib/savewd.c: Include filename.h instead of dosname.h. * modules/savewd (Depends-on): Add filename. Remove dosname. * lib/unlink.c: Include filename.h instead of dosname.h. * modules/unlink (Depends-on): Add filename. Remove dosname. * modules/relocatable-prog-wrapper (Depends-on): Add filename. * lib/relocwrapper.c: Update comments. * modules/lstat (Depends-on): Remove dosname.
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: Replace many more http URLs by https URLs. Update stale URLs.Bruno Haible2017-09-141-1/+1
| | | | | * users.txt: Remove mention of 'newts'. * lib/localename.c: Update comment about LANG_SOTHO.
* 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'.
* unlinkat: handle ignoring of ".." on Darwin 14Pádraig Brady2015-05-281-4/+17
| | | | | | | | | | | * lib/unlinkat.c: unlinkat() has the same bug as unlink() on Mac OS X 10.10, where it ignores paths with a trailing "..", so handle in the same manner. * m4/unlinkat.m4: Comment on this Darwin issue. * doc/posix-functions/unlink.texi: Update the latest version where the issue was seen. * doc/posix-functions/unlinkat.texi: Mention this issue. Fixes a test failure in test-unlinkat.c.
* 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>
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* openat: Fix warnings and commens when building unlinkat.c on Hurd.Simon Josefsson2011-08-051-2/+5
| | | | | * lib/unlinkat.c: Mention Hurd in comments. Include stdlib.h to get prototype for free.
* dirname: move m4/dos.m4 functionality into lib/dosname.hPaul Eggert2011-02-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | m4/dos.m4 needs to go. It laboriously invokes the C compiler, and extracts symbols from it, puts them into config.h; but it's much easier to use the symbols directly. filename.h already does this, but it disagrees with dos.m4 in some respects. This patch introduces a different include file dosname.h that packages up dos.m4, and then later we can work on merging filename.h and dosname.h. Applications that need only the easy-to-configure symbols should consider including dosname.h rather than dirname.h. * NEWS: Mention incompatible changes. * m4/dos.m4: Remove. * lib/dosname.h, modules/dosname: New files. * lib/dirname.h (ISSLASH, FILE_SYSTEM_PREFIX_LEN): (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): Move to lib/dosname.h. * lib/at-func.c, lib/at-func2.c, lib/openat.c, lib/savewd.c: Include dosname.h, not dirname.h. * lib/rmdir.c, lib/stat.c, lib/unlink.c, lib/unlinkat.c: Include dosname.h, for definitions of symbols like ISSLASH that used to be in config.h. * m4/dirname.m4 (gl_DIRNAME_LGPL): Do not require gl_AC_DOS. * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise. * m4/stat.m4 (gl_FUNC_STAT): Likewise. * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise. * modules/dirname-lgpl (Files): Omit m4/dos.m4. * modules/rmdir (Files): Likewise. * modules/stat (Files): Likewise. * modules/unlink (Files): Likewise. * modules/dirname-lgpl (Depends-on): Add dosname. * modules/lstat (Depends-on): Likewise. * modules/openat (Depends-on): Likewise. * modules/rmdir (Depends-on): Likewise. * modules/savewd (Depends-on): Likewise. * modules/stat (Depends-on): Likewise. * modules/unlink (Depends-on): Likewise. * modules/openat (Depends-on): Remove dirname-lgpl. * modules/savewd (Depends-on): Likewise. * tests/test-dirname.c: Do not use removed symbols like FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR. Instead, use the remaining symbols, e.g., ISSLASH ('\\').
* 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
* Use spaces for indentation, not tabs.Bruno Haible2009-12-101-21/+21
|
* openat: move fstatat and unlinkat into correct filesEric Blake2009-09-191-1/+29
| | | | | | | | | | | | Code motion, should be no semantic changes. * m4/openat.m4 (gl_FUNC_OPENAT): Adjust which files will be compiled. * lib/openat.c (fstatat, unlinkat): Move... * lib/fstatat.c (fstatat): ...into correct files. * lib/unlinkat.c (unlinkat): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* openat: fix unlinkat bugs on Solaris 9Eric Blake2009-09-191-0/+77
unlinkat(fd,"file/",0) mistakenly succeeded. * lib/unlinkat.c (unlinkat): New file. * modules/openat (Depends-on): Add unlink. (Files): Distribute it. * m4/openat.m4 (gl_FUNC_OPENAT): Mark unlinkat for replacement if trailing slash behavior is broken. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness. * modules/unistd (Makefile.am): Substitute it. * lib/unistd.in.h (unlinkat): Declare replacement. * doc/posix-functions/unlinkat.texi (unlinkat): Document this. Signed-off-by: Eric Blake <ebb9@byu.net>