Date: Sat, 08 Sep 2001 05:38:05 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: karels@BSDI.COM Cc: Bill Fenner <fenner@research.att.com>, arch@FreeBSD.ORG Subject: Re: Causing <netinet/in.h> to depend on <sys/socket.h> Message-ID: <3B9A112D.5909ECE@mindspring.com> References: <200109072110.f87LADX15133@redrock.eng.bsdi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Mike Karels wrote: > > Inclusion of the <netinet/in.h> header may also make > > visible all symbols from <inttypes.h> and <sys/socket.h>. > > I haven't seen that version of the networking stuff yet. However, if > you are solving the problem I think you are, types like sa_family_t, > I can tell you what we do in BSD/OS: we created a <sys/sockettypes.h>, > and include it from both <sys/socket.h> and <netinet/in.h>. This is MUCH cleaner; however, it's still really, really ugly, in that it makes one include file include another, and thus crams a whole bunch of unexpected crap into the implementation space. I haven't seen where the sockaddr_storage type is used, yet (no one has posted anything), but it seems to me that if, when it is used, it is used as an opaque pointer type, where possible, then this avoids the need to pollute the namespace unless someone is referencing members of the structure, which means they are actually using it, which means that they can darn well include a header file to get the non-opaque version of the structure declaration so that they can instance the thing. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B9A112D.5909ECE>