The history of stdint.h ?

Matthew Dillon dillon at apollo.backplane.com
Mon Jun 21 07:39:15 PDT 2004


:Thanks!  I do have a puzzle for you:  I've been comparing several
:OS's and find they are remarkably different WRT stdint.h.
:
:FBSD5 and NetBSD-CURRENT both have stdint.h in /usr/include/sys
:and a symlink pointing to it from /usr/include.
:
:OpenBSD-CURRENT (forging orthogonally as usual) has no stdint.h.
:
:DFly has *three* stdint.h's:  /usr/include, /usr/include/sys, and
:/usr/include/machine -- all different.
:
:So, why three different stdint.h in DFly?
:...
:Thanks!
    
    There's only one official stdint.h, and that's <stdint.h> (the one
    in /usr/include).  But we break ours down into a system and a
    machine-specific stdint.h, for the kernel build only, because we don't
    want to pollute the kernel with #include's of libc header files.

    We should probably put some #if checks in to prevent user programs
    from #include'ing sys/stdint.h directly.

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>





More information about the Bugs mailing list