* [PATCH] send.2, recv.2: add msg_iovlen POSIX note
@ 2020-07-03 1:25 Alyssa Ross
2020-07-03 11:44 ` Michael Kerrisk (man-pages)
0 siblings, 1 reply; 2+ messages in thread
From: Alyssa Ross @ 2020-07-03 1:25 UTC (permalink / raw)
To: Michael Kerrisk (man-pages); +Cc: linux-man, Alyssa Ross
msg_iovlen is incorrectly typed (according to POSIX) in addition to
msg_controllen, but unlike msg_controllen, this wasn't mentioned for
msg_iovlen.
msg_iovlen being incorrectly typed hasn't been reported as a GCC bug,
but there's no point since it is caused by the same underlying issue.
Sources: POSIX.1-2017 (<sys/socket.h>), Linux (include/linux/socket.h)
Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
man2/recv.2 | 13 +++++++++----
man2/send.2 | 13 +++++++++----
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/man2/recv.2 b/man2/recv.2
index 78ae86e52..7c4b70c7a 100644
--- a/man2/recv.2
+++ b/man2/recv.2
@@ -533,13 +533,18 @@ field of the
.I msghdr
structure should be typed as
.IR socklen_t ,
-but glibc currently types it as
+and the
+.I msg_iovlen
+field should be typed as
+.IR int ,
+but glibc currently types both as
.IR size_t .
-.\" glibc bug raised 12 Mar 2006
+.\" glibc bug for msg_controllen raised 12 Mar 2006
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=2448
.\" The problem is an underlying kernel issue: the size of the
-.\" __kernel_size_t type used to type this field varies
-.\" across architectures, but socklen_t is always 32 bits.
+.\" __kernel_size_t type used to type these fields varies
+.\" across architectures, but socklen_t is always 32 bits,
+.\" as (at least with GCC) is int.
.PP
See
.BR recvmmsg (2)
diff --git a/man2/send.2 b/man2/send.2
index 0dd35d783..de224b307 100644
--- a/man2/send.2
+++ b/man2/send.2
@@ -441,13 +441,18 @@ field of the
.I msghdr
structure should be typed as
.IR socklen_t ,
-but glibc currently types it as
+and the
+.I msg_iovlen
+field should be typed as
+.IR int ,
+but glibc currently types both as
.IR size_t .
-.\" glibc bug raised 12 Mar 2006
+.\" glibc bug for msg_controllen raised 12 Mar 2006
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=2448
.\" The problem is an underlying kernel issue: the size of the
-.\" __kernel_size_t type used to type this field varies
-.\" across architectures, but socklen_t is always 32 bits.
+.\" __kernel_size_t type used to type these fields varies
+.\" across architectures, but socklen_t is always 32 bits,
+.\" as (at least with GCC) is int.
.PP
See
.BR sendmmsg (2)
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] send.2, recv.2: add msg_iovlen POSIX note
2020-07-03 1:25 [PATCH] send.2, recv.2: add msg_iovlen POSIX note Alyssa Ross
@ 2020-07-03 11:44 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-07-03 11:44 UTC (permalink / raw)
To: Alyssa Ross; +Cc: mtk.manpages, linux-man
Hello Alyssa,
On 7/3/20 3:25 AM, Alyssa Ross wrote:
> msg_iovlen is incorrectly typed (according to POSIX) in addition to
> msg_controllen, but unlike msg_controllen, this wasn't mentioned for
> msg_iovlen.
>
> msg_iovlen being incorrectly typed hasn't been reported as a GCC bug,
> but there's no point since it is caused by the same underlying issue.
>
> Sources: POSIX.1-2017 (<sys/socket.h>), Linux (include/linux/socket.h)
>
> Signed-off-by: Alyssa Ross <hi@alyssa.is>
Thanks. Patch applied.
Cheers,
Michael
> ---
> man2/recv.2 | 13 +++++++++----
> man2/send.2 | 13 +++++++++----
> 2 files changed, 18 insertions(+), 8 deletions(-)
>
> diff --git a/man2/recv.2 b/man2/recv.2
> index 78ae86e52..7c4b70c7a 100644
> --- a/man2/recv.2
> +++ b/man2/recv.2
> @@ -533,13 +533,18 @@ field of the
> .I msghdr
> structure should be typed as
> .IR socklen_t ,
> -but glibc currently types it as
> +and the
> +.I msg_iovlen
> +field should be typed as
> +.IR int ,
> +but glibc currently types both as
> .IR size_t .
> -.\" glibc bug raised 12 Mar 2006
> +.\" glibc bug for msg_controllen raised 12 Mar 2006
> .\" http://sourceware.org/bugzilla/show_bug.cgi?id=2448
> .\" The problem is an underlying kernel issue: the size of the
> -.\" __kernel_size_t type used to type this field varies
> -.\" across architectures, but socklen_t is always 32 bits.
> +.\" __kernel_size_t type used to type these fields varies
> +.\" across architectures, but socklen_t is always 32 bits,
> +.\" as (at least with GCC) is int.
> .PP
> See
> .BR recvmmsg (2)
> diff --git a/man2/send.2 b/man2/send.2
> index 0dd35d783..de224b307 100644
> --- a/man2/send.2
> +++ b/man2/send.2
> @@ -441,13 +441,18 @@ field of the
> .I msghdr
> structure should be typed as
> .IR socklen_t ,
> -but glibc currently types it as
> +and the
> +.I msg_iovlen
> +field should be typed as
> +.IR int ,
> +but glibc currently types both as
> .IR size_t .
> -.\" glibc bug raised 12 Mar 2006
> +.\" glibc bug for msg_controllen raised 12 Mar 2006
> .\" http://sourceware.org/bugzilla/show_bug.cgi?id=2448
> .\" The problem is an underlying kernel issue: the size of the
> -.\" __kernel_size_t type used to type this field varies
> -.\" across architectures, but socklen_t is always 32 bits.
> +.\" __kernel_size_t type used to type these fields varies
> +.\" across architectures, but socklen_t is always 32 bits,
> +.\" as (at least with GCC) is int.
> .PP
> See
> .BR sendmmsg (2)
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-03 11:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-03 1:25 [PATCH] send.2, recv.2: add msg_iovlen POSIX note Alyssa Ross
2020-07-03 11:44 ` Michael Kerrisk (man-pages)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).