Subject: Re: building -current on FreeBSD fails
To: None <current-users@netbsd.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: current-users
Date: 06/06/2003 14:23:04
On Thu, Jun 05, 2003 at 18:18:05 +0000, Mark Valentine wrote:

> > The quick workaround is to build with
> > 
> >     ac_cv_header_sys_endian_h=no
> > 
> > in the environment to force the build to use netbsd's <sys/endian.h>.
> 
> I just came across this problem.
> 
> installboot seems to assume it gets the endian macros via <sys/types.h>
> (which includes <machine/endian.h>).
> 
> It would seem more correct to explicitly include the host's <sys/endian.h>
> (not <machine/endian.h>) in tools code which needs these routines.  This
> seems to work at least on NetBSD and FreeBSD.

As Luke already reaplied, I can only add that the correct thing to do
is to verify if the host's sys/endian.h provides the functions/macros
we need.  In practice, it's probably simpler to just always use
comapt defs.  E.g. FreeBSD 4.8 doesn't provide htobe64/be64toh.

SY, Uwe
-- 
uwe@ptc.spbu.ru                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen