diff options
| author | Paul Eggert | 2011-04-09 11:44:05 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-09 11:44:05 -0700 |
| commit | e5b28a7aef4446e07fa6a74df1254caec5add54e (patch) | |
| tree | df72bb12451e55f26a78bcf6271927c8ac9180d1 | |
| parent | 762f8d96719ba3e8a0e79d8bb99fe8e119fafb3a (diff) | |
| download | emacs-e5b28a7aef4446e07fa6a74df1254caec5add54e.tar.gz emacs-e5b28a7aef4446e07fa6a74df1254caec5add54e.zip | |
Merge from gnulib.
| -rw-r--r-- | lib/allocator.h | 3 | ||||
| -rw-r--r-- | lib/careadlinkat.c | 5 | ||||
| -rw-r--r-- | lib/careadlinkat.h | 10 |
3 files changed, 14 insertions, 4 deletions
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 @@ | |||
| 18 | /* Written by Paul Eggert. */ | 18 | /* Written by Paul Eggert. */ |
| 19 | 19 | ||
| 20 | #ifndef _GL_ALLOCATOR_H | 20 | #ifndef _GL_ALLOCATOR_H |
| 21 | #define _GL_ALLOCATOR_H | ||
| 21 | 22 | ||
| 22 | #include <stddef.h> | 23 | #include <stddef.h> |
| 23 | 24 | ||
| @@ -53,4 +54,4 @@ struct allocator | |||
| 53 | /* An allocator using the stdlib functions and a null DIE function. */ | 54 | /* An allocator using the stdlib functions and a null DIE function. */ |
| 54 | extern struct allocator const stdlib_allocator; | 55 | extern struct allocator const stdlib_allocator; |
| 55 | 56 | ||
| 56 | #endif | 57 | #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, | |||
| 65 | the returned value if it is nonnull and is not BUFFER. A null | 65 | the returned value if it is nonnull and is not BUFFER. A null |
| 66 | ALLOC stands for the standard allocator. | 66 | ALLOC stands for the standard allocator. |
| 67 | 67 | ||
| 68 | The PREADLINKAT function specifies how to read links. | 68 | The PREADLINKAT function specifies how to read links. It operates |
| 69 | like POSIX readlinkat() | ||
| 70 | <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html> | ||
| 71 | but can assume that its first argument is the same as FD. | ||
| 69 | 72 | ||
| 70 | If successful, return the buffer address; otherwise return NULL and | 73 | If successful, return the buffer address; otherwise return NULL and |
| 71 | set errno. */ | 74 | 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 @@ | |||
| 18 | /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ | 18 | /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ |
| 19 | 19 | ||
| 20 | #ifndef _GL_CAREADLINKAT_H | 20 | #ifndef _GL_CAREADLINKAT_H |
| 21 | #define _GL_CAREADLINKAT_H | ||
| 21 | 22 | ||
| 22 | #include <fcntl.h> | 23 | #include <fcntl.h> |
| 23 | #include <unistd.h> | 24 | #include <unistd.h> |
| @@ -37,7 +38,10 @@ struct allocator; | |||
| 37 | buffer managed by ALLOC. It is the caller's responsibility to free | 38 | buffer managed by ALLOC. It is the caller's responsibility to free |
| 38 | the returned value if it is nonnull and is not BUFFER. | 39 | the returned value if it is nonnull and is not BUFFER. |
| 39 | 40 | ||
| 40 | The PREADLINKAT function specifies how to read links. | 41 | The PREADLINKAT function specifies how to read links. It operates |
| 42 | like POSIX readlinkat() | ||
| 43 | <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html> | ||
| 44 | but can assume that its first argument is the same as FD. | ||
| 41 | 45 | ||
| 42 | If successful, return the buffer address; otherwise return NULL and | 46 | If successful, return the buffer address; otherwise return NULL and |
| 43 | set errno. */ | 47 | set errno. */ |
| @@ -49,8 +53,10 @@ char *careadlinkat (int fd, char const *filename, | |||
| 49 | char *, size_t)); | 53 | char *, size_t)); |
| 50 | 54 | ||
| 51 | /* Suitable values for careadlinkat's FD and PREADLINKAT arguments, | 55 | /* Suitable values for careadlinkat's FD and PREADLINKAT arguments, |
| 52 | when doing a plain readlink. */ | 56 | when doing a plain readlink: |
| 57 | Pass FD = AT_FDCWD and PREADLINKAT = careadlinkatcwd. */ | ||
| 53 | #if HAVE_READLINKAT | 58 | #if HAVE_READLINKAT |
| 59 | /* AT_FDCWD is declared in <fcntl.h>, readlinkat in <unistd.h>. */ | ||
| 54 | # define careadlinkatcwd readlinkat | 60 | # define careadlinkatcwd readlinkat |
| 55 | #else | 61 | #else |
| 56 | /* Define AT_FDCWD independently, so that the careadlinkat module does | 62 | /* Define AT_FDCWD independently, so that the careadlinkat module does |