mirror of https://github.com/mkerrisk/man-pages
readlink.2: SYNOPSIS: Use 'restrict' in prototypes
POSIX specifies that the parameters of readlink() and readlinkat() shall be 'restrict'. Glibc uses 'restrict' too. Let's use it here too. ...... .../glibc$ grep_glibc_prototype readlink posix/unistd.h:820: extern ssize_t readlink (const char *__restrict __path, char *__restrict __buf, size_t __len) __THROW __nonnull ((1, 2)) __wur __attr_access ((__write_only__, 2, 3)); .../glibc$ grep_glibc_prototype readlinkat posix/unistd.h:832: extern ssize_t readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) __THROW __nonnull ((2, 3)) __wur __attr_access ((__write_only__, 3, 4)); .../glibc$ Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
78eb47fc8f
commit
8f5b718ea1
|
@ -48,14 +48,14 @@ readlink, readlinkat \- read value of a symbolic link
|
|||
.nf
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "ssize_t readlink(const char *" pathname ", char *" buf \
|
||||
", size_t " bufsiz );
|
||||
.BI "ssize_t readlink(const char *restrict " pathname ", char *restrict " buf ,
|
||||
.BI " size_t " bufsiz );
|
||||
.PP
|
||||
.BR "#include <fcntl.h> " "/* Definition of AT_* constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "ssize_t readlinkat(int " dirfd ", const char *" pathname ,
|
||||
.BI " char *" buf ", size_t " bufsiz );
|
||||
.BI "ssize_t readlinkat(int " dirfd ", const char *restrict " pathname ,
|
||||
.BI " char *restrict " buf ", size_t " bufsiz );
|
||||
.PP
|
||||
.fi
|
||||
.RS -4
|
||||
|
|
Loading…
Reference in New Issue