SOCK_STREAM and SOCK_DGRAM for MIPS

Bernhard Fischer rep.dot.nop at gmail.com
Tue Aug 5 13:38:35 UTC 2008


On Tue, Aug 05, 2008 at 02:03:51PM +0200, Dongsu Park wrote:
>Hi,
>
>playing with OpenWRT 7.09 and uClibc 0.9.28.2 on MIPS architecture, I 
>have just found an interesting fact about uClibc.
>
>In libc/sysdeps/linux/mips/bits/socket.h, SOCK_STREAM is defined as 2, 
>SOCK_DGRAM as 1. But in bits/socket.h for any other architectures e.g 
>alpha, sparc etc., SOCK_STREAM is 1 and SOCK_DGRAM is 2.
>
>Why are they different like that? Is there any reason that the socket 
>constants should be defined differently only for MIPS architecture?

ISTR that MIPS has this backwards for historical reasons. All is well.



More information about the uClibc mailing list