On Mon, Feb 06, 2023 at 02:02:23PM +0800, Xi Ruoyao wrote:
> On Sun, 2023-02-05 at 16:31 +0100, Alejandro Colomar via Libc-alpha wrote:
>
> > The only correct way to use different types in an API is
> > through a union.
>
> I don't think this statement is true (in general). Technically w
Hi Xi,
On 2/6/23 07:02, Xi Ruoyao wrote:
On Sun, 2023-02-05 at 16:31 +0100, Alejandro Colomar via Libc-alpha wrote:
The only correct way to use different types in an API is
through a union.
I don't think this statement is true (in general). Technically we can
write something like th
On Mon, Feb 06, 2023 at 12:55:12PM +0100, Alejandro Colomar wrote:
> Hi Xi,
>
> On 2/6/23 07:02, Xi Ruoyao wrote:
> >On Sun, 2023-02-05 at 16:31 +0100, Alejandro Colomar via Libc-alpha wrote:
> >
> >>The only correct way to use different types in an API is
> >>through a union.
> >
> >I don
Hi Rich,
On 2/6/23 14:38, Rich Felker wrote:
There is absolutely not any need to declare the union for application
code calling the socket APIs. You declare whatever type you will be
using. For binding or connecting a unix socket, sockaddr_un. For IPv6,
sockaddr_in6. Etc. Then you cast the point
Aw6394373
Aw6394373
On Mon, Feb 06, 2023 at 03:11:10PM +0100, Alejandro Colomar wrote:
> Hi Rich,
>
> On 2/6/23 14:38, Rich Felker wrote:
> >There is absolutely not any need to declare the union for application
> >code calling the socket APIs. You declare whatever type you will be
> >using. For binding or connecting
On Sun, Feb 05, 2023 at 04:28:36PM +0100, Alejandro Colomar wrote:
Regardless of the merits of the patch, let's not introduce typos:
> +++ b/man3type/sockaddr.3type
> @@ -120,6 +120,26 @@ .SH NOTES
> .I
> and
> .IR .
> +.SH BUGS
> +.I sockaddr_storage
> +was designed back when strict aliasin
Hello Eric,
On 2/6/23 19:45, Eric Blake wrote:
On Sun, Feb 05, 2023 at 04:28:36PM +0100, Alejandro Colomar wrote:
Regardless of the merits of the patch, let's not introduce typos:
+++ b/man3type/sockaddr.3type
@@ -120,6 +120,26 @@ .SH NOTES
.I
and
.IR .
+.SH BUGS
+.I sockaddr_storage
10 matches
Mail list logo