2006-04-01 Ulrich Drepper <drepper@redhat.com>
+ [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.
+
[BZ #2498]
* nscd/connections.c (main_loop_poll): If the connection cannot be
accepted because of user-imposed limits close the descriptor.
-/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* 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. */
-int
+ssize_t
__readlink (path, buf, len)
const char *path;
char *buf;
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* Read the contents of the symbolic link PATH relative to FD into no
more than LEN bytes of BUF. The contents are not null-terminated.
Returns the number of characters read, or -1 for errors. */
-int
+ssize_t
readlinkat (fd, path, buf, len)
int fd;
const char *path;
/* 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
__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
/* Read the contents of the symbolic link PATH relative to FD into no
more than LEN bytes of BUF. */
-int
+ssize_t
readlinkat (fd, path, buf, len)
int fd;
const char *path;