>From 2b038f1cc7e9a7e0a6257527a127a87753fc794c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 2 Apr 2021 20:56:28 +0200 Subject: [PATCH 7/7] strtoul, strtoll, strtoull: Fix compilation warning. * lib/strtol.c (strtol): Undefine before defining as a macro. --- ChangeLog | 5 +++++ lib/strtol.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index b479574..6224aa7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2021-04-02 Bruno Haible + strtoul, strtoll, strtoull: Fix compilation warning. + * lib/strtol.c (strtol): Undefine before defining as a macro. + +2021-04-02 Bruno Haible + strtoll: Work around a bug on native Windows and Minix. * lib/stdlib.in.h (strtoll): Override if REPLACE_STRTOLL is 1. * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_STRTOLL. diff --git a/lib/strtol.c b/lib/strtol.c index c30e5b4..c904482 100644 --- a/lib/strtol.c +++ b/lib/strtol.c @@ -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 @@ -104,6 +107,7 @@ # endif # else # ifdef QUAD +# undef strtol # define strtol strtoll # endif # endif -- 2.7.4