gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] build failure, again, due to endian.h issues


From: Eric S. Raymond
Subject: Re: [gpsd-dev] build failure, again, due to endian.h issues
Date: Tue, 5 Nov 2013 20:48:52 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

Greg Troxel <address@hidden>:
> driver_rtcm2.h fails to build.  The problem is the #ifdef BSD, and
> NetBSD does not define BSD as a preprocessor symbol.

I've found and pushed a way to cut the Gordian knot.

#define IS_BIG_ENDIAN (*(uint16_t *)"\0\xff" < 0x100)

I think this goes straight to the top of my "creative abuse of the
preprocessor" list.  Wonderful, isn't it?  Thank StackOverflow.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>

Attachment: signature.asc
Description: Digital signature


reply via email to

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