Re: Cruft: There are 3 routines that convert time_t to text

2017-03-15 Thread Gary E. Miller
Yo Hal! On Wed, 15 Mar 2017 23:21:59 -0700 Hal Murray wrote: > g...@rellim.com said: > > I like checks for things that can never happen. Somehow many of > > them eventually do get tripped, then the error is more obvious, > > assuming a good error message. > > I do too, but there can be too

Re: Cruft: There are 3 routines that convert time_t to text

2017-03-15 Thread Hal Murray
g...@rellim.com said: > I like checks for things that can never happen. Somehow many of them > eventually do get tripped, then the error is more obvious, assuming a good > error message. I do too, but there can be too much of a good thing. There is a real talent for putting in the right check

Re: warnings: 'NANOSECOND' macro redefined

2017-03-15 Thread Gary E. Miller
Yo Hal! On Wed, 15 Mar 2017 14:32:50 -0700 Hal Murray wrote: > g...@rellim.com said: > > I'm gonna go with this for now, it seems pretty hard to > > misunderstand: #define NS_PER_S 10 > > #define S_PER_NS 1e-9 > > DItto for other units. > > Looks good to me. I'm half done with the co

Re: warnings: 'NANOSECOND' macro redefined

2017-03-15 Thread Hal Murray
g...@rellim.com said: > I'm gonna go with this for now, it seems pretty hard to misunderstand: > #define NS_PER_S 10 > #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" #inc

Re: warnings: 'NANOSECOND' macro redefined

2017-03-15 Thread Gary E. Miller
Yo Hal! I'm gonna go with this for now, it seems pretty hard to misunderstand: #define NS_PER_S 10 #define S_PER_NS 1e-9 DItto for other units. I see no preactical reason for a fefine of 1e9 as NS_PER_S will do fine for that too. RGDS GARY --

Re: warnings: 'NANOSECOND' macro redefined

2017-03-15 Thread Achim Gratz
Gary E. Miller writes: >> They don't. Integer and floating point constants are different. > > But in this case the defines are the reciprocals of each other. Very > bad collision. I was responding to Hal's apparent assertion that NANOSECONDS defined as 10 and 1.e9 were the same number.

Re: warnings: 'NANOSECOND' macro redefined

2017-03-15 Thread Gary E. Miller
Yo Achim! On Wed, 15 Mar 2017 19:31:43 +0100 Achim Gratz wrote: > Hal Murray writes: > > They all duplicate stuff already defined in timespecops.h > > They don't. Integer and floating point constants are different. But in this case the defines are the reciprocals of each other. Very bad co

Re: Cruft: There are 3 routines that convert time_t to text

2017-03-15 Thread Gary E. Miller
Yo Hal! On Wed, 15 Mar 2017 11:50:30 -0700 Hal Murray wrote: > You can remove that out of range check. ctl_pitfs is only called > twice to print the time of the last leap second and the expiration > time of the file. They should be sane. We can add a sanity check but > there is already a check

Re: Cruft: There are 3 routines that convert time_t to text

2017-03-15 Thread Hal Murray
e...@thyrsus.com said: >> I never figured out what the fs and ls were trying to tell me. Before the >> cleanup, the fs were probably converting ntp l_fp epoch times. > No, I don't think I changed those. Lost in the mists of time... I was referring to my recent leap second cleanup. > Thanks.

Re: warnings: 'NANOSECOND' macro redefined

2017-03-15 Thread Achim Gratz
Hal Murray writes: > They all duplicate stuff already defined in timespecops.h They don't. Integer and floating point constants are different. > I assume the compiler doesn't complain about redefines if the result doesn't > change. The gcc preprocessor does it that way, yes. It's considered a

Re: warnings: 'NANOSECOND' macro redefined

2017-03-15 Thread Achim Gratz
Gary E. Miller writes: > So, any preferences for different and dsescription names that > do not conflict with the misleading *BSD names? Use a namespace specific to NTP(sec) for all defines. *ducks* Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory

Re: Cruft: There are 3 routines that convert time_t to text

2017-03-15 Thread Eric S. Raymond
Hal Murray : > A cleanup opportunity. > > fstostr in ntp_util only called from within ntp_util but defined in ntpd.h > %04d%02d%02d%02d%02d > > lstostr in ntp_leapsec only called from within ntp_leapsec > %04d-%02d-%02dT%02d:%02dZ > > ctl_putfs in ntp_control only called from within ntp_cont

Re: Where does waf configure save the working directory?

2017-03-15 Thread Eric S. Raymond
Hal Murray : > > ./waf configure --out=xxx > saves the xxx someplace. Following waf builds or checks use that directory. > > I'd like to have more than one directory in-progress at the same time and > switch to the desired one. Is that possible? How? I don't know how to do this. It is pos

Re: Information lost when switching to buildprep

2017-03-15 Thread Jason Azze
On Wed, Mar 15, 2017 at 10:04 AM, Eric S. Raymond wrote: > It is now. Also I've broken up the main sequence into daemon, tools, and > ntpviz components. If you want to add options to suppress any of these, > feel free. This makes me happy. Gary and I had this IRC discussion yesterday. On a f

Re: Information lost when switching to buildprep

2017-03-15 Thread Eric S. Raymond
Hal Murray : > The old text in INSTALL had comments about something being needed at run time > or only at build tiime. That information is no longer in buildprep. It is now. Also I've broken up the main sequence into daemon, tools, and ntpviz components. If you want to add options to suppress