[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] Half the port problems are solved; seeking help with RTCM
Eric S. Raymond
Re: [gpsd-dev] Half the port problems are solved; seeking help with RTCM2 driver
Mon, 28 May 2012 23:18:00 -0400
Bernd Zeimetz <address@hidden>:
> > If so, that is good news. It means the big-endian version of the weird
> > structure-overlay hack I used is working. In turn, that means that
> > the only failures are machines for which the compilers ignore #pragma
> > pack(1).
> > I know in a general way how to fix this, but the details will be ugly
> > and difficult.
> Actually it was easy - I've tried it on s390 only, but I guess it fixes sparc
> and s390x, too:
Your words imply that once BIG_ENDIAN_WORDS is set properly, the wacky
structure-overlay hack works perfectly on *every architecture*, regardless
of word length or endianness, including the really odd ones like s390.
That code is mad science, a textbook example on several levels of how
*not* to do portability. And yet, I got it *right*? I am utterly
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>