Cross-compiling update.

Joel Sherrill joel at rtems.org
Fri Jan 15 20:06:31 UTC 2016


Do not use gmtime. Use gmtime_r.

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.

--joel

On Thu, Jan 14, 2016 at 9:04 PM, Hal Murray <hmurray at megapathdsl.net> wrote:

>
> verm at darkbeer.org said:
> > This is more work than I was expecting I was nearly done but
> (re)discovered
> > that  keyword-gen uses libntp!
>
> Will it simplify things if I fix that?
>
>
> > I also discovered one quirk by accident when compiling for ARM:
> >   37:#error libntp supplied mktime()/timegm() do not support 64-bit
> time_t
> > I wonder how often users will hit that?
>
> How did you generate that error?
>
> Do we really need our copy of mktime and timegm?  Is that one more piece of
> cruft we can get rid of?
>
> grep says that timegm isn't used.
>
> My Linux man page says:
>    Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
>        asctime_r(), ctime_r(), gmtime_r(), localtime_r():
>               _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _BSD_SOURCE ||
>               _SVID_SOURCE || _POSIX_SOURCE
>
> I think that means if we are assuming POSIX, gmtime will be there.
>
>
>
> --
> These are my opinions.  I hate spam.
>
>
>
> _______________________________________________
> devel mailing list
> devel at ntpsec.org
> http://lists.ntpsec.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/devel/attachments/20160115/5a01bd36/attachment.html>


More information about the devel mailing list