From 8e771821ac57d404132829ee4604e23853dc9ee6 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 14 Dec 2019 14:33:14 +0100 Subject: [PATCH] locale, duplocale, localename: Fix last patch. Reported by Daniel Richard G. in . * lib/locale.in.h (HAVE_WORKING_NEWLOCALE, HAVE_WORKING_DUPLOCALE): Don't define if locale_t does not exist. --- ChangeLog | 8 ++++++++ lib/locale.in.h | 12 ++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e1b9d5340..ab13542ec0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2019-12-14 Bruno Haible + + locale, duplocale, localename: Fix last patch. + Reported by Daniel Richard G. in + . + * lib/locale.in.h (HAVE_WORKING_NEWLOCALE, HAVE_WORKING_DUPLOCALE): + Don't define if locale_t does not exist. + 2019-12-13 Bruno Haible locale, duplocale, localename: Fix errors if locale_t does not exist. diff --git a/lib/locale.in.h b/lib/locale.in.h index c0915a5ac6..9e897a3ea0 100644 --- a/lib/locale.in.h +++ b/lib/locale.in.h @@ -227,8 +227,10 @@ _GL_CXXALIAS_SYS (newlocale, locale_t, # if @HAVE_NEWLOCALE@ _GL_CXXALIASWARN (newlocale); # endif -# ifndef HAVE_WORKING_NEWLOCALE -# define HAVE_WORKING_NEWLOCALE 1 +# if @HAVE_NEWLOCALE@ || @REPLACE_NEWLOCALE@ +# ifndef HAVE_WORKING_NEWLOCALE +# define HAVE_WORKING_NEWLOCALE 1 +# endif # endif #elif defined GNULIB_POSIXCHECK # undef newlocale @@ -254,8 +256,10 @@ _GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale)); # if @HAVE_DUPLOCALE@ _GL_CXXALIASWARN (duplocale); # endif -# ifndef HAVE_WORKING_DUPLOCALE -# define HAVE_WORKING_DUPLOCALE 1 +# if @HAVE_DUPLOCALE@ || @REPLACE_DUPLOCALE@ +# ifndef HAVE_WORKING_DUPLOCALE +# define HAVE_WORKING_DUPLOCALE 1 +# endif # endif #elif defined GNULIB_POSIXCHECK # undef duplocale -- 2.39.5