diff options
| author | Paul Eggert | 2011-06-06 12:53:44 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-06 12:53:44 -0700 |
| commit | 9afafefb1b8341816a20eac9491f3f9aaf2aea61 (patch) | |
| tree | 0cddbd8afe6099fb0a4bdf3f3628d5b7a70f68d7 /lib | |
| parent | 001903b5498d4898455e1a69bff166a9cc699ec0 (diff) | |
| download | emacs-9afafefb1b8341816a20eac9491f3f9aaf2aea61.tar.gz emacs-9afafefb1b8341816a20eac9491f3f9aaf2aea61.zip | |
Merge from gnulib.
* lib/careadlinkat.c, lib/careadlinkat.h, m4/gnulib-common.m4: Merge.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/careadlinkat.c | 2 | ||||
| -rw-r--r-- | lib/careadlinkat.h | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c index 6e4aa1395ff..751578b9a58 100644 --- a/lib/careadlinkat.c +++ b/lib/careadlinkat.c | |||
| @@ -39,7 +39,6 @@ | |||
| 39 | 39 | ||
| 40 | #include "allocator.h" | 40 | #include "allocator.h" |
| 41 | 41 | ||
| 42 | #if ! HAVE_READLINKAT | ||
| 43 | /* Get the symbolic link value of FILENAME and put it into BUFFER, with | 42 | /* Get the symbolic link value of FILENAME and put it into BUFFER, with |
| 44 | size BUFFER_SIZE. This function acts like readlink but has | 43 | size BUFFER_SIZE. This function acts like readlink but has |
| 45 | readlinkat's signature. */ | 44 | readlinkat's signature. */ |
| @@ -53,7 +52,6 @@ careadlinkatcwd (int fd, char const *filename, char *buffer, | |||
| 53 | abort (); | 52 | abort (); |
| 54 | return readlink (filename, buffer, buffer_size); | 53 | return readlink (filename, buffer, buffer_size); |
| 55 | } | 54 | } |
| 56 | #endif | ||
| 57 | 55 | ||
| 58 | /* Assuming the current directory is FD, get the symbolic link value | 56 | /* Assuming the current directory is FD, get the symbolic link value |
| 59 | of FILENAME as a null-terminated string and put it into a buffer. | 57 | of FILENAME as a null-terminated string and put it into a buffer. |
diff --git a/lib/careadlinkat.h b/lib/careadlinkat.h index 4f0184bbc33..6576fb2cecc 100644 --- a/lib/careadlinkat.h +++ b/lib/careadlinkat.h | |||
| @@ -56,8 +56,7 @@ char *careadlinkat (int fd, char const *filename, | |||
| 56 | when doing a plain readlink: | 56 | when doing a plain readlink: |
| 57 | Pass FD = AT_FDCWD and PREADLINKAT = careadlinkatcwd. */ | 57 | Pass FD = AT_FDCWD and PREADLINKAT = careadlinkatcwd. */ |
| 58 | #if HAVE_READLINKAT | 58 | #if HAVE_READLINKAT |
| 59 | /* AT_FDCWD is declared in <fcntl.h>, readlinkat in <unistd.h>. */ | 59 | /* AT_FDCWD is declared in <fcntl.h>. */ |
| 60 | # define careadlinkatcwd readlinkat | ||
| 61 | #else | 60 | #else |
| 62 | /* Define AT_FDCWD independently, so that the careadlinkat module does | 61 | /* Define AT_FDCWD independently, so that the careadlinkat module does |
| 63 | not depend on the fcntl-h module. The value does not matter, since | 62 | not depend on the fcntl-h module. The value does not matter, since |
| @@ -66,8 +65,8 @@ char *careadlinkat (int fd, char const *filename, | |||
| 66 | # ifndef AT_FDCWD | 65 | # ifndef AT_FDCWD |
| 67 | # define AT_FDCWD (-3041965) | 66 | # define AT_FDCWD (-3041965) |
| 68 | # endif | 67 | # endif |
| 68 | #endif | ||
| 69 | ssize_t careadlinkatcwd (int fd, char const *filename, | 69 | ssize_t careadlinkatcwd (int fd, char const *filename, |
| 70 | char *buffer, size_t buffer_size); | 70 | char *buffer, size_t buffer_size); |
| 71 | #endif | ||
| 72 | 71 | ||
| 73 | #endif /* _GL_CAREADLINKAT_H */ | 72 | #endif /* _GL_CAREADLINKAT_H */ |