Date: Wed, 10 Jan 2001 16:50:43 +1100 From: "Geoffrey Crompton (RMIT Guest)" <ghcrompton@gecko.eric.net.au> To: Matthew Emmerton <matt@gsicomp.on.ca> Cc: FreeBSD-Questions <freebsd-questions@FreeBSD.ORG> Subject: Re: programming in freebsd related questions Message-ID: <20010110165043.A31845@gecko.eric.net.au> In-Reply-To: <Pine.BSF.4.21.0101092020020.53322-100000@xena.gsicomp.on.ca> References: <20010110121911.A29635@gecko.eric.net.au> <Pine.BSF.4.21.0101092020020.53322-100000@xena.gsicomp.on.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 09, 2001 at 08:25:38PM -0500, Matthew Emmerton wrote: > On Wed, 10 Jan 2001, Geoffrey Crompton (RMIT Guest) wrote: > > > When I #include things like sys/socket.h and netinet/in.h, I get heaps > > of compiler errors, unless I do a #include <sys/types.h> before I #include > > the others. Why is that? > > Because that's the way it is. <sys/types.h> defines many things that are > used by other header files, such as <sys/socket.h> and <netinet/in.h>, so > you have to include it first, as you've found out. Depending on your > program, you may need to include <sys/param.h> _instead of_ > <sys/types.h>. (You can't include both.) Is there a design reason for why those files (<sys/socket.h>, <netinet/in.h>) don't #include <sys/types.h>? Or is that just that way it is? Does <sys/param.h> define a superset of what is defined in <sys/types.h>? Thanks, Geoff Crompton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010110165043.A31845>