FreeBSD <sys/types.h>

Nicolas Souchu nsouch@free.fr
Sat, 11 Dec 2004 14:20:13 +0100


On Sat, Dec 11, 2004 at 12:24:29AM +0100, Robert Millan wrote:
> On Fri, Dec 10, 2004 at 09:50:25PM +0100, Nicolas Souchu wrote:
> > >  * include FreeBSD's <sys/types.h> (either by renaming or by using its absolute
> > >    path), and integrate it with Glibc's to avoid type conflicts.
> > 
> > Or ensure <machine/_types.h> defines foo; but I prefer including FBSD
> > sys/types.h in glibc types.h
> 
> Sounds like the most reasonable to me too.  Btw, when solving type conflicts
> between glibc and kfreebsd headers, I've so far choosed to just remove the
> type defined by kfreebsd's.  However if we want to integrate the changes in
> upstream we should support their setup somehow.  How about protecting them
> like this:
> 
> #if defined(__FreeBSD__) || defined(_KERNEL)
>   code here is used by:
>     - kernel and userland on FreeBSD
>     - kernel, but not userland, on GNU/kFreeBSD
> #endif
> 
> Do you think this is acceptable for upstream?

Looking at your patches and this, I think these solutions which are best for
the current design are not completly acceptable for upstream.
I doubt they want to hack the code they've improved during years because a
GNU project needs it.

An acceptable solution will only arrive when the constraint of having glibc
running on BSD systems will become necessary for both. Currently, you have
to hack both because none has taken this constraint in its design. Both
are separatly POSIX compatible so applications don't bother.

So the question is why Debian needs glibc?

Nicholas