Subject: toolchain/32693: fails on FreeBSD4 due to lack of bswap.h
To: None <,,>
From: None <>
List: netbsd-bugs
Date: 02/01/2006 22:15:00
>Number:         32693
>Category:       toolchain
>Synopsis: fails on FreeBSD4 due to lack of bswap.h
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 01 22:15:00 +0000 2006
>Originator:     Tom Spindler
>Release:        NetBSD 3.99.15
System: FreeBSD 4.11-YAHOO-20050519 FreeBSD 4.11-YAHOO-20050519 #1: Tue Jul 19 16:17:23 PDT 2005  i386
Architecture: i386
Machine: i386
./ fails on FreeBSD 4 in tools/makefs, due to <machine/bswap.h>
and/or <sys/bswap.h> not existing on FreeBSD.

freebsdbox% ./ tools
[lots of stuff deleted]
#   compile  makefs/ffs.lo
cc -O -I. -I/home/dogcow/work/nbsrc/../nbobj/obj/home/dogcow/work/nbsrc/tools/compat -I/home/dogcow/work/nbsrc/../nbobj/obj/home/dogcow/work/nbsrc/tools/compat/include  -I/home/dogcow/work/nbsrc/tools/makefs/../compat -DHAVE_NBTOOL_CONFIG_H=1  -D_FILE_OFFSET_BITS=64  -I/home/dogcow/work/nbsrc/tools/makefs/../../usr.sbin/makefs  -I/home/dogcow/work/nbsrc/bin/ls -I/home/dogcow/work/nbsrc/sbin/mknod -I/home/dogcow/work/nbsrc/usr.sbin/mtree -I/home/dogcow/work/nbsrc/sys/fs/cd9660 -c -o ffs.lo.o    /home/dogcow/work/nbsrc/tools/makefs/../../usr.sbin/makefs/ffs.c
In file included from /home/dogcow/work/nbsrc/tools/makefs/../compat/ufs/ufs/ufs_bswap.h:3,
                 from /home/dogcow/work/nbsrc/tools/makefs/../../usr.sbin/makefs/ffs.c:102:
/home/dogcow/work/nbsrc/tools/makefs/../compat/ufs/ufs/../../../../sys/ufs/ufs/ufs_bswap.h:40: sys/bswap.h: No such file or directory

The bswap macros should properly be in <nbcompat.h> and/or libcompat
instead of relying on the host system having the macros in the base system
and some NetBSD-ish place, as bswap and pals aren't standardized.