[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug found (in libc)
From: |
Niels Möller |
Subject: |
Re: bug found (in libc) |
Date: |
27 Apr 2003 15:55:25 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Robert Millan <zeratul2@wanadoo.es> writes:
> no no please, i'm not asking for a change in sockaddr format.
[...]
> and the bug can be fixed without changing the definition, by just
> applying this:
[...]
> #define __SOCKADDR_COMMON(sa_prefix) \
> - unsigned char sa_prefix##len; \
> sa_family_t sa_prefix##family
But that *is* precisely a change of the sockaddr format. struct
sockaddr (and sockaddr_un, sockaddr_in, etc) are defined in terms of
__SOCKADDR_COMMON. For example,
<bits/socket.h>:
/* Structure describing a generic socket address. */
struct sockaddr
{
__SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
char sa_data[14]; /* Address data. */
};
<sys/un.h>:
/* Structure describing the address of an AF_LOCAL (aka AF_UNIX)
socket. */
struct sockaddr_un
{
__SOCKADDR_COMMON (sun_);
char sun_path[108]; /* Path name. */
};
Changing __SOCKADDR_COMMON changes the definition of all sockaddr*.
That's what that macro is for.
/Niels
- Re: bug found (in libc), (continued)
- Re: bug found (in libc), Niels Möller, 2003/04/26
- Re: bug found (in libc), Robert Millan, 2003/04/26
- Re: bug found (in libc), Roland McGrath, 2003/04/26
- Re: bug found (in libc), Niels Möller, 2003/04/27
- Re: bug found (in libc), Robert Millan, 2003/04/27
- Re: bug found (in libc), Niels Möller, 2003/04/27
- Re: bug found (in libc), Robert Millan, 2003/04/27
- Re: bug found (in libc), Wolfgang Jaehrling, 2003/04/28
- Re: bug found (in libc), Roland McGrath, 2003/04/27
- Re: bug found (in libc), Robert Millan, 2003/04/27
- Re: bug found (in libc),
Niels Möller <=
- Re: bug found (in libc), Roland McGrath, 2003/04/27
- Re: Bug#187391: bug found (in libc), GOTO Masanori, 2003/04/28
- sa_len (Was Re: Bug#187391: bug found (in libc)), Niels Möller, 2003/04/28
- Re: sa_len (Was Re: Bug#187391: bug found (in libc)), Stephan Trebels, 2003/04/28
- Re: bug found (in libc), Simon Law, 2003/04/26
- Re: bug found (in libc), Robert Millan, 2003/04/27