doc: use ASCII in .texi files where UTF-8 isn't needed
[gnulib.git] / lib / careadlinkat.h
index c5e4bcf..704f815 100644 (file)
@@ -1,6 +1,6 @@
 /* Read symbolic links into a buffer without size limitation, relative to fd.
 
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   Copyright (C) 2011-2014 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -18,6 +18,7 @@
 /* Written by Paul Eggert, Bruno Haible, and Jim Meyering.  */
 
 #ifndef _GL_CAREADLINKAT_H
+#define _GL_CAREADLINKAT_H
 
 #include <fcntl.h>
 #include <unistd.h>
@@ -37,7 +38,10 @@ struct allocator;
    buffer managed by ALLOC.  It is the caller's responsibility to free
    the returned value if it is nonnull and is not BUFFER.
 
-   The PREADLINKAT function specifies how to read links.
+   The PREADLINKAT function specifies how to read links.  It operates
+   like POSIX readlinkat()
+   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>
+   but can assume that its first argument is the same as FD.
 
    If successful, return the buffer address; otherwise return NULL and
    set errno.  */
@@ -48,20 +52,16 @@ char *careadlinkat (int fd, char const *filename,
                     ssize_t (*preadlinkat) (int, char const *,
                                             char *, size_t));
 
-/* Suitable values for careadlinkat's FD and PREADLINKAT arguments,
-   when doing a plain readlink.  */
+/* Suitable value for careadlinkat's FD argument.  */
 #if HAVE_READLINKAT
-# define careadlinkatcwd 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
-ssize_t careadlinkatcwd (int fd, char const *filename,
-                         char *buffer, size_t buffer_size);
 #endif
 
 #endif /* _GL_CAREADLINKAT_H */