From e5b28a7aef4446e07fa6a74df1254caec5add54e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 9 Apr 2011 11:44:05 -0700 Subject: Merge from gnulib. --- lib/careadlinkat.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/careadlinkat.h') diff --git a/lib/careadlinkat.h b/lib/careadlinkat.h index c5e4bcfc15..4f0184bbc3 100644 --- a/lib/careadlinkat.h +++ b/lib/careadlinkat.h @@ -18,6 +18,7 @@ /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ #ifndef _GL_CAREADLINKAT_H +#define _GL_CAREADLINKAT_H #include #include @@ -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() + + but can assume that its first argument is the same as FD. If successful, return the buffer address; otherwise return NULL and set errno. */ @@ -49,8 +53,10 @@ char *careadlinkat (int fd, char const *filename, char *, size_t)); /* Suitable values for careadlinkat's FD and PREADLINKAT arguments, - when doing a plain readlink. */ + when doing a plain readlink: + Pass FD = AT_FDCWD and PREADLINKAT = careadlinkatcwd. */ #if HAVE_READLINKAT +/* AT_FDCWD is declared in , readlinkat in . */ # define careadlinkatcwd readlinkat #else /* Define AT_FDCWD independently, so that the careadlinkat module does -- cgit v1.2.3