Date: Wed, 10 Aug 2005 12:06:31 +0200 From: Dirk GOUDERS <gouders@et.bocholt.fh-ge.de> To: Garance A Drosihn <drosih@rpi.edu> Cc: hackers@freebsd.org Subject: Re: Include files that depend on include files Message-ID: <200508101006.j7AA6VCB037633@musashi.et.bocholt.fh-gelsenkirchen.de> In-Reply-To: Message from Garance A Drosihn <drosih@rpi.edu> of "Tue, 09 Aug 2005 20:04:52 EDT." <p06230929bf1eecb4d4fd@[128.113.24.47]>
next in thread | previous in thread | raw e-mail | index | archive | help
> To get around this in user-space, we do things like create > /usr/include/sys/_types.h > > And then our include files include *that* file, and do not include > the standard <sys/types.h>. This <sys/_types.h> file, in turn, does > not define any of the actual symbols. Let's say that some include > file needs to know what typedef for 'off_t' is. The sys/_types.h > file defines __off_t, and then the include file which needs off_t > will do something like: > > #include <sys/_types.h> > #ifndef _OFF_T_DECLARED > typedef __off_t off_t; > #define _OFF_T_DECLARED > #endif > > Thus, it has only defined the one name it actually needs, instead > of defining all of the standard symbols in the real sys/types.h. Can you point me to a real-life example where such a mechanism is used? I'd like to have a closer look at it. Dirk
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508101006.j7AA6VCB037633>