Date: Tue, 07 May 2002 18:20:52 +0200 From: Andy Sporner <sporner@nentec.de> To: aaron <aaron@lo-res.org> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: /usr/include/netinet/in.h Message-ID: <3CD7FEE4.3090709@nentec.de> References: <200205071814.46995.aaron@lo-res.org>
next in thread | previous in thread | raw e-mail | index | archive | help
aaron wrote: Hi, Maybe it's just me, but I always include the fundamental .h files first, so usually in this order (more or less): #include <sys/param.h> #include <sys/types.h> ... (networking stuff) #include <unistd.h> #include <stdio.h> So perhaps this is why I never saw this. It is a simple philosophy and so far hasn't caused me any trouble. :-) Not sure how it works in the Windoze environment, but then again... Not interested ;-) Hope this helps... Andy >Hi! > >I am just trying to write a simple IPv6 socket app. >after #including <netinet/in.h> I noticed that I have to include <sys/types.h> >BEFORE <netinet/in.h> which struck me as rather strange... > >Should not .h files include the depending .h files themselves so that all >dependencies of type / struct / #define definitions are met automatically? > >If not this is not what we want then we have the following problem: > >#include <sys/types.h> >#include <netinet/in.h> > > works > >but > >#include <netinet/in.h> >#include <sys/types.h> > >does not work. > >... hm... wondering if this what we want.... > >aaron. > > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-hackers" in the body of the message > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3CD7FEE4.3090709>