bug-gnulib
[Top][All Lists]
Advanced

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

Re: libc-config.h + cdefs.h


From: Gisle Vanem
Subject: Re: libc-config.h + cdefs.h
Date: Mon, 18 Sep 2017 19:38:32 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

Bruno Haible wrote:

There are some other trivial stuff in:
    ./lib/count-leading-zeros.h
    ./lib/count-one-bits.h
    ./lib/iconv.in.h
    ./lib/inttypes.in.h
    ./lib/localtime-buffer.c

which I'll come back to.

Huh? There were no issues with MSVC 14 in these places in my latest round
of testing [1]. Please give details.

I'm wondering about stuff like this; in inttypes.h.in (line 1093):

  _GL_CXXALIAS_RPL (strtoimax, intmax_t, (const char *, char **, int));
  # else
  #  if address@hidden@
  #   undef strtoimax
  _GL_FUNCDECL_SYS (strtoimax, intmax_t,
                    (const char *, char **, int) _GL_ARG_NONNULL ((1)));
  #  endif

Why is there a '#undef strtoimax' if there is *NO* declaration for
'strtoimax()'? Isn't 'HAVE_DECL_STRTOIMAX' supposed to be TRUE is so?

If it was vice-versa:
  #  if @HAVE_DECL_STRTOIMAX@
  #   undef strtoimax
  _GL_FUNCDECL_SYS (strtoimax, intmax_t,
                    (const char *, char **, int) _GL_ARG_NONNULL ((1)));
  #  endif

I'd understand it better. Ditto for 'strtoumax()'.

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.

--
--gv



reply via email to

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