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.
2013-02-08 Paul Eggert <eggert@cs.ucla.edu>
+ 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.
+
extensions: port better to HP-UX
This is merged from git Autoconf.
* m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
Date Modules Changes
+2013-02-08 careadlinkat This module no longer provides the careadlinkatcwd
+ function.
+
2012-06-26 getopt-posix This module no longer guarantees that option
processing is resettable. If your code uses
'optreset' or 'optind = 0;', rewrite it to make
#include "careadlinkat.h"
+#include <stdlib.h>
+#include <unistd.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. */
+static 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 it was not meant for. */
+ if (fd != AT_FDCWD)
+ abort ();
+ return readlink (filename, buffer, buffer_size);
+}
+
/* Call readlink to get the symbolic link value of FILENAME.
Return a pointer to that NUL-terminated string in malloc'd storage.
If readlink fails, return NULL and set errno.
#include <errno.h>
#include <limits.h>
-#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#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
ssize_t (*preadlinkat) (int, char const *,
char *, size_t));
-/* Suitable values for careadlinkat's FD and PREADLINKAT arguments,
- when doing a plain readlink:
- Pass FD = AT_FDCWD and PREADLINKAT = careadlinkatcwd. */
+/* Suitable value for careadlinkat's FD argument. */
#if HAVE_READLINKAT
/* AT_FDCWD is declared in <fcntl.h>. */
#else
/* Define AT_FDCWD independently, so that the careadlinkat module does
- not depend on the fcntl-h module. The value does not matter, since
- careadlinkatcwd ignores it, but we might as well use the same value
+ not depend on the fcntl-h module. We might as well use the same value
as fcntl-h. */
# ifndef AT_FDCWD
# define AT_FDCWD (-3041965)
# endif
#endif
-ssize_t careadlinkatcwd (int fd, char const *filename,
- char *buffer, size_t buffer_size);
#endif /* _GL_CAREADLINKAT_H */
-> areadlink
-> careadlinkat
-> allocator
- -> readlink
+ -> readlink
-> canonicalize-lgpl
-> malloca
-> readlink
Depends-on:
careadlinkat
+readlink
configure.ac:
LGPLv2+
Maintainer:
-Bruno Haible, Jim Meyering
+Paul Eggert, Bruno Haible, Jim Meyering
Depends-on:
allocator
-readlink
ssize_t
unistd