[sword-devel] swbyteswap.h

Daniel Glassey sword-devel@crosswire.org
Wed, 29 Aug 2001 10:42:44 +0100

On 28 Aug 2001, at 9:59, Chris Little sent forth the message:

> > I don't know about Solaris but byteswap.h is on Debian Sparc, so the
> > #ifdef PPC isn't needed.
> byteswap.h is part of glibc, so it should be present on any GNU system
> (and it probably won't be present on Solaris).  We've got a few
> different options here, since really the only thing that keeps Sword
> from being compiled on all big endian systems is byte order and we're
> doing the fixes one system at a time.  We could continue our current
> course, supporting new systems as we are able. 


> We could integrate the
> byteswap.h code directly into Sword -- which might nullify any
> processor-specific optimizations for byte swapping. 

sounds like a bad idea.

> Or we could change
> the ifdefs so that Mac OS X and Solaris Sparc call their respective byte
> swappers, while anything else simply defines BIGENDIAN and calls the
> macros in byteswap.h.  For that we could define something like system =
> gnu_bigendian in Makefile.cfg.

Talking of Makefile.cfg have you had a look at this patch
yet that adds autoconf (_not_ automake) support and the debian files.
It autodetects the system type and other such stuff so you don't 
have to mess with the Makefiles manually.

It would be possible to add a check for byteswap.h, 
architecture/byte_order.h and sys/pctypes.h to this and do things 
according to what is found.
That way we could support all archs that have these and abort 
before building if they don't.

> > I'm fairly sure that'll fix a longstanding problem, thanks Chris for
> > your work on PowerPC :)
> >
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=103732&repeatmerged=yes
> Cool. :)  I didn't even realize there was a problem.  If I had we
> probably could have solved this sooner since Troy had already laid the
> groundwork through the Solaris Sparc & Mac OS X byte swapping code.
> > Would it be possible to make another minor release soon, or shall I
> > just integrate this into 1.5.2 for debian?
> I've got some buggy code in CVS right now that I still want to fix (but
> I can do that this week) and I want to get Sword compiling on BSD (my
> task today) and Mac OS X (should be a piece of cake once these BSD vs.
> GNU tools differences can be worked out).  After that, and anything else
> anyone thinks can & should be added before another minor unstable
> release, I'd support rolling 1.5.3 out the door.  There's no reason why
> we shouldn't do more frequent unstable point releases, and it might help
> us get bug reports to help with the stable.

sounds good to me :)


Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com