Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
e5b28a7a
Commit
e5b28a7a
authored
Apr 09, 2011
by
Paul Eggert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge from gnulib.
parent
762f8d96
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
lib/allocator.h
lib/allocator.h
+2
-1
lib/careadlinkat.c
lib/careadlinkat.c
+4
-1
lib/careadlinkat.h
lib/careadlinkat.h
+8
-2
No files found.
lib/allocator.h
View file @
e5b28a7a
...
...
@@ -18,6 +18,7 @@
/* Written by Paul Eggert. */
#ifndef _GL_ALLOCATOR_H
#define _GL_ALLOCATOR_H
#include <stddef.h>
...
...
@@ -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 */
lib/careadlinkat.c
View file @
e5b28a7a
...
...
@@ -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()
<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. */
...
...
lib/careadlinkat.h
View file @
e5b28a7a
...
...
@@ -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. */
...
...
@@ -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 <fcntl.h>, readlinkat in <unistd.h>. */
# define careadlinkatcwd readlinkat
#else
/* Define AT_FDCWD independently, so that the careadlinkat module does
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment