[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] type issues in gpspipe.c
From: |
Eric S. Raymond |
Subject: |
Re: [gpsd-dev] type issues in gpspipe.c |
Date: |
Thu, 28 Aug 2014 08:29:23 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Greg Troxel <address@hidden>:
>
> I am seeing warnings when building gpspipe.c. On NetBSD, time_t is
> int64_t, and that's an increasingly likely choice. suseconds_t is int,
> at least on i386.
>
> The right fix is to get the standards bodies to define PRI macros for these
> types :-)
>
> In the real world, we probably need to cast to a guaranteed-big-enough type.
>
> I would suggest int64_t for time_t (although uint64_t might be better,
> as I think time_t is not guaranteed to be signed), and either uint64_t
> or long int for suseconds_t. Increasingly I am a fan of uintXX_t for
> types that the programmer knows needs a certain range.
Not reproducing here. I'll take a patch.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
signature.asc
Description: Digital signature