Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Apr 1995 18:15:27 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@freefall.cdrom.com, hsu@freefall.cdrom.com
Cc:        ports@freefall.cdrom.com
Subject:   Re: LITTLE_ENDIAN define (was Re: pcemu)
Message-ID:  <199504180815.SAA11042@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>  > ===>  Building for pcemu1.01alpha
>  > gcc -I/usr/X11R6/include -O2 -pipe -DBOOT720 -DLITTLE_ENDIAN -DBIGCASE -DINLINE_F
>  > UNCTIONS  -DBOOTFILE=\"/usr/local/lib/pcemu/DriveA\" -c main.c
>  > In file included from /usr/include/sys/types.h:48,
>  >                  from /usr/include/stdio.h:43,
>  >                  from main.c:22:
>  > /usr/include/machine/endian.h:50: warning: `LITTLE_ENDIAN' redefined
>  > *Initialization*:1: warning: this is the location of the previous definition

>This define is very annoying.  I've come across it in conflict w/ some
>other ports.  Apparently people naturally like to use #ifdef LITTLE_ENDIAN
>or #ifdef BIG_ENDIAN, both of which succeed in our case.  Do we really need
>to define LITTLE_ENDIAN in <machine/endian.h>?  That is, can we call it,
>for example, _LITTLE_ENDIAN_ instead?

<machine/endian.h> is currently included by <sys/types.h> and <sys/wait.h>.
I guess it has to be included by <sys/types.h> for the ntoh stuff
and by <sys/wait.h> for the old, bogus `union wait' stuff.

<stdio.h> shouldn't include <sys/types.h> and <sys/types.h> shouldn't
define names other than ones ending with `_t' if _POSIX_SOURCE is
defined.

Bruce



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