Nowadays, readlink() returns 'ssize_t', as required in POSIX.1-2001.

This commit is contained in:
Michael Kerrisk 2006-07-04 11:13:13 +00:00
parent 84e10c98de
commit 4595d739ff
1 changed files with 15 additions and 7 deletions

View File

@ -41,13 +41,7 @@ readlink \- read value of a symbolic link
.SH SYNOPSIS
.B #include <unistd.h>
.sp
.BI "int readlink(const char *" path ", char *" buf ", size_t " bufsiz );
.\" FIXME . In 2005-04-01, the return type was changed to the
.\" the POSIX compliant 'size_t'. When this is actually released
.\" we should udate the above prototype and add a NOTE about the
.\" variation across glibc versions.
.\" See http://sourceware.org/bugzilla/show_bug.cg1?id=2450
.\"
.BI "ssize_t readlink(const char *" path ", char *" buf ", size_t " bufsiz );
.SH DESCRIPTION
.BR readlink ()
places the contents of the symbolic link
@ -106,6 +100,20 @@ A component of the path prefix is not a directory.
X/OPEN, 4.4BSD (the
.BR readlink ()
function call appeared in 4.2BSD).
.SH HISTORY
In versions of glibc up to and including glibc 2.4, the return type of
.BR readlink ()
was declared as
.IR int .
Nowadays, the return type is declared as
.IR ssize_t ,
as (newly) required in POSIX.1-2001.
.\" FIXME . In 2005-04-01, the return type was changed to the
.\" the POSIX compliant 'size_t'. When this is actually released
.\" we should udate the above prototype and add a NOTE about the
.\" variation across glibc versions.
.\" See http://sourceware.org/bugzilla/show_bug.cg1?id=2450
.\"
.SH "SEE ALSO"
.BR lstat (2),
.BR path_resolution (2),