gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] featuretest macros


From: Greg Troxel
Subject: Re: [gpsd-dev] featuretest macros
Date: Sun, 23 Jun 2019 08:55:34 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (berkeley-unix)

"Gary E. Miller" <address@hidden> writes:

>> I see %u used to print uint32_t.  But %u is "unsigned int", and on
>> ILP64 platforms (like I'm 99% sure alpha is), uint32_t will not be
>> unsigned int.  So in practice, this is likely to be ok, as almost all
>> computers in practice now are ILP32 or LP64.
>
> You are right, I misread that as uint16_t.  unint32_t always
> fits in an unsigned long.  Fix pushed.

My git state and my memory are not lining up (not your issue :-).
What's there with the cast to unsigned should be ok.

>> I think strictly it needs PRIu32 as detailed here
>
> PRIu32 requires feature defines.  I thought we were trying to get rid of
> those.

I had the impression C99 specifies PRIu32, and that with posix since
2004ish, they were not optional.   I guess the question is what the base
level of C and POSIX is; I thought we were more trying to get rid of
defining feature macros unnecessarily, than to change gpsd to use less
than C99/posix (or perhaps C90/posix).



reply via email to

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