diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2013-02-08 15:12:36 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2013-02-08 15:30:10 -0800 |
commit | 1f23aedf49ed4c9888882cdc22bb8373d442af27 (patch) | |
tree | 48ec9467bd6ece1c788524a162746123779566e0 /lib/careadlinkat.c | |
parent | 80173a422eebacdb4f034240a5b33148b1a3d35e (diff) | |
download | gnulib-1f23aedf49ed4c9888882cdc22bb8373d442af27.tar.gz |
careadlinkat: stop exporting careadlinkatcwd
Only Emacs used it directly, and Emacs no longer needs it.
* NEWS: Document this simplification.
* lib/areadlink.c (careadlinkatcwd): Move here from careadlinkat.c,
and make it static. Include <stdlib.h>, for abort, and unistd.h,
for readlink.
* lib/careadlinkat.c (careadlinkatcwd): Move to areadlink.c.
Don't include stdlib.h; no longer needed.
* lib/careadlinkat.h (careadlinkatcwd): Remove decl.
* lib/relocwrapper.c: Adjust comment to match new dependencies.
* modules/areadlink (Depends-on): Add readlink.
(Maintainer): Add self.
* modules/careadlinkat (Depends-on): Remove readlink.
Diffstat (limited to 'lib/careadlinkat.c')
-rw-r--r-- | lib/careadlinkat.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c index 1a759be7ca..e2c19d1c1f 100644 --- a/lib/careadlinkat.c +++ b/lib/careadlinkat.c @@ -24,7 +24,6 @@ #include <errno.h> #include <limits.h> -#include <stdlib.h> #include <string.h> #include <unistd.h> @@ -39,20 +38,6 @@ #include "allocator.h" -/* Get the symbolic link value of FILENAME and put it into BUFFER, with - size BUFFER_SIZE. This function acts like readlink but has - readlinkat's signature. */ -ssize_t -careadlinkatcwd (int fd, char const *filename, char *buffer, - size_t buffer_size) -{ - /* FD must be AT_FDCWD here, otherwise the caller is using this - function in contexts for which it was not meant for. */ - if (fd != AT_FDCWD) - abort (); - return readlink (filename, buffer, buffer_size); -} - /* Assuming the current directory is FD, get the symbolic link value of FILENAME as a null-terminated string and put it into a buffer. If FD is AT_FDCWD, FILENAME is interpreted relative to the current |