And the same thing for all other *_used_without_requesting_gnulib_module_* symbols.
2024-07-24 Bruno Haible <br...@clisp.org> Avoid false select_used_without_requesting_gnulib_module_select. * modules/select (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_select.in.h (select): Don't define to select_used_without_requesting_gnulib_module_select if the gnulib module 'select' is in use under the same configure.ac. Avoid false shutdown_used_without_requesting_gnulib_module_shutdown. * modules/shutdown (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (shutdown): Don't define to shutdown_used_without_requesting_gnulib_module_shutdown if the gnulib module 'shutdown' is in use under the same configure.ac. Avoid false setsockopt_used_without_requesting_gnulib_module_setsockopt. * modules/setsockopt (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (setsockopt): Don't define to setsockopt_used_without_requesting_gnulib_module_setsockopt if the gnulib module 'setsockopt' is in use under the same configure.ac. Avoid false sendto_used_without_requesting_gnulib_module_sendto. * modules/sendto (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (sendto): Don't define to sendto_used_without_requesting_gnulib_module_sendto if the gnulib module 'sendto' is in use under the same configure.ac. Avoid false recvfrom_used_without_requesting_gnulib_module_recvfrom. * modules/recvfrom (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (recvfrom): Don't define to recvfrom_used_without_requesting_gnulib_module_recvfrom if the gnulib module 'recvfrom' is in use under the same configure.ac. Avoid false send_used_without_requesting_gnulib_module_send. * modules/send (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (send): Don't define to send_used_without_requesting_gnulib_module_send if the gnulib module 'send' is in use under the same configure.ac. Avoid false recv_used_without_requesting_gnulib_module_recv. * modules/recv (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (recv): Don't define to recv_used_without_requesting_gnulib_module_recv if the gnulib module 'recv' is in use under the same configure.ac. Avoid false listen_used_without_requesting_gnulib_module_listen. * modules/listen (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (listen): Don't define to listen_used_without_requesting_gnulib_module_listen if the gnulib module 'listen' is in use under the same configure.ac. Avoid false getsockopt_used_without_requesting_gnulib_module_getsockopt. * modules/getsockopt (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (getsockopt): Don't define to getsockopt_used_without_requesting_gnulib_module_getsockopt if the gnulib module 'getsockopt' is in use under the same configure.ac. Avoid false getsockname_used_without_requesting_gnulib_module_getsockname. * modules/getsockname (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (getsockname): Don't define to getsockname_used_without_requesting_gnulib_module_getsockname if the gnulib module 'getsockname' is in use under the same configure.ac. Avoid false getpeername_used_without_requesting_gnulib_module_getpeername. * modules/getpeername (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (getpeername): Don't define to getpeername_used_without_requesting_gnulib_module_getpeername if the gnulib module 'getpeername' is in use under the same configure.ac. Avoid false bind_used_without_requesting_gnulib_module_bind. * modules/bind (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (bind): Don't define to bind_used_without_requesting_gnulib_module_bind if the gnulib module 'bind' is in use under the same configure.ac. Avoid false accept_used_without_requesting_gnulib_module_accept. * modules/accept (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (accept): Don't define to accept_used_without_requesting_gnulib_module_accept if the gnulib module 'accept' is in use under the same configure.ac. Avoid false socket_used_without_requesting_gnulib_module_connect. * modules/connect (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (connect): Don't define to socket_used_without_requesting_gnulib_module_connect if the gnulib module 'connect' is in use under the same configure.ac. Fix typo. Avoid false socket_used_without_requesting_gnulib_module_socket. * modules/socket (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (socket): Don't define to socket_used_without_requesting_gnulib_module_socket if the gnulib module 'socket' is in use under the same configure.ac. Avoid false lstat_used_without_requesting_gnulib_module_lstat. * modules/lstat (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_stat.in.h (lstat): Don't define to lstat_used_without_requesting_gnulib_module_lstat if the gnulib module 'lstat' is in use under the same configure.ac. Avoid false fstatat_used_without_requesting_gnulib_module_fstatat. * modules/fstatat (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_stat.in.h (fstatat): Don't define to fstatat_used_without_requesting_gnulib_module_fstatat if the gnulib module 'fstatat' is in use under the same configure.ac. Avoid false fstat_used_without_requesting_gnulib_module_fstat. * modules/fstat (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_stat.in.h (fstat): Don't define to fstat_used_without_requesting_gnulib_module_fstat if the gnulib module 'fstat' is in use under the same configure.ac. 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 ioctl_used_without_requesting_gnulib_module_ioctl if the gnulib module 'ioctl' is in use under the same configure.ac. 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 gethostname_used_without_requesting_gnulib_module_gethostname if the gnulib module 'gethostname' is in use under the same configure.ac.
From 13d27751ecb30939a6b5d790de738f6ff49f28ed Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Wed, 24 Jul 2024 23:53:53 +0200 Subject: [PATCH 01/22] 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 gethostname_used_without_requesting_gnulib_module_gethostname if the gnulib module 'gethostname' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/unistd.in.h | 6 ++++-- modules/gethostname | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e874cdc003..b4669045f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + 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 + gethostname_used_without_requesting_gnulib_module_gethostname if the + gnulib module 'gethostname' is in use under the same configure.ac. + Avoid false error close_used_without_requesting_gnulib_module_close. Reported by Frédéric at <https://savannah.gnu.org/bugs/?65958>. * modules/close (configure.ac): Invoke gl_MODULE_INDICATOR. diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 688988e9e2..9ca377c4df 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -1318,8 +1318,10 @@ _GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); # endif _GL_CXXALIASWARN (gethostname); #elif @UNISTD_H_HAVE_WINSOCK2_H@ -# undef gethostname -# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname +# if !GNULIB_GETHOSTNAME +# undef gethostname +# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname +# endif #elif defined GNULIB_POSIXCHECK # undef gethostname # if HAVE_RAW_DECL_GETHOSTNAME diff --git a/modules/gethostname b/modules/gethostname index 94151cd8b0..8523a8e944 100644 --- a/modules/gethostname +++ b/modules/gethostname @@ -20,6 +20,7 @@ AM_COND_IF([GL_COND_OBJ_GETHOSTNAME], [ gl_PREREQ_GETHOSTNAME ]) gl_UNISTD_MODULE_INDICATOR([gethostname]) +gl_MODULE_INDICATOR([gethostname]) Makefile.am: if GL_COND_OBJ_GETHOSTNAME -- 2.34.1
>From 91132b444b897e3cdd07a3474b7c10f45f0c6ea4 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Wed, 24 Jul 2024 23:56:33 +0200 Subject: [PATCH 02/22] 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 b4669045f7..772a0193cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + 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 1b11a41c4d..db9ae8bb20 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.34.1
>From fb1bca60795470ab5c8da3cb4079ba2e2c48a3c8 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Wed, 24 Jul 2024 23:59:15 +0200 Subject: [PATCH 03/22] 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 ioctl_used_without_requesting_gnulib_module_ioctl if the gnulib module 'ioctl' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_ioctl.in.h | 6 ++++-- modules/ioctl | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 772a0193cf..9be118962b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + 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 + ioctl_used_without_requesting_gnulib_module_ioctl if the gnulib module + 'ioctl' is in use under the same configure.ac. + 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 diff --git a/lib/sys_ioctl.in.h b/lib/sys_ioctl.in.h index 787d35f75b..5d031da944 100644 --- a/lib/sys_ioctl.in.h +++ b/lib/sys_ioctl.in.h @@ -71,8 +71,10 @@ _GL_CXXALIAS_SYS (ioctl, int, _GL_CXXALIASWARN (ioctl); # endif #elif @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ -# undef ioctl -# define ioctl ioctl_used_without_requesting_gnulib_module_ioctl +# if !GNULIB_IOCTL +# undef ioctl +# define ioctl ioctl_used_without_requesting_gnulib_module_ioctl +# endif #elif defined GNULIB_POSIXCHECK # undef ioctl # if HAVE_RAW_DECL_IOCTL diff --git a/modules/ioctl b/modules/ioctl index a862891bc6..422f25d776 100644 --- a/modules/ioctl +++ b/modules/ioctl @@ -18,6 +18,7 @@ gl_FUNC_IOCTL gl_CONDITIONAL([GL_COND_OBJ_IOCTL], [test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1]) gl_SYS_IOCTL_MODULE_INDICATOR([ioctl]) +gl_MODULE_INDICATOR([ioctl]) Makefile.am: if GL_COND_OBJ_IOCTL -- 2.34.1
>From 5400deaa4dc5c78ab7ca90f94ac3131db44093aa Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 00:30:26 +0200 Subject: [PATCH 04/22] 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 9be118962b..27dbf86998 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + 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.34.1
>From 9ef247bfa67637fa0728528c8ee588f6df97324d Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 00:32:26 +0200 Subject: [PATCH 05/22] Avoid false fstat_used_without_requesting_gnulib_module_fstat. * modules/fstat (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_stat.in.h (fstat): Don't define to fstat_used_without_requesting_gnulib_module_fstat if the gnulib module 'fstat' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_stat.in.h | 6 ++++-- modules/fstat | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 27dbf86998..b164d56e07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + Avoid false fstat_used_without_requesting_gnulib_module_fstat. + * modules/fstat (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_stat.in.h (fstat): Don't define to + fstat_used_without_requesting_gnulib_module_fstat if the gnulib module + 'fstat' is in use under the same configure.ac. + 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 diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index cc41875442..4f2fb06417 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -518,8 +518,10 @@ _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); _GL_CXXALIASWARN (fstat); # endif #elif @GNULIB_OVERRIDES_STRUCT_STAT@ -# undef fstat -# define fstat fstat_used_without_requesting_gnulib_module_fstat +# if !GNULIB_FSTAT +# undef fstat +# define fstat fstat_used_without_requesting_gnulib_module_fstat +# endif #elif @WINDOWS_64_BIT_ST_SIZE@ /* Above, we define stat to _stati64. */ # define fstat _fstati64 diff --git a/modules/fstat b/modules/fstat index ddc26eb6f6..0c168a7bcd 100644 --- a/modules/fstat +++ b/modules/fstat @@ -29,6 +29,7 @@ AM_COND_IF([GL_COND_OBJ_FSTAT], [ gl_PREREQ_FSTAT ]) gl_SYS_STAT_MODULE_INDICATOR([fstat]) +gl_MODULE_INDICATOR([fstat]) Makefile.am: if GL_COND_OBJ_FSTAT -- 2.34.1
>From 5d8a6fb480d0fdf80fcc17c80ef61ff2569ac712 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 00:34:09 +0200 Subject: [PATCH 06/22] Avoid false fstatat_used_without_requesting_gnulib_module_fstatat. * modules/fstatat (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_stat.in.h (fstatat): Don't define to fstatat_used_without_requesting_gnulib_module_fstatat if the gnulib module 'fstatat' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_stat.in.h | 6 ++++-- modules/fstatat | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b164d56e07..14666613eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + Avoid false fstatat_used_without_requesting_gnulib_module_fstatat. + * modules/fstatat (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_stat.in.h (fstatat): Don't define to + fstatat_used_without_requesting_gnulib_module_fstatat if the gnulib + module 'fstatat' is in use under the same configure.ac. + Avoid false fstat_used_without_requesting_gnulib_module_fstat. * modules/fstat (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_stat.in.h (fstat): Don't define to diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 4f2fb06417..18225df7f6 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -560,8 +560,10 @@ _GL_CXXALIAS_SYS (fstatat, int, # endif _GL_CXXALIASWARN (fstatat); #elif @GNULIB_OVERRIDES_STRUCT_STAT@ -# undef fstatat -# define fstatat fstatat_used_without_requesting_gnulib_module_fstatat +# if !GNULIB_FSTATAT +# undef fstatat +# define fstatat fstatat_used_without_requesting_gnulib_module_fstatat +# endif #elif defined GNULIB_POSIXCHECK # undef fstatat # if HAVE_RAW_DECL_FSTATAT diff --git a/modules/fstatat b/modules/fstatat index c2c12c6112..6ad36d1b82 100644 --- a/modules/fstatat +++ b/modules/fstatat @@ -28,6 +28,7 @@ gl_FUNC_FSTATAT gl_CONDITIONAL([GL_COND_OBJ_FSTATAT], [test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1]) gl_SYS_STAT_MODULE_INDICATOR([fstatat]) +gl_MODULE_INDICATOR([fstatat]) Makefile.am: if GL_COND_OBJ_FSTATAT -- 2.34.1
>From 5421365609784e7da2d1c40482007bb36776158d Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 00:36:01 +0200 Subject: [PATCH 07/22] Avoid false lstat_used_without_requesting_gnulib_module_lstat. * modules/lstat (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_stat.in.h (lstat): Don't define to lstat_used_without_requesting_gnulib_module_lstat if the gnulib module 'lstat' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_stat.in.h | 6 ++++-- modules/lstat | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 14666613eb..f827960cb6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + Avoid false lstat_used_without_requesting_gnulib_module_lstat. + * modules/lstat (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_stat.in.h (lstat): Don't define to + lstat_used_without_requesting_gnulib_module_lstat if the gnulib module + 'lstat' is in use under the same configure.ac. + Avoid false fstatat_used_without_requesting_gnulib_module_fstatat. * modules/fstatat (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_stat.in.h (fstatat): Don't define to diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 18225df7f6..820c1087f7 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -934,8 +934,10 @@ _GL_CXXALIAS_SYS (lstat, int, _GL_CXXALIASWARN (lstat); # endif #elif @GNULIB_OVERRIDES_STRUCT_STAT@ -# undef lstat -# define lstat lstat_used_without_requesting_gnulib_module_lstat +# if !GNULIB_LSTAT +# undef lstat +# define lstat lstat_used_without_requesting_gnulib_module_lstat +# endif #elif defined GNULIB_POSIXCHECK # undef lstat # if HAVE_RAW_DECL_LSTAT diff --git a/modules/lstat b/modules/lstat index c6bb4b85c3..e89d158fc1 100644 --- a/modules/lstat +++ b/modules/lstat @@ -18,6 +18,7 @@ AM_COND_IF([GL_COND_OBJ_LSTAT], [ gl_PREREQ_LSTAT ]) gl_SYS_STAT_MODULE_INDICATOR([lstat]) +gl_MODULE_INDICATOR([lstat]) Makefile.am: if GL_COND_OBJ_LSTAT -- 2.34.1
>From 9fe654a2a4372606b6bb9f1d58953f4beab1cd7a Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 00:38:08 +0200 Subject: [PATCH 08/22] Avoid false socket_used_without_requesting_gnulib_module_socket. * modules/socket (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (socket): Don't define to socket_used_without_requesting_gnulib_module_socket if the gnulib module 'socket' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_socket.in.h | 6 ++++-- modules/socket | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f827960cb6..e557166de6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + Avoid false socket_used_without_requesting_gnulib_module_socket. + * modules/socket (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (socket): Don't define to + socket_used_without_requesting_gnulib_module_socket if the gnulib module + 'socket' is in use under the same configure.ac. + Avoid false lstat_used_without_requesting_gnulib_module_lstat. * modules/lstat (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_stat.in.h (lstat): Don't define to diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index 13833c0fa6..28b2d6c0e0 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -296,8 +296,10 @@ _GL_CXXALIAS_SYS (socket, int, (int domain, int type, int protocol)); # endif _GL_CXXALIASWARN (socket); #elif @HAVE_WINSOCK2_H@ -# undef socket -# define socket socket_used_without_requesting_gnulib_module_socket +# if !GNULIB_SOCKET +# undef socket +# define socket socket_used_without_requesting_gnulib_module_socket +# endif #elif defined GNULIB_POSIXCHECK # undef socket # if HAVE_RAW_DECL_SOCKET diff --git a/modules/socket b/modules/socket index 3670c6b839..a67025aa6b 100644 --- a/modules/socket +++ b/modules/socket @@ -25,6 +25,7 @@ if test "$ac_cv_header_winsock2_h" = yes; then SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1 fi gl_SYS_SOCKET_MODULE_INDICATOR([socket]) +gl_MODULE_INDICATOR([socket]) Makefile.am: if GL_COND_OBJ_SOCKET -- 2.34.1
>From b4b5d07e133cc4c9a5e92171d436622dc3dc7280 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 00:41:00 +0200 Subject: [PATCH 09/22] Avoid false socket_used_without_requesting_gnulib_module_connect. * modules/connect (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (connect): Don't define to socket_used_without_requesting_gnulib_module_connect if the gnulib module 'connect' is in use under the same configure.ac. Fix typo. --- ChangeLog | 6 ++++++ lib/sys_socket.in.h | 6 ++++-- modules/connect | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e557166de6..1de3fd38e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + Avoid false socket_used_without_requesting_gnulib_module_connect. + * modules/connect (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (connect): Don't define to + socket_used_without_requesting_gnulib_module_connect if the gnulib + module 'connect' is in use under the same configure.ac. Fix typo. + Avoid false socket_used_without_requesting_gnulib_module_socket. * modules/socket (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (socket): Don't define to diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index 28b2d6c0e0..19c919c131 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -328,8 +328,10 @@ _GL_CXXALIAS_SYS_CAST (connect, int, # endif _GL_CXXALIASWARN (connect); #elif @HAVE_WINSOCK2_H@ -# undef connect -# define connect socket_used_without_requesting_gnulib_module_connect +# if !GNULIB_CONNECT +# undef connect +# define connect connect_used_without_requesting_gnulib_module_connect +# endif #elif defined GNULIB_POSIXCHECK # undef connect # if HAVE_RAW_DECL_CONNECT diff --git a/modules/connect b/modules/connect index cd21697b75..d56088f30f 100644 --- a/modules/connect +++ b/modules/connect @@ -15,6 +15,7 @@ configure.ac: AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_CONNECT], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([connect]) +gl_MODULE_INDICATOR([connect]) Makefile.am: if GL_COND_OBJ_CONNECT -- 2.34.1
>From d86c958f2cb54e90eede7ec7b0b58b12e33234b3 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 00:47:45 +0200 Subject: [PATCH 10/22] Avoid false accept_used_without_requesting_gnulib_module_accept. * modules/accept (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (accept): Don't define to accept_used_without_requesting_gnulib_module_accept if the gnulib module 'accept' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_socket.in.h | 6 ++++-- modules/accept | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1de3fd38e5..5bfb08662e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + Avoid false accept_used_without_requesting_gnulib_module_accept. + * modules/accept (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (accept): Don't define to + accept_used_without_requesting_gnulib_module_accept if the gnulib module + 'accept' is in use under the same configure.ac. + Avoid false socket_used_without_requesting_gnulib_module_connect. * modules/connect (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (connect): Don't define to diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index 19c919c131..cf20718ade 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -366,8 +366,10 @@ _GL_CXXALIAS_SYS_CAST (accept, int, _GL_CXXALIASWARN (accept); # endif #elif @HAVE_WINSOCK2_H@ -# undef accept -# define accept accept_used_without_requesting_gnulib_module_accept +# if !GNULIB_ACCEPT +# undef accept +# define accept accept_used_without_requesting_gnulib_module_accept +# endif #elif defined GNULIB_POSIXCHECK # undef accept # if HAVE_RAW_DECL_ACCEPT diff --git a/modules/accept b/modules/accept index 483b5364ec..875d90cadb 100644 --- a/modules/accept +++ b/modules/accept @@ -16,6 +16,7 @@ configure.ac: AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_ACCEPT], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([accept]) +gl_MODULE_INDICATOR([accept]) Makefile.am: if GL_COND_OBJ_ACCEPT -- 2.34.1
>From 4844c04339f74b3812f0a1d952b99c263b3a9a8e Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 00:49:21 +0200 Subject: [PATCH 11/22] Avoid false bind_used_without_requesting_gnulib_module_bind. * modules/bind (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (bind): Don't define to bind_used_without_requesting_gnulib_module_bind if the gnulib module 'bind' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_socket.in.h | 6 ++++-- modules/bind | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5bfb08662e..9d63b78e25 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + Avoid false bind_used_without_requesting_gnulib_module_bind. + * modules/bind (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (bind): Don't define to + bind_used_without_requesting_gnulib_module_bind if the gnulib module + 'bind' is in use under the same configure.ac. + Avoid false accept_used_without_requesting_gnulib_module_accept. * modules/accept (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (accept): Don't define to diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index cf20718ade..bc57bd2b9e 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -398,8 +398,10 @@ _GL_CXXALIAS_SYS_CAST (bind, int, # endif _GL_CXXALIASWARN (bind); #elif @HAVE_WINSOCK2_H@ -# undef bind -# define bind bind_used_without_requesting_gnulib_module_bind +# if !GNULIB_BIND +# undef bind +# define bind bind_used_without_requesting_gnulib_module_bind +# endif #elif defined GNULIB_POSIXCHECK # undef bind # if HAVE_RAW_DECL_BIND diff --git a/modules/bind b/modules/bind index f58407830e..6d2b888b0d 100644 --- a/modules/bind +++ b/modules/bind @@ -15,6 +15,7 @@ configure.ac: AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_BIND], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([bind]) +gl_MODULE_INDICATOR([bind]) Makefile.am: if GL_COND_OBJ_BIND -- 2.34.1
>From 46e2f8969753f3dc6d775469141805e03eaacf10 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 00:51:27 +0200 Subject: [PATCH 12/22] Avoid false getpeername_used_without_requesting_gnulib_module_getpeername. * modules/getpeername (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (getpeername): Don't define to getpeername_used_without_requesting_gnulib_module_getpeername if the gnulib module 'getpeername' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_socket.in.h | 6 ++++-- modules/getpeername | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9d63b78e25..81008a440d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + Avoid false getpeername_used_without_requesting_gnulib_module_getpeername. + * modules/getpeername (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (getpeername): Don't define to + getpeername_used_without_requesting_gnulib_module_getpeername if the + gnulib module 'getpeername' is in use under the same configure.ac. + Avoid false bind_used_without_requesting_gnulib_module_bind. * modules/bind (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (bind): Don't define to diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index bc57bd2b9e..3898c6451d 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -434,8 +434,10 @@ _GL_CXXALIAS_SYS_CAST (getpeername, int, _GL_CXXALIASWARN (getpeername); # endif #elif @HAVE_WINSOCK2_H@ -# undef getpeername -# define getpeername getpeername_used_without_requesting_gnulib_module_getpeername +# if !GNULIB_GETPEERNAME +# undef getpeername +# define getpeername getpeername_used_without_requesting_gnulib_module_getpeername +# endif #elif defined GNULIB_POSIXCHECK # undef getpeername # if HAVE_RAW_DECL_GETPEERNAME diff --git a/modules/getpeername b/modules/getpeername index c0d7c997a2..0fd70eebcb 100644 --- a/modules/getpeername +++ b/modules/getpeername @@ -18,6 +18,7 @@ AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_GETPEERNAME], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([getpeername]) +gl_MODULE_INDICATOR([getpeername]) Makefile.am: if GL_COND_OBJ_GETPEERNAME -- 2.34.1
>From 7348722cafeba254c8aa25706ffaeebd9353cae6 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 00:53:05 +0200 Subject: [PATCH 13/22] Avoid false getsockname_used_without_requesting_gnulib_module_getsockname. * modules/getsockname (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (getsockname): Don't define to getsockname_used_without_requesting_gnulib_module_getsockname if the gnulib module 'getsockname' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_socket.in.h | 6 ++++-- modules/getsockname | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 81008a440d..81ea31da1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + Avoid false getsockname_used_without_requesting_gnulib_module_getsockname. + * modules/getsockname (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (getsockname): Don't define to + getsockname_used_without_requesting_gnulib_module_getsockname if the + gnulib module 'getsockname' is in use under the same configure.ac. + Avoid false getpeername_used_without_requesting_gnulib_module_getpeername. * modules/getpeername (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (getpeername): Don't define to diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index 3898c6451d..f19403d1f0 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -470,8 +470,10 @@ _GL_CXXALIAS_SYS_CAST (getsockname, int, _GL_CXXALIASWARN (getsockname); # endif #elif @HAVE_WINSOCK2_H@ -# undef getsockname -# define getsockname getsockname_used_without_requesting_gnulib_module_getsockname +# if !GNULIB_GETSOCKNAME +# undef getsockname +# define getsockname getsockname_used_without_requesting_gnulib_module_getsockname +# endif #elif defined GNULIB_POSIXCHECK # undef getsockname # if HAVE_RAW_DECL_GETSOCKNAME diff --git a/modules/getsockname b/modules/getsockname index 8a44ebaebd..7e0e1a2dc7 100644 --- a/modules/getsockname +++ b/modules/getsockname @@ -18,6 +18,7 @@ AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_GETSOCKNAME], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([getsockname]) +gl_MODULE_INDICATOR([getsockname]) Makefile.am: if GL_COND_OBJ_GETSOCKNAME -- 2.34.1
>From 522203c9f627792ea722aa1f66f6a4761d514969 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 01:12:43 +0200 Subject: [PATCH 14/22] Avoid false getsockopt_used_without_requesting_gnulib_module_getsockopt. * modules/getsockopt (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (getsockopt): Don't define to getsockopt_used_without_requesting_gnulib_module_getsockopt if the gnulib module 'getsockopt' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_socket.in.h | 6 ++++-- modules/getsockopt | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 81ea31da1c..5c2d1f68f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + Avoid false getsockopt_used_without_requesting_gnulib_module_getsockopt. + * modules/getsockopt (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (getsockopt): Don't define to + getsockopt_used_without_requesting_gnulib_module_getsockopt if the + gnulib module 'getsockopt' is in use under the same configure.ac. + Avoid false getsockname_used_without_requesting_gnulib_module_getsockname. * modules/getsockname (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (getsockname): Don't define to diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index f19403d1f0..ce217cdadb 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -504,8 +504,10 @@ _GL_CXXALIAS_SYS_CAST (getsockopt, int, # endif _GL_CXXALIASWARN (getsockopt); #elif @HAVE_WINSOCK2_H@ -# undef getsockopt -# define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt +# if !GNULIB_GETSOCKOPT +# undef getsockopt +# define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt +# endif #elif defined GNULIB_POSIXCHECK # undef getsockopt # if HAVE_RAW_DECL_GETSOCKOPT diff --git a/modules/getsockopt b/modules/getsockopt index 7749995a60..26d53f7534 100644 --- a/modules/getsockopt +++ b/modules/getsockopt @@ -18,6 +18,7 @@ AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_GETSOCKOPT], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([getsockopt]) +gl_MODULE_INDICATOR([getsockopt]) Makefile.am: if GL_COND_OBJ_GETSOCKOPT -- 2.34.1
>From b489078c97af74a675914a8863f0d857a4dd18e3 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 01:14:25 +0200 Subject: [PATCH 15/22] Avoid false listen_used_without_requesting_gnulib_module_listen. * modules/listen (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (listen): Don't define to listen_used_without_requesting_gnulib_module_listen if the gnulib module 'listen' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_socket.in.h | 6 ++++-- modules/listen | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5c2d1f68f7..f9b86bb0f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + Avoid false listen_used_without_requesting_gnulib_module_listen. + * modules/listen (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (listen): Don't define to + listen_used_without_requesting_gnulib_module_listen if the gnulib module + 'listen' is in use under the same configure.ac. + Avoid false getsockopt_used_without_requesting_gnulib_module_getsockopt. * modules/getsockopt (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (getsockopt): Don't define to diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index ce217cdadb..a5e8ee63e7 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -529,8 +529,10 @@ _GL_CXXALIAS_SYS (listen, int, (int fd, int backlog)); # endif _GL_CXXALIASWARN (listen); #elif @HAVE_WINSOCK2_H@ -# undef listen -# define listen listen_used_without_requesting_gnulib_module_listen +# if !GNULIB_LISTEN +# undef listen +# define listen listen_used_without_requesting_gnulib_module_listen +# endif #elif defined GNULIB_POSIXCHECK # undef listen # if HAVE_RAW_DECL_LISTEN diff --git a/modules/listen b/modules/listen index 877bc14bdc..7eae89b361 100644 --- a/modules/listen +++ b/modules/listen @@ -15,6 +15,7 @@ configure.ac: AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_LISTEN], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([listen]) +gl_MODULE_INDICATOR([listen]) Makefile.am: if GL_COND_OBJ_LISTEN -- 2.34.1
>From 8a1636250de75b35eeb605e3ba472debbe19b24d Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 01:16:05 +0200 Subject: [PATCH 16/22] Avoid false recv_used_without_requesting_gnulib_module_recv. * modules/recv (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (recv): Don't define to recv_used_without_requesting_gnulib_module_recv if the gnulib module 'recv' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_socket.in.h | 6 ++++-- modules/recv | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f9b86bb0f6..ad873a2d06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + Avoid false recv_used_without_requesting_gnulib_module_recv. + * modules/recv (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (recv): Don't define to + recv_used_without_requesting_gnulib_module_recv if the gnulib module + 'recv' is in use under the same configure.ac. + Avoid false listen_used_without_requesting_gnulib_module_listen. * modules/listen (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (listen): Don't define to diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index a5e8ee63e7..7e9562c535 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -558,8 +558,10 @@ _GL_CXXALIAS_SYS_CAST (recv, ssize_t, (int fd, void *buf, size_t len, int flags) # endif _GL_CXXALIASWARN (recv); #elif @HAVE_WINSOCK2_H@ -# undef recv -# define recv recv_used_without_requesting_gnulib_module_recv +# if !GNULIB_RECV +# undef recv +# define recv recv_used_without_requesting_gnulib_module_recv +# endif #elif defined GNULIB_POSIXCHECK # undef recv # if HAVE_RAW_DECL_RECV diff --git a/modules/recv b/modules/recv index 8c27a42208..18d81bba88 100644 --- a/modules/recv +++ b/modules/recv @@ -15,6 +15,7 @@ configure.ac: AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_RECV], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([recv]) +gl_MODULE_INDICATOR([recv]) Makefile.am: if GL_COND_OBJ_RECV -- 2.34.1
>From cf0893b3be07450f3e336aece8e7bf17a3c09272 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 01:17:33 +0200 Subject: [PATCH 17/22] Avoid false send_used_without_requesting_gnulib_module_send. * modules/send (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (send): Don't define to send_used_without_requesting_gnulib_module_send if the gnulib module 'send' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_socket.in.h | 6 ++++-- modules/send | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad873a2d06..92094d00ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + Avoid false send_used_without_requesting_gnulib_module_send. + * modules/send (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (send): Don't define to + send_used_without_requesting_gnulib_module_send if the gnulib module + 'send' is in use under the same configure.ac. + Avoid false recv_used_without_requesting_gnulib_module_recv. * modules/recv (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (recv): Don't define to diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index 7e9562c535..72907ffb34 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -590,8 +590,10 @@ _GL_CXXALIAS_SYS_CAST (send, ssize_t, # endif _GL_CXXALIASWARN (send); #elif @HAVE_WINSOCK2_H@ -# undef send -# define send send_used_without_requesting_gnulib_module_send +# if !GNULIB_SEND +# undef send +# define send send_used_without_requesting_gnulib_module_send +# endif #elif defined GNULIB_POSIXCHECK # undef send # if HAVE_RAW_DECL_SEND diff --git a/modules/send b/modules/send index 6584aec9ae..974d169355 100644 --- a/modules/send +++ b/modules/send @@ -15,6 +15,7 @@ configure.ac: AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_SEND], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([send]) +gl_MODULE_INDICATOR([send]) Makefile.am: if GL_COND_OBJ_SEND -- 2.34.1
>From 5110a172f3d61db20179648d18fb07607022d6ee Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 01:19:20 +0200 Subject: [PATCH 18/22] Avoid false recvfrom_used_without_requesting_gnulib_module_recvfrom. * modules/recvfrom (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (recvfrom): Don't define to recvfrom_used_without_requesting_gnulib_module_recvfrom if the gnulib module 'recvfrom' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_socket.in.h | 6 ++++-- modules/recvfrom | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 92094d00ba..73933068b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + Avoid false recvfrom_used_without_requesting_gnulib_module_recvfrom. + * modules/recvfrom (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (recvfrom): Don't define to + recvfrom_used_without_requesting_gnulib_module_recvfrom if the gnulib + module 'recvfrom' is in use under the same configure.ac. + Avoid false send_used_without_requesting_gnulib_module_send. * modules/send (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (send): Don't define to diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index 72907ffb34..f8ed41d8ec 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -629,8 +629,10 @@ _GL_CXXALIAS_SYS_CAST (recvfrom, ssize_t, _GL_CXXALIASWARN (recvfrom); # endif #elif @HAVE_WINSOCK2_H@ -# undef recvfrom -# define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom +# if !GNULIB_RECVFROM +# undef recvfrom +# define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom +# endif #elif defined GNULIB_POSIXCHECK # undef recvfrom # if HAVE_RAW_DECL_RECVFROM diff --git a/modules/recvfrom b/modules/recvfrom index cbf7e3a663..3cdd0a70a6 100644 --- a/modules/recvfrom +++ b/modules/recvfrom @@ -17,6 +17,7 @@ configure.ac: AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_RECVFROM], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([recvfrom]) +gl_MODULE_INDICATOR([recvfrom]) Makefile.am: if GL_COND_OBJ_RECVFROM -- 2.34.1
>From 82b8cf8d881541883fef3976c0834b9235a14ac7 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 01:21:45 +0200 Subject: [PATCH 19/22] Avoid false sendto_used_without_requesting_gnulib_module_sendto. * modules/sendto (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (sendto): Don't define to sendto_used_without_requesting_gnulib_module_sendto if the gnulib module 'sendto' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_socket.in.h | 6 ++++-- modules/sendto | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 73933068b7..8a2598bd5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + Avoid false sendto_used_without_requesting_gnulib_module_sendto. + * modules/sendto (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (sendto): Don't define to + sendto_used_without_requesting_gnulib_module_sendto if the gnulib module + 'sendto' is in use under the same configure.ac. + Avoid false recvfrom_used_without_requesting_gnulib_module_recvfrom. * modules/recvfrom (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (recvfrom): Don't define to diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index f8ed41d8ec..518a25e62c 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -663,8 +663,10 @@ _GL_CXXALIAS_SYS_CAST (sendto, ssize_t, # endif _GL_CXXALIASWARN (sendto); #elif @HAVE_WINSOCK2_H@ -# undef sendto -# define sendto sendto_used_without_requesting_gnulib_module_sendto +# if !GNULIB_SENDTO +# undef sendto +# define sendto sendto_used_without_requesting_gnulib_module_sendto +# endif #elif defined GNULIB_POSIXCHECK # undef sendto # if HAVE_RAW_DECL_SENDTO diff --git a/modules/sendto b/modules/sendto index a5d4d5702c..56cee15fc4 100644 --- a/modules/sendto +++ b/modules/sendto @@ -15,6 +15,7 @@ configure.ac: AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_SENDTO], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([sendto]) +gl_MODULE_INDICATOR([sendto]) Makefile.am: if GL_COND_OBJ_SENDTO -- 2.34.1
>From aefd8802e64e8ec8bf022c413b540a63007f8cdb Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 01:23:52 +0200 Subject: [PATCH 20/22] Avoid false setsockopt_used_without_requesting_gnulib_module_setsockopt. * modules/setsockopt (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (setsockopt): Don't define to setsockopt_used_without_requesting_gnulib_module_setsockopt if the gnulib module 'setsockopt' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_socket.in.h | 6 ++++-- modules/setsockopt | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8a2598bd5d..9a9a4f8685 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + Avoid false setsockopt_used_without_requesting_gnulib_module_setsockopt. + * modules/setsockopt (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (setsockopt): Don't define to + setsockopt_used_without_requesting_gnulib_module_setsockopt if the + gnulib module 'setsockopt' is in use under the same configure.ac. + Avoid false sendto_used_without_requesting_gnulib_module_sendto. * modules/sendto (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (sendto): Don't define to diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index 518a25e62c..2c7fdcf1a8 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -695,8 +695,10 @@ _GL_CXXALIAS_SYS_CAST (setsockopt, int, # endif _GL_CXXALIASWARN (setsockopt); #elif @HAVE_WINSOCK2_H@ -# undef setsockopt -# define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt +# if !GNULIB_SETSOCKOPT +# undef setsockopt +# define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt +# endif #elif defined GNULIB_POSIXCHECK # undef setsockopt # if HAVE_RAW_DECL_SETSOCKOPT diff --git a/modules/setsockopt b/modules/setsockopt index 1b1bdad069..efa55be536 100644 --- a/modules/setsockopt +++ b/modules/setsockopt @@ -17,6 +17,7 @@ AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_SETSOCKOPT], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([setsockopt]) +gl_MODULE_INDICATOR([setsockopt]) Makefile.am: if GL_COND_OBJ_SETSOCKOPT -- 2.34.1
>From 0f1c703435e2242482fcc70fa65dc7e88f78d5f5 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 01:27:32 +0200 Subject: [PATCH 21/22] Avoid false shutdown_used_without_requesting_gnulib_module_shutdown. * modules/shutdown (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (shutdown): Don't define to shutdown_used_without_requesting_gnulib_module_shutdown if the gnulib module 'shutdown' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_socket.in.h | 6 ++++-- modules/shutdown | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a9a4f8685..086ff9931d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + Avoid false shutdown_used_without_requesting_gnulib_module_shutdown. + * modules/shutdown (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (shutdown): Don't define to + shutdown_used_without_requesting_gnulib_module_shutdown if the gnulib + module 'shutdown' is in use under the same configure.ac. + Avoid false setsockopt_used_without_requesting_gnulib_module_setsockopt. * modules/setsockopt (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (setsockopt): Don't define to diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index 2c7fdcf1a8..ac28bab1b8 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -720,8 +720,10 @@ _GL_CXXALIAS_SYS (shutdown, int, (int fd, int how)); # endif _GL_CXXALIASWARN (shutdown); #elif @HAVE_WINSOCK2_H@ -# undef shutdown -# define shutdown shutdown_used_without_requesting_gnulib_module_shutdown +# if !GNULIB_SHUTDOWN +# undef shutdown +# define shutdown shutdown_used_without_requesting_gnulib_module_shutdown +# endif #elif defined GNULIB_POSIXCHECK # undef shutdown # if HAVE_RAW_DECL_SHUTDOWN diff --git a/modules/shutdown b/modules/shutdown index 6af957a9c2..a2ff50f7c5 100644 --- a/modules/shutdown +++ b/modules/shutdown @@ -15,6 +15,7 @@ configure.ac: AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_SHUTDOWN], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([shutdown]) +gl_MODULE_INDICATOR([shutdown]) Makefile.am: if GL_COND_OBJ_SHUTDOWN -- 2.34.1
>From 43e98da7c9408267c0bf54dd7eebb710883b8d8d Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 25 Jul 2024 01:29:22 +0200 Subject: [PATCH 22/22] Avoid false select_used_without_requesting_gnulib_module_select. * modules/select (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_select.in.h (select): Don't define to select_used_without_requesting_gnulib_module_select if the gnulib module 'select' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_select.in.h | 6 ++++-- modules/select | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 086ff9931d..f7fcead6a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible <br...@clisp.org> + Avoid false select_used_without_requesting_gnulib_module_select. + * modules/select (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_select.in.h (select): Don't define to + select_used_without_requesting_gnulib_module_select if the gnulib module + 'select' is in use under the same configure.ac. + Avoid false shutdown_used_without_requesting_gnulib_module_shutdown. * modules/shutdown (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (shutdown): Don't define to diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index ddf25d1de4..0d5ddd1678 100644 --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h @@ -332,8 +332,10 @@ _GL_CXXALIAS_SYS (select, int, _GL_CXXALIASWARN (select); # endif #elif @HAVE_WINSOCK2_H@ -# undef select -# define select select_used_without_requesting_gnulib_module_select +# if !GNULIB_SELECT +# undef select +# define select select_used_without_requesting_gnulib_module_select +# endif #elif defined GNULIB_POSIXCHECK # undef select # if HAVE_RAW_DECL_SELECT diff --git a/modules/select b/modules/select index 213fb78656..eb1d13bbb5 100644 --- a/modules/select +++ b/modules/select @@ -17,6 +17,7 @@ configure.ac: gl_FUNC_SELECT gl_CONDITIONAL([GL_COND_OBJ_SELECT], [test $REPLACE_SELECT = 1]) gl_SYS_SELECT_MODULE_INDICATOR([select]) +gl_MODULE_INDICATOR([select]) Makefile.am: if GL_COND_OBJ_SELECT -- 2.34.1