bug-hurd
[Top][All Lists]
Advanced

[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: 26 Apr 2003 20:14:48 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Robert Millan <zeratul2@wanadoo.es> writes:

> the problem can be fixed by simply appliing this patch
> to bits/sockaddr.h:

As we aim for binary compatibility with linux, I'm pretty sure we want
to use the same definition of struct sockaddr and sa_family_t as on
linux.

> which indicate a disparity on what the POSIX 1003.1g standard
> says. is sa_family_t an unsigned char or an unsigned short int?
> 
> you can fix this bug with the first diff. but someone should
> take a look at POSIX.1g to find out which of short int or char
> is the correct value.

I haven't read the posix documents, but I would be surprised if it
specifies the exact size of sa_family_t. Posix doesn't care about
binary compatibility, so I'd expect that all that matters for posix
compliance is that the type exists and is big enough for storing the
constant AF_INET and the other AF_* constants.

The entire point of standardizing types like sa_family_t is to allow
implementations to use any size they find convenient, and at the same
time make it possible to write portable source code.

/Niels

PS. I'm not all that familiar with the debian bug tracking system. I
left the "Cc: 187391@bugs.debian.org" in, but removed the "Cc:
control@bugs.debian.org". Let me know if I should have done
differently. 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]