Havard Eidnes | 15 Sep 2007 18:21
Picon

m68k and sun2 vs. __BSWAP_RENAME

Hi,

recent build failures in sys/rump/fs/bin/cd9660fs/ reveals that sun2
and the other m68k ports are internally inconsistent with respect to
whether their libc.so libraries define __bswap{16,32} or bswap{16,32}
and whether their include files do the renaming or not.

m68k/include/bswap.h define __BSWAP_RENAME before <sys/bswap.h> is
included, while sun2 does not.  Thus, these ports have different
expectations wrt. what should go in libc.so.

However, these ports share the assembly files which implement these
functions, and they compile into defining just bswap16 and bswap32,
irrespectively of any defines.

The attached patch fixes this build failure for both the m68k ports
and the sun2 port, doing the __BSWAP_RENAME into the __bswap{16,32}
functions for all these ports.

Any objections to checking it in?  (This is patterned after i386,
which has corresponding #ifs in its assembly files.)

Regards,

- Håvard
Index: common/lib/libc/arch/m68k/gen/bswap16.S
===================================================================
RCS file: /u/nb/src/common/lib/libc/arch/m68k/gen/bswap16.S,v
(Continue reading)


Gmane