warnings: 'NANOSECOND' macro redefined

Gary E. Miller gem at rellim.com
Wed Mar 15 21:42:14 UTC 2017


Yo Hal!

On Wed, 15 Mar 2017 14:32:50 -0700
Hal Murray <hmurray at megapathdsl.net> wrote:

> gem at rellim.com said:
> > I'm gonna go with this for now, it seems pretty hard to
> > misunderstand: #define NS_PER_S 1000000000
> > #define S_PER_NS 1e-9
> > DItto for other units.  
> 
> Looks good to me.

I'm half done with the commit.  I'm changing all related defines.

Prolly 3-0 mins.


> An alternative hack is to undef NANOSECOND in the top of timespecops.h
> 
>  #include "ntp_calendar.h"
>  #include "timetoa.h"
>  
> +#ifdef NANOSECOND
> +  /* from sys/timex.h on NetBSD and FreeBSD */
> +# undef NANOSECOND
> +#endif

And then all BSD people be be confused since 1e9 is not 1e-9.

Best surprise is no surprise.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170315/ec6025b2/attachment.bin>


More information about the devel mailing list