diff options
author | Ulrich Drepper <drepper@redhat.com> | 2006-04-01 19:12:44 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2006-04-01 19:12:44 +0000 |
commit | 6d893bd991df2d3d0b56be3a2cf926756c602915 (patch) | |
tree | 7eabacf394703d8af75cd371713610030dcc7382 /posix | |
parent | 9388dcbb84dd616b20823ac46c8630b8c2845a82 (diff) | |
download | glibc-6d893bd991df2d3d0b56be3a2cf926756c602915.tar.gz |
[BZ #2450]
* posix/unistd.h: Match return value of readlink to what POSIX
says these days.
* io/readlink.c: Likewise.
* io/readlinkat.c: Likewise.
* sysdeps/unix/sysv/linux/readlinkat.c: Likewise.
Diffstat (limited to 'posix')
-rw-r--r-- | posix/unistd.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/posix/unistd.h b/posix/unistd.h index c8e8a0594a..c7a52722ca 100644 --- a/posix/unistd.h +++ b/posix/unistd.h @@ -770,8 +770,9 @@ extern int symlink (__const char *__from, __const char *__to) /* Read the contents of the symbolic link PATH into no more than LEN bytes of BUF. The contents are not null-terminated. Returns the number of characters read, or -1 for errors. */ -extern int readlink (__const char *__restrict __path, char *__restrict __buf, - size_t __len) __THROW __nonnull ((1, 2)) __wur; +extern ssize_t readlink (__const char *__restrict __path, + char *__restrict __buf, size_t __len) + __THROW __nonnull ((1, 2)) __wur; #endif /* Use BSD. */ #ifdef __USE_ATFILE @@ -780,8 +781,8 @@ extern int symlinkat (__const char *__from, int __tofd, __const char *__to) __THROW __nonnull ((1, 3)) __wur; /* Like readlink but a relative PATH is interpreted relative to FD. */ -extern int readlinkat (int __fd, __const char *__restrict __path, - char *__restrict __buf, size_t __len) +extern ssize_t readlinkat (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len) __THROW __nonnull ((2, 3)) __wur; #endif |