Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Apr 1997 11:39:19 -0700
From:      Jason Thorpe <thorpej@nas.nasa.gov>
To:        Bruce Evans <bde@freefall.freebsd.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: cvs commit: src/sys/i386/include endian.h 
Message-ID:  <199704201839.LAA01077@lestat.nas.nasa.gov>

next in thread | raw e-mail | index | archive | help
On Sun, 20 Apr 1997 04:44:34 -0700 (PDT) 
 Bruce Evans <bde@freefall.freebsd.org> wrote:

 >   Don't pollute the namespace if _POSIX_SOURCE is defined.  This is
 >   broken - it makes almost everything in <machine/endian.h> inaccessible
 >   if _POSIX_SOURCE is defined, yet <machine/endian.h> is not a POSIX
 >   header.  Other systems don't do it any better.

...there's a very good reason to protect the namespace:

basalt (thorpej) ~ 202% uname -sm ; grep endian.h /sys/sys/types.h
NetBSD hp300
#include <machine/endian.h>

<machine/endian.h> is not meant to be included standalone, but rather
pulled in by other header files, which may be POSIX headers.

(Note, that in NetBSD, <machine/endian.h> defines the X/Open types
in_addr_t and in_port_t)

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704201839.LAA01077>