warnings: 'NANOSECOND' macro redefined
Hal Murray
hmurray at megapathdsl.net
Wed Mar 15 21:32:50 UTC 2017
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.
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
/* milliseconds per second */
#define MILLISECONDS 1000
I'm testing that now. I'll happily switch to your version. I want something
that works so I can verify that my recent changes to leapsecond didn't break
anything gross on NetBSD and FreeBSD.
--------
refclock_atom.h used to contain:
#undef NANOSECOND /* some systems define it differently */
#define NANOSECOND 1000000000 /* one second (ns) */
-------
> I see no preactical reason for a fefine of 1e9 as NS_PER_S will do fine for
> that too.
I can't figure out what that means.
Is 1e9 floating point? I'd use the lots of zeros form if I was trying to
emphasize that it was an integer.
--
These are my opinions. I hate spam.
More information about the devel
mailing list