From: Alejandro Colomar Date: Fri, 5 Mar 2021 23:50:51 +0000 (+0100) Subject: lio_listio.3: SYNOPSIS: Use 'restrict' in prototypes X-Git-Tag: man-pages-5.11~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c445280cf371cda66916c4e5e0fdb168db3a5ad6;p=thirdparty%2Fman-pages.git lio_listio.3: SYNOPSIS: Use 'restrict' in prototypes Both POSIX and glibc use 'restrict' in lio_listio(). However, POSIX is a bit more restrictive than glibc for the second parameter. Let's document the more restrictive POSIX variant. $ man 3p lio_listio |sed -n '/^SYNOPSIS/,/;/p' SYNOPSIS #include int lio_listio(int mode, struct aiocb *restrict const list[restrict], int nent, struct sigevent *restrict sig); $ .../glibc$ grep_glibc_prototype lio_listio rt/aio.h:148: extern int lio_listio (int __mode, struct aiocb *const __list[__restrict_arr], int __nent, struct sigevent *__restrict __sig) __THROW __nonnull ((2)); .../glibc$ Cc: Szabolcs Nagy Cc: "Joseph S. Myers" Cc: Ulrich Drepper Cc: Florian Weimer Cc: glibc Bug: glibc Signed-off-by: Alejandro Colomar Signed-off-by: Michael Kerrisk --- diff --git a/man3/lio_listio.3 b/man3/lio_listio.3 index d89670f7c8..d40ac89fb0 100644 --- a/man3/lio_listio.3 +++ b/man3/lio_listio.3 @@ -28,8 +28,8 @@ lio_listio \- initiate a list of I/O requests .nf .B "#include " .PP -.BI "int lio_listio(int " mode ", struct aiocb *const " aiocb_list [], -.BI " int " nitems ", struct sigevent *" sevp ); +.BI "int lio_listio(int " mode ", struct aiocb *restrict const " aiocb_list [restrict], +.BI " int " nitems ", struct sigevent *restrict " sevp ); .PP Link with \fI\-lrt\fP. .fi