bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: localtime-buffer and MSVC


From: Bruno Haible
Subject: Re: localtime-buffer and MSVC
Date: Mon, 18 Sep 2017 22:05:16 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-93-generic; KDE/5.18.0; x86_64; ; )

Gisle Vanem wrote:
> Also an issue with localtime-buffer.c. From MSVC:
>    localtime-buffer.c(46) : warning C4717: 'rpl_localtime': recursive on all 
> control paths,
>      function will cause runtime stack overflow
>    localtime-buffer.c(56) : warning C4717: 'rpl_gmtime': recursive on all 
> control paths,
>      function will cause runtime stack overflow
> 
> But if I patch:
> --- a/lib/localtime-buffer.c 2017-09-18 14:33:43
> +++ b/lib/localtime-buffer.c 2017-09-18 17:29:38
> @@ -32,6 +32,9 @@
>      On the first call, record the address of the static buffer that
>      localtime uses for its result.  */
> 
> +#undef localtime
> +#undef gmtime
> +
>   struct tm *
>   rpl_localtime (time_t const *timep)
>   {
> 
> there's no warning.

What's the result of 'grep LOCALTIME config.status' in your case?

I got:
S["REPLACE_LOCALTIME"]="1"
S["REPLACE_LOCALTIME_R"]="GNULIB_PORTCHECK"
S["HAVE_DECL_LOCALTIME_R"]="0"
S["GNULIB_LOCALTIME"]="1"
D["GNULIB_TEST_LOCALTIME"]=" 1"
D["HAVE_DECL_LOCALTIME_R"]=" 0"

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]