FreeBSD <sys/types.h>

Robert Millan rmh@debian.org
Wed, 8 Dec 2004 02:37:10 +0100


Hey, here's a typical problem I just found.   On FreeBSD:

 * <machine/_types.h> typedef'es intXX_t __foo;
 * <sys/types.h> typedef'es __foo foo;

On GNU/kFreeBSD:

 * <machine/_types.h> typedef'es intXX_t __foo;
 * <sys/types.h> is provided by Glibc and has no deal with foo.

How do we get foo in, say, <sys/vm.h> which requires it?  Possible options:

 * include <machine/_types.h> and use __foo instead.
 * patch Glibc to typedef foo in its <sys/types.h>
 * use intXX_t directly in <sys/vm.h> et al.
 * 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.

Any suggestion?

-- 
 .''`.   Proudly running Debian GNU/kFreeBSD unstable/unreleased (on UFS2+S)
: :' :
`. `'    http://www.debian.org/ports/kfreebsd-gnu
  `-