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
69d9a57d
Commit
69d9a57d
authored
Apr 10, 2011
by
Paul Eggert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge from gnulib.
parent
4073e537
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
lib/careadlinkat.c
lib/careadlinkat.c
+10
-6
No files found.
lib/careadlinkat.c
View file @
69d9a57d
...
...
@@ -22,10 +22,9 @@
#include "careadlinkat.h"
#include "allocator.h"
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
...
...
@@ -38,15 +37,20 @@
# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
#endif
#include "allocator.h"
#if ! HAVE_READLINKAT
/*
Ignore FD.
Get the symbolic link value of FILENAME and put it into
BUFFER, with
size BUFFER_SIZE. This function acts like readlink
but has
readlinkat's signature. */
/* Get the symbolic link value of FILENAME and put it into
BUFFER, with
size BUFFER_SIZE. This function acts like readlink
but has
readlinkat's signature. */
ssize_t
careadlinkatcwd
(
int
fd
,
char
const
*
filename
,
char
*
buffer
,
size_t
buffer_size
)
{
(
void
)
fd
;
/* FD must be AT_FDCWD here, otherwise the caller is using this
function in contexts for which it was not meant for. */
if
(
fd
!=
AT_FDCWD
)
abort
();
return
readlink
(
filename
,
buffer
,
buffer_size
);
}
#endif
...
...
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