gpsd-dev
[Top][All Lists]
Advanced

[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: Bernd Zeimetz
Subject: Re: [gpsd-dev] Half the port problems are solved; seeking help with RTCM2 driver
Date: Tue, 29 May 2012 09:10:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20120510 Icedove/10.0.4

On 05/29/2012 05:18 AM, Eric S. Raymond wrote:
> 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.

well, what I actually wanted to say is that it was easy to fix that code
for all debian related architectures ;)

> 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....

As far as linux and gcc or clang is involved, it seems so.

-- 
 Bernd Zeimetz                            Debian GNU/Linux Developer
 http://bzed.de                                http://www.debian.org
 GPG Fingerprint: ECA1 E3F2 8E11 2432 D485  DD95 EB36 171A 6FF9 435F



reply via email to

[Prev in Thread] Current Thread [Next in Thread]