From 2b038f1cc7e9a7e0a6257527a127a87753fc794c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 2 Apr 2021 20:56:28 +0200 Subject: [PATCH] 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 b479574576..6224aa7cb5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +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. diff --git a/lib/strtol.c b/lib/strtol.c index c30e5b45e9..c904482ac1 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.39.5