summaryrefslogtreecommitdiff
path: root/lib/linkat.c
Commit message (Collapse)AuthorAgeFilesLines
* 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'.
* linkat: wrap to handle symlinks on OS X 10.10Pádraig Brady2014-11-031-2/+16
| | | | | | | * m4/linkat.m4 (gl_FUNC_LINKAT): linkat() is available on Yosemite but not usable because it doesn't support creating hardlinks to symlinks. Therefore add a generic test for this capability and fallback to our emulation if linkat() fails with ENOTSUP.
* 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".
* linkat: Fix compilation on MSVC 9.Bruno Haible2011-09-251-1/+0
| | | | * lib/linkat.c: Don't include <stdint.h>.
* maint: adjust cpp indentation to reflect nesting depthJim Meyering2011-02-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | I.e., in a block of code that begins with an unnested "#if", put one space between the "#" in column 1 and following token. For example, -#include <sys/vfs.h> +# include <sys/vfs.h> Do this only in .c files that are part of a module I maintain. * lib/linkat.c: Filter through cppi. * lib/nanosleep.c: Likewise. * lib/openat.c: Likewise. * lib/openat-die.c: Likewise. * lib/dup3.c: Likewise. * lib/fchownat.c: Likewise. * lib/flock.c: Likewise. * lib/fsync.c: Likewise. * lib/fts.c: Likewise. * lib/getpass.c: Likewise. * lib/gettimeofday.c: Likewise. * lib/userspec.c: Likewise. * Makefile (sc_cpp_indent_check): New rule, to check this.
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* linkat: Make implementation robust against system behaviour variations.Bruno Haible2010-12-281-0/+30
| | | | | | | | | | * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Define LINK_FOLLOWS_SYMLINKS to -1 if it needs a runtime test in the Solaris way, and to -2 if it needs a generic runtime test. * lib/linkat.c (solaris_optimized_link_immediate, solaris_optimized_link_follow): New functions. * tests/test-linkat.c (EXPECT_LINK_HARDLINKS_SYMLINKS): New macro. (check_same_link): Use it.
* linkat: Work around AIX 7.1 bug.Bruno Haible2010-07-311-2/+26
|
* 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
* areadlinkat: new moduleEric Blake2009-10-071-77/+0
| | | | | | | | | | | | | | | * lib/at-func.c (FUNC_FAIL): New define. (AT_FUNC_NAME, VALIDATE_FLAG): Use it rather than raw -1. * modules/areadlinkat: New module. * lib/linkat.c (areadlinkat): Move... * lib/areadlinkat.c (areadlinkat): ...to new file. * lib/areadlink.h (areadlinkat): Declare it. * modules/linkat (Depends-on): Add areadlinkat. * MODULES.html.sh (File system functions): Mention it. * modules/areadlinkat-tests: New test. * tests/test-areadlinkat.c: New file. Signed-off-by: Eric Blake <ebb9@byu.net>
* linkat: avoid compilation failureJim Meyering2009-10-061-0/+1
| | | | * lib/linkat.c: Include <stdint.h> for use of SIZE_MAX.
* linkat: support Linux 2.6.17Eric Blake2009-10-051-8/+193
| | | | | | | | | | | | | * m4/linkat.m4 (gl_FUNC_LINKAT): Default to always replacing linkat on Linux, but allow cache variable override. * lib/linkat.c (rpl_linkat): Define override. * modules/linkat (Depends-on): Add symlinkat. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add new default. * modules/unistd (Makefile.am): Substitute it. * lib/unistd.in.h (linkat): Declare replacement. Reported by Pádraig Brady. Signed-off-by: Eric Blake <ebb9@byu.net>
* linkat: new moduleEric Blake2009-09-231-0/+181
* modules/linkat: New file. * lib/at-func2.c (at_func2): Likewise. * lib/linkat.c (linkat): Likewise. * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise. * lib/openat-priv.h (at_func2): Add declaration. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witnesses. * modules/unistd (Makefile.am): Substitute them. * lib/unistd.in.h (linkat): Declare it. * MODULES.html.sh (systems lacking POSIX:2008): Mention module. * doc/posix-functions/linkat.texi (linkat): Likewise. * doc/posix-functions/link.texi (link): Tweak wording. * tests/test-link.c (main): Move guts... * tests/test-link.h (test_link): ...into new file. * modules/linkat-tests: New test. * tests/test-linkat.c: Likewise. * modules/link-tests (Files): Ship new file. (Depends-on): Add stdbool. Signed-off-by: Eric Blake <ebb9@byu.net>