From 1ca662cc5169ddc9e8912d58aefd9d55d807b650 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 25 Jul 2024 00:30:26 +0200 Subject: [PATCH] Avoid false stat_used_without_requesting_gnulib_module_stat. * modules/stat (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_stat.in.h (stat): Don't define to stat_used_without_requesting_gnulib_module_stat if the gnulib module 'stat' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_stat.in.h | 8 +++++--- modules/stat | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4d2ab215e1..7abdc482c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible + Avoid false stat_used_without_requesting_gnulib_module_stat. + * modules/stat (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_stat.in.h (stat): Don't define to + stat_used_without_requesting_gnulib_module_stat if the gnulib module + 'stat' is in use under the same configure.ac. + Avoid false ioctl_used_without_requesting_gnulib_module_ioctl. * modules/ioctl (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_ioctl.in.h (ioctl): Don't define to diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index bf08f33536..cc41875442 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -122,9 +122,11 @@ # if @GNULIB_STAT@ # define stat rpl_stat # else - /* Provoke a clear link error if stat() is used as a function and - module 'stat' is not in use. */ -# define stat stat_used_without_requesting_gnulib_module_stat +# if !GNULIB_STAT + /* Provoke a clear link error if stat() is used as a function and + module 'stat' is not in use. */ +# define stat stat_used_without_requesting_gnulib_module_stat +# endif # endif # if !GNULIB_defined_struct_stat diff --git a/modules/stat b/modules/stat index b6b7d28722..ae8c2c1f9e 100644 --- a/modules/stat +++ b/modules/stat @@ -29,6 +29,7 @@ AM_COND_IF([GL_COND_OBJ_STAT], [ gl_PREREQ_STAT ]) gl_SYS_STAT_MODULE_INDICATOR([stat]) +gl_MODULE_INDICATOR([stat]) Makefile.am: if GL_COND_OBJ_STAT -- 2.39.5