[prev in list] [next in list] [prev in thread] [next in thread]
List: gpsd-dev
Subject: Re: [gpsd-dev] Half the port problems are solved; seeking help with RTCM2 driver
From: "Eric S. Raymond" <esr () thyrsus ! com>
Date: 2012-04-25 11:48:03
Message-ID: 20120425114803.GA23558 () thyrsus ! com
[Download RAW message or body]
Bernd Zeimetz <bernd@bzed.de>:
> > I agree. Can you think of a way to test for [ptys] from a shellscript?
>
> Only something like calling a few lines of Python code...
Yes, I'll probably have to do that. Ugh.
> > Yes, as I said I'm pretty sure this is down to #pragma pack(1) not being
> > implemented on those machines.
>
> I'm kinda sure it is implemented, but my guess would be that you hit the
> architectures where aligned access is required for some datatypes.
That's more or less what I mean. #pragma pack(1) *can't* be implemented
on a machine with aligned-access requirements - well, not without going
to code-generation lengths that most compilers won't, anyway.
> Unaligned access usually throws a sigbus on sparc, but my wild guess is
> that you work around that somehow...
I've done no workaround. The code generator for SPARC must just be
Doing The Right Thing - copying each unaligned member to an aligned
location before trying to interpret it.
> That should at least show where the
> issue resides, but I doubt it is easily fixable without rewriting the
> whole thing into something that splits buf into pieces and fills sane
> (sane as in: ensure there is no unaligned access, do not use #pragma
> pack...) structs manually (actually, looking at the code I think that
> would be easy to do, just a lengthy amount of work).
Yes, I've already discussed this with Gary. I'm too close to the code;
he's going to take a whack at it when he gets back from the Caymans.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic