<div dir="ltr"><p dir="ltr" style="font-size:12.8px">Do not use gmtime. Use gmtime_r.</p><p dir="ltr" style="font-size:12.8px">As a rule, never use a method when there is a version with _r in the standard. The version without _r is not thread safe.</p><p dir="ltr" style="font-size:12.8px"><span style="font-size:12.8px">--joel</span><br></p></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 14, 2016 at 9:04 PM, Hal Murray <span dir="ltr"><<a href="mailto:hmurray@megapathdsl.net" target="_blank">hmurray@megapathdsl.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<a href="mailto:verm@darkbeer.org">verm@darkbeer.org</a> said:<br>
> This is more work than I was expecting I was nearly done but (re)discovered<br>
> that keyword-gen uses libntp!<br>
<br>
</span>Will it simplify things if I fix that?<br>
<span class=""><br>
<br>
> I also discovered one quirk by accident when compiling for ARM:<br>
> 37:#error libntp supplied mktime()/timegm() do not support 64-bit time_t<br>
> I wonder how often users will hit that?<br>
<br>
</span>How did you generate that error?<br>
<br>
Do we really need our copy of mktime and timegm? Is that one more piece of<br>
cruft we can get rid of?<br>
<br>
grep says that timegm isn't used.<br>
<br>
My Linux man page says:<br>
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):<br>
asctime_r(), ctime_r(), gmtime_r(), localtime_r():<br>
_POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _BSD_SOURCE ||<br>
_SVID_SOURCE || _POSIX_SOURCE<br>
<br>
I think that means if we are assuming POSIX, gmtime will be there.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
These are my opinions. I hate spam.<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@ntpsec.org">devel@ntpsec.org</a><br>
<a href="http://lists.ntpsec.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.ntpsec.org/mailman/listinfo/devel</a><br>
</div></div></blockquote></div><br></div>