From: Paul Eggert Date: Sat, 9 Apr 2011 18:44:05 +0000 (-0700) Subject: Merge from gnulib. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~356^2~17 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e5b28a7aef4446e07fa6a74df1254caec5add54e;p=emacs.git Merge from gnulib. --- diff --git a/lib/allocator.h b/lib/allocator.h index a89ba32b09b..953117da83f 100644 --- a/lib/allocator.h +++ b/lib/allocator.h @@ -18,6 +18,7 @@ /* Written by Paul Eggert. */ #ifndef _GL_ALLOCATOR_H +#define _GL_ALLOCATOR_H #include @@ -53,4 +54,4 @@ struct allocator /* An allocator using the stdlib functions and a null DIE function. */ extern struct allocator const stdlib_allocator; -#endif +#endif /* _GL_ALLOCATOR_H */ diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c index 7a7806d121c..01883db9ce5 100644 --- a/lib/careadlinkat.c +++ b/lib/careadlinkat.c @@ -65,7 +65,10 @@ careadlinkatcwd (int fd, char const *filename, char *buffer, the returned value if it is nonnull and is not BUFFER. A null ALLOC stands for the standard allocator. - 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. */ diff --git a/lib/careadlinkat.h b/lib/careadlinkat.h index c5e4bcfc15f..4f0184bbc33 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