From 9133bcbcd56d0f8c8f7b5d4de65e6fe104a8bb22 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 25 Sep 2024 13:57:57 -0700 Subject: [PATCH] =?UTF-8?q?maint:=20fix=20misuse=20of=20=E2=80=98access?= =?UTF-8?q?=E2=80=99=20symbol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem reported by Collin Funk in: https://lists.gnu.org/r/bug-rcs/2024-09/msg00002.html * src/Makefile.am (libparts_a_SOURCES): Add rcs-unistd.h. * src/rcs-unistd.h: New file. All source uses of ‘#include ’ replaced with ‘#include "rcs-unistd.h"’. --- src/Makefile.am | 2 +- src/b-excwho.c | 2 +- src/b-fb.c | 2 +- src/b-feph.c | 2 +- src/b-fro.c | 2 +- src/b-grok.c | 2 +- src/b-isr.c | 2 +- src/ci.c | 2 +- src/rcs-unistd.h | 4 ++++ src/rcsedit.c | 2 +- src/rcsfnms.c | 2 +- src/rcsgen.c | 2 +- src/rcsutil.c | 2 +- src/super.c | 2 +- 14 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 src/rcs-unistd.h diff --git a/src/Makefile.am b/src/Makefile.am index 7146136..d5ad57b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,7 +33,7 @@ noinst_LIBRARIES = libparts.a libparts_a_SOURCES = \ b-complain.h b-divvy.h b-esds.h b-excwho.h b-fb.h b-feph.h b-fro.h \ b-grok.h b-isr.h b-kwxout.h b-merger.h b-peer.h b-yacmd.h \ - base.h gnu-h-v.h maketime.h partime.h \ + base.h gnu-h-v.h maketime.h partime.h rcs-unistd.h \ b-anchor.c \ b-complain.c b-divvy.c b-esds.c b-excwho.c b-fb.c b-feph.c b-fro.c \ b-grok.c b-isr.c b-kwxout.c b-peer.c \ diff --git a/src/b-excwho.c b/src/b-excwho.c index 917254f..6a83c62 100644 --- a/src/b-excwho.c +++ b/src/b-excwho.c @@ -24,7 +24,7 @@ #include "base.h" #include #include -#include +#include "rcs-unistd.h" #ifdef HAVE_PWD_H #include #endif diff --git a/src/b-fb.c b/src/b-fb.c index 9dec7cd..6112a19 100644 --- a/src/b-fb.c +++ b/src/b-fb.c @@ -24,7 +24,7 @@ #include "base.h" #include #include -#include +#include "rcs-unistd.h" #include "unistd-safer.h" #include "b-complain.h" diff --git a/src/b-feph.c b/src/b-feph.c index 9a4d3b5..c391ad4 100644 --- a/src/b-feph.c +++ b/src/b-feph.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include "rcs-unistd.h" #include "unistd-safer.h" #include "b-complain.h" #include "b-divvy.h" diff --git a/src/b-fro.c b/src/b-fro.c index 8fc9bad..5dc6d6d 100644 --- a/src/b-fro.c +++ b/src/b-fro.c @@ -32,7 +32,7 @@ #ifdef HAVE_SYS_MMAN_H #include #endif -#include +#include "rcs-unistd.h" #include "unistd-safer.h" #include "b-complain.h" #include "b-divvy.h" diff --git a/src/b-grok.c b/src/b-grok.c index 00f0a51..a0d4b17 100644 --- a/src/b-grok.c +++ b/src/b-grok.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include "rcs-unistd.h" #include "hash-pjw.h" #include "b-complain.h" #include "b-divvy.h" diff --git a/src/b-isr.c b/src/b-isr.c index 7edddc3..4cbe1e0 100644 --- a/src/b-isr.c +++ b/src/b-isr.c @@ -28,7 +28,7 @@ #include "base.h" #include #include -#include +#include "rcs-unistd.h" #include #ifdef HAVE_SIGINFO_H #include diff --git a/src/ci.c b/src/ci.c index b715d2a..9deb000 100644 --- a/src/ci.c +++ b/src/ci.c @@ -26,7 +26,7 @@ #include #include /* isdigit */ #include -#include +#include "rcs-unistd.h" #include "same-inode.h" #include "stat-time.h" #include "timespec.h" diff --git a/src/rcs-unistd.h b/src/rcs-unistd.h new file mode 100644 index 0000000..3b79e08 --- /dev/null +++ b/src/rcs-unistd.h @@ -0,0 +1,4 @@ +#include +/* RCS does not use 'access', and any macro definition by Gnulib might + break RCS usages like TINY (access) and TINYK (access). */ +#undef access diff --git a/src/rcsedit.c b/src/rcsedit.c index bf1114c..0cfcdd9 100644 --- a/src/rcsedit.c +++ b/src/rcsedit.c @@ -30,7 +30,7 @@ #include "base.h" #include #include -#include +#include "rcs-unistd.h" #include #ifdef HAVE_UTIME_H #include diff --git a/src/rcsfnms.c b/src/rcsfnms.c index a06d52d..35b940d 100644 --- a/src/rcsfnms.c +++ b/src/rcsfnms.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include "rcs-unistd.h" #include "same-inode.h" #include "b-complain.h" #include "b-divvy.h" diff --git a/src/rcsgen.c b/src/rcsgen.c index 868f2d4..ab9de1c 100644 --- a/src/rcsgen.c +++ b/src/rcsgen.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include "rcs-unistd.h" #include "b-complain.h" #include "b-divvy.h" #include "b-esds.h" diff --git a/src/rcsutil.c b/src/rcsutil.c index 3a76541..1c03d45 100644 --- a/src/rcsutil.c +++ b/src/rcsutil.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include "rcs-unistd.h" #include #include #include "b-complain.h" diff --git a/src/super.c b/src/super.c index 685e6bb..4237146 100644 --- a/src/super.c +++ b/src/super.c @@ -22,7 +22,7 @@ #include "base.h" #include #include -#include +#include "rcs-unistd.h" #include "super.help" #include "b-divvy.h" #include "b-complain.h" -- 2.43.0