[lttng-dev] [Babeltrace RFC PATCH 12/28] Add MinGW implementation of localtime_r
Jérémie Galarneau
jeremie.galarneau at efficios.com
Mon May 13 16:20:51 EDT 2013
On Thu, May 2, 2013 at 7:53 AM, Ikaheimonen, JP
<jp_ikaheimonen at mentor.com> wrote:
> ---
> include/babeltrace/compat/time.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/babeltrace/compat/time.h b/include/babeltrace/compat/time.h
> index ccfc860..d5cb7fd 100644
> --- a/include/babeltrace/compat/time.h
> +++ b/include/babeltrace/compat/time.h
> @@ -15,5 +15,13 @@ struct tm *gmtime_r(const time_t *timep, struct tm *result)
> return result;
> }
>
> +static inline
> +struct tm *localtime_r(const time_t *timep, struct tm *result)
> +{
> + struct tm * r;
> + r = localtime(timep);
> + memcpy(result, r, sizeof (struct tm));
> + return result;
> +}
Why not use localtime_s?
> #endif
> #endif
> --
> 1.8.1.msysgit.1
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list