warnings: 'NANOSECOND' macro redefined
Hal Murray
hmurray at megapathdsl.net
Wed Mar 15 04:48:27 UTC 2017
gem at rellim.com said:
> So, any preferences for different and dsescription names that do not
> conflict with the misleading *BSD names?
I don't have any good suggestions.
I'd probably try a functional notation:
x = sec2ns(y)
It needs another something to distinguish integers from floating point.
------
>> ./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.
They all duplicate stuff already defined in timespecops.h
I hate duplication. Changing/fixing one is likely to miss the others.
I assume the compiler doesn't complain about redefines if the result doesn't change.
The one in bumbclock might be reasonable since it is only used in ntpfrob which is mostly off to the side rather than tangled up with ntpd/libntp.
I didn't see any explanations.
--
These are my opinions. I hate spam.
More information about the devel
mailing list