gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] ✘timestamp_t is dead. Long live timespec_t


From: Gary E. Miller
Subject: Re: [gpsd-dev] ✘timestamp_t is dead. Long live timespec_t
Date: Thu, 19 Sep 2019 21:09:39 -0700

Yo Greg!

On Thu, 19 Sep 2019 20:01:58 -0400
Greg Troxel <address@hidden> wrote:

> "Gary E. Miller" <address@hidden> writes:
> 
> > timespec_t, at least on 64 bit systems, is good for the 2038 UNIX
> > time overflow event.  Not much we can do for 32-bit systems until
> > the system calls get fixed.  
> 
> I don't really follow this, and assume it's about Linux only.  On
> NetBSD (for the last bunch of years), time_t is int64_t, regardless
> of CPU native word size.

The only one I know that is int32_t is 32-bit Linux.  Good to know that
NetBSD is good for 2038.

> Presumably you are including sys/time.h, per POSIX:
> 
>   https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html

Yup.

> > timespec_t is easy to work with, as long as you use the macros in
> > timespec.h.  A few more places in the code can be converted to use
> > the macros.  
> 
> Can you point me to where POSIX defines timespec.h, and the macros?  I
> was unable to find those.  I wonder if they are Linux only.

timespec.h, and the macros, have been in gpsd for a a few revisions.  So
little new there.  Well tested on many distros.

The change was finally using timespec exclusively.  Flushing the
timestamp_t from the corners.  The code changes from timestamp_t to
timespec_t are pretty simple and obvious.

> > Few regressions changed, and those for the better.  
> 
> What other platforms did you test on?

I tested on Gentoo amd64, arm64 and arm32.  Also macOS.  People have been
building on other distros in the last few weeks.  The new code has been
part of many bug fixes for reported issues, so it has been getting
wide usage.  There was a CentOS bug, now fixed.  And others.

Please test.  I expect this is the last major change this revision.  We'll
need to get some confidence before trusting.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpdcCcCalcLL.pgp
Description: OpenPGP digital signature


reply via email to

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