[Top][All Lists]
[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
From: |
Eric S. Raymond |
Subject: |
Re: [gpsd-dev] Half the port problems are solved; seeking help with RTCM2 driver |
Date: |
Mon, 28 May 2012 23:18:00 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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:
>
> http://git.sv.gnu.org/cgit/gpsd.git/commit/?id=a3f6c603400bb07f2da80aab6850e8a4788287a4
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
astounded....
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>