Linux 2.2.10ac12: socket.h & libc5

The Doctor What (docwhat@gerf.org)
Mon, 26 Jul 1999 18:27:58 -0500


Alan: With your patch ac12, you add the following to asm/socket.h:
/* Nasty libc5 fixup - bletch */
#if defined(__KERNEL__) || (LIBC_VERSION < 6)
/* Socket types. */
#define SOCK_STREAM 1 /* stream (connection) socket */
#define SOCK_DGRAM 2 /* datagram (conn.less) socket */
#define SOCK_RAW 3 /* raw socket */
#define SOCK_RDM 4 /* reliably-delivered message */
#define SOCK_SEQPACKET 5 /* sequential packet socket */
#define SOCK_PACKET 10 /* linux specific way of */
/* getting packets at the dev */
/* level. For writing rarp and */
/* other similar things on the */
/* user level. */
#endif

This doesn't work right on my glib 2.0 system, since LIBC_VERSION is not
defined, my cpp takes (<nothing> < 6) as true. (egcs-2.91.60)

Shouldn't it be something like:
#if defined(__KERNEL__) || !defined(__GLIBC__)

instead of the #if above?

Or something like:
#if defined(__KERNEL__) || ( defined(LIBC_VERSION) && (LIBC_VERSION < 6) )

I'm currently using the former, but I'm not sure which is more "correct".

Ciao!

-- 
"Boarding this vessel is an act of war. Ergo we surrender."
		--Rimmer (Red Dwarf episode: Gunmen of the Apocalypse)

The Doctor What: "What, Doctor What" http://www.gerf.org/~docwhat/ docwhat@gerf.org (finger docwhat@gerf.org for PGP key) KF6VNC

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/