Subject: Re: RFC3678: header incompatibility

From: Bill Fenner <[email-masked]>
Date: Mon, 15 Oct 2007 20:49:41 -0400

>	there is no guarantee that
>	<sys/socket.h> is included prior to <netinet/in.h>, and it is not
>	possible for <netinet/in.h> to blindly include <sys/socket.h>.

Why not?  POSIX seems to anticipate this:

>Inclusion of the <netinet/in.h> header may also make visible all symbols
>from <inttypes.h> and <sys/socket.h>.

  Bill

_______________________________________________
Ietf mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/ietf

---

From: Jun-ichiro itojun Hagino <[email-masked]>
Date: Tue, 16 Oct 2007 10:41:45 +0900

>>from <inttypes.h> and <sys/socket.h>.

	i'm aware of that line, but that does not really meet my observations.

	- freebsd do define sockaddr_storage in <netinet/in.h.h> and
	  <sys/socket.h>, with #define to avoid duplicate definitions.
	- opensolaris and other *BSD do not include <sys/socket.h> from
	  <netinet/in.h>, nor define sockaddr_storage in <netinet/in.h>.

	if the above POSIX line suggests inclusion of <sys/socket.h> from
	<netinet/in.h>, why freebsd did not do that and defined sockaddr_storage
	in two places?  my guess  is that it was a too big change to be
	accepted (way too much interaction with existing code).

	http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netinet/in.h.diff?r1=1.99;r2=1.100

itojun