Yo Hal!

On Tue, 14 Mar 2017 20:28:40 -0700
Hal Murray <hmur...@megapathdsl.net> wrote:

> ../../include/timespecops.h:65:9: warning: 'NANOSECOND' macro
> redefined [-Wmacro-redefined]
> 
> NetBSD:
> /usr/include/sys/timex.h:#define NANOSECOND     1000000000L /*
> nanoseconds in one second */
> 
> FreeBSD:
> /usr/include/sys/timex.h:#define NANOSECOND     1000000000L /*
> nanoseconds in one second */
> 
> I didn't investigate any version details.  I don't think it has
> changed recently.

Good catch.

That will be ugly since I defined NANOSECOND as 1e-9.  Their
definition is actually nano seconds per second.  Another misleading
choice by BSD.

NTPsec defines 1e-9 as NANOSECONDS.

So, any preferences for different and dsescription names that
do not conflict with the misleading *BSD names?


> This area could use some cleanup.  Aside from the defines in
> timespecops.h, grep finds these:
> 
> ./ntpd/ntp_loopfilter.c:# define NANOSECONDS    1e9
> ./ntpd/ntp_loopfilter.c:#define MICROSECONDS    1e6
> ./ntpd/ntp_control.c:#define MILLISECONDS       1000    /*
> milliseconds per second -magic numbers suck */
> ./ntpfrob/bumpclock.c:#define NANOSECONDS       1000000000

So?  They are all unique, all have their special place.

If you did a context grep the comments would expalin a bit more.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        g...@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

Attachment: pgpfRc2hW14Sz.pgp
Description: OpenPGP digital signature

_______________________________________________
devel mailing list
devel@ntpsec.org
http://lists.ntpsec.org/mailman/listinfo/devel

Reply via email to