]> Savannah Git Hosting - gnulib.git/commitdiff
strtoul, strtoll, strtoull: Fix compilation warning.
authorBruno Haible <bruno@clisp.org>
Fri, 2 Apr 2021 18:56:28 +0000 (20:56 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 2 Apr 2021 18:56:28 +0000 (20:56 +0200)
* lib/strtol.c (strtol): Undefine before defining as a macro.

ChangeLog
lib/strtol.c

index b47957457604ef242e7b590dd17bc4b73a443aa6..6224aa7cb54f6fbfca5956f2294cf1677ef5290f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-04-02  Bruno Haible  <bruno@clisp.org>
+
+       strtoul, strtoll, strtoull: Fix compilation warning.
+       * lib/strtol.c (strtol): Undefine before defining as a macro.
+
 2021-04-02  Bruno Haible  <bruno@clisp.org>
 
        strtoll: Work around a bug on native Windows and Minix.
index c30e5b45e9218204b797ed68a379d196a3b77913..c904482ac1cbc635089b824c0104b05aa531c850 100644 (file)
@@ -51,6 +51,7 @@
 
 /* Determine the name.  */
 #ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# undef strtol
 # if UNSIGNED
 #  ifdef USE_WIDE_CHAR
 #   ifdef QUAD
@@ -82,6 +83,7 @@
 # endif
 #else
 # if UNSIGNED
+#  undef strtol
 #  ifdef USE_WIDE_CHAR
 #   ifdef QUAD
 #    define strtol wcstoull
@@ -97,6 +99,7 @@
 #  endif
 # else
 #  ifdef USE_WIDE_CHAR
+#   undef strtol
 #   ifdef QUAD
 #    define strtol wcstoll
 #   else
 #   endif
 #  else
 #   ifdef QUAD
+#    undef strtol
 #    define strtol strtoll
 #   endif
 #  endif