This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH 3/4] Avoid duplication of _CLOEXEC and _NONBLOCK values
On Sat, 21 Aug 2010, Guy Martin wrote:
> This patch removes obsolete duplicate files for mips.
> Mips team, please review the fact that bit/socket.h was defining SOCK_DGRAM=1
> and SOCK_STREAM=2 while everybody else uses SOCK_DGRAM=2 and SOCK_STREAM=1.
> As far as I can see, this was a bug but I'd like confirmation.
No, it's the sole reason the MIPS bits/socket.h header existed for many
years before the new O_* values were added. Please *check* the relevant
kernel headers when making or reviewing any changes in this area. You'll
see in arch/mips/include/asm/socket.h "Please notice that for binary
compat reasons MIPS has to override the enum sock_type in
include/linux/net.h, so we define ARCH_HAS_SOCKET_TYPES here." - I don't
know if the original aim was IRIX compatibility or something like that,
but this is the kernel/userspace ABI on MIPS.
Target copies of bits/* headers are not a problem the same way as copies
of sys/* headers - although it would still be nice (with libc buy-in) to
have a better split-up of the parts that are genuinely
architecture-dependent and the parts that aren't (bits/fcntl.h is a case
that commonly needs updating for all targets but where a large proportion
of the updates affect parts of the file that are identical for all
targets).
--
Joseph S. Myers
joseph@codesourcery.com