From 3cd804e0e083de6da76a8ed9280f4dacfbc7a053 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 24 Jul 2024 23:56:33 +0200 Subject: [PATCH] Avoid false localeconv_used_without_requesting_gnulib_module_localeconv. * modules/localeconv (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/locale.in.h (localeconv): Don't define to localeconv_used_without_requesting_gnulib_module_localeconv if the gnulib module 'localeconv' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/locale.in.h | 6 ++++-- modules/localeconv | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f7fa81cbd..4d1962472c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible + Avoid false localeconv_used_without_requesting_gnulib_module_localeconv. + * modules/localeconv (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/locale.in.h (localeconv): Don't define to + localeconv_used_without_requesting_gnulib_module_localeconv if the + gnulib module 'localeconv' is in use under the same configure.ac. + Avoid false gethostname_used_without_requesting_gnulib_module_gethostname. * modules/gethostname (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/unistd.in.h (gethostname): Don't define to diff --git a/lib/locale.in.h b/lib/locale.in.h index bda07c9326..3e0b42e409 100644 --- a/lib/locale.in.h +++ b/lib/locale.in.h @@ -177,8 +177,10 @@ _GL_CXXALIAS_SYS (localeconv, struct lconv *, (void)); _GL_CXXALIASWARN (localeconv); # endif #elif @REPLACE_STRUCT_LCONV@ -# undef localeconv -# define localeconv localeconv_used_without_requesting_gnulib_module_localeconv +# if !GNULIB_LOCALECONV +# undef localeconv +# define localeconv localeconv_used_without_requesting_gnulib_module_localeconv +# endif #elif defined GNULIB_POSIXCHECK # undef localeconv # if HAVE_RAW_DECL_LOCALECONV diff --git a/modules/localeconv b/modules/localeconv index 04ac36ed79..3f22cafa36 100644 --- a/modules/localeconv +++ b/modules/localeconv @@ -16,6 +16,7 @@ AM_COND_IF([GL_COND_OBJ_LOCALECONV], [ gl_PREREQ_LOCALECONV ]) gl_LOCALE_MODULE_INDICATOR([localeconv]) +gl_MODULE_INDICATOR([localeconv]) Makefile.am: if GL_COND_OBJ_LOCALECONV -- 2.39.5