Re: RCS 5.10.1 fails 6 tests on 2023 Mac Studio with macOS 15.0 Sequoia

Collin Funk <[email protected]> Tue, 24 Sep 2024 17:20:21 -0700
Newsgroups gmane.comp.version-control.rcs.bugs
Message-ID <[email protected]>
--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Paul Eggert <[email protected]> writes:

> Thanks for the bug report. I can't reproduce the problem with macOS
> 12.6 21G115. Please try running this command:

By the way, I'm suprised this compiles on macOS. I would expect to see
the following error.

  $ ./configure gl_cv_func_access_slash_works=3Dno
  [...]
  In file included from b-grok.c:21:
  b-grok.c: In function =E2=80=98full=E2=80=99:
  base.h:320:24: error: =E2=80=98tiny_rpl_access=E2=80=99 undeclared (first=
 use in this function); did you mean =E2=80=98tiny_access=E2=80=99?
    320 | #define TINY(x)       (tiny_ ## x)
        |                        ^~~~~
  b-grok.c:165:45: note: in expansion of macro =E2=80=98TINY=E2=80=99
    165 | #define SYNCH(g,kw)  must_read_keyword (g, &TINY (kw))
        |                                             ^~~~
  b-grok.c:583:3: note: in expansion of macro =E2=80=98SYNCH=E2=80=99
    583 |   SYNCH (g, access);
        |   ^~~~~
  base.h:320:24: note: each undeclared identifier is reported only once for=
 each function it appears in
    320 | #define TINY(x)       (tiny_ ## x)
        |                        ^~~~~
  b-grok.c:165:45: note: in expansion of macro =E2=80=98TINY=E2=80=99
    165 | #define SYNCH(g,kw)  must_read_keyword (g, &TINY (kw))
        |                                             ^~~~
  b-grok.c:583:3: note: in expansion of macro =E2=80=98SYNCH=E2=80=99
    583 |   SYNCH (g, access);
        |   ^~~~~
  b-grok.c:584:14: error: =E2=80=98struct repo=E2=80=99 has no member named=
 =E2=80=98rpl_access=E2=80=99; did you mean =E2=80=98access=E2=80=99?
    584 |   for (PREP (access); maybe_read_snippet (g); count++)
        |              ^~~~~~
  b-grok.c:565:50: note: in definition of macro =E2=80=98PREP=E2=80=99
    565 | #define PREP(field)  count =3D 0, box.next =3D repo->field, tp =
=3D &box
        |                                                  ^~~~~
  b-grok.c:586:9: error: =E2=80=98struct repo=E2=80=99 has no member named =
=E2=80=98rpl_access=E2=80=99; did you mean =E2=80=98access=E2=80=99?
    586 |   DONE (access);
        |         ^~~~~~
  b-grok.c:567:28: note: in definition of macro =E2=80=98DONE=E2=80=99
    567 | #define DONE(field)  repo->field =3D box.next, repo->field ## _co=
unt =3D count
        |                            ^~~~~
  make[2]: *** [Makefile:2111: b-grok.o] Error 1

In any case, any time the gnulib access replacement is used, the build
will fail.

I've attached a patch.

Collin


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-rcs-Fix-build-failure-caused-by-Gnulib-s-access.patch

From 148773aa0e78273a9aecf25c48db759bc566b43e Mon Sep 17 00:00:00 2001
From: Collin Funk <[email protected]>
Date: Tue, 24 Sep 2024 17:18:52 -0700
Subject: [PATCH] rcs: Fix build failure caused by Gnulib's access.

* src/base.h: Include unistd.h.
---
 src/base.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/base.h b/src/base.h
index 11cc206..c6f18fa 100644
--- a/src/base.h
+++ b/src/base.h
@@ -26,6 +26,7 @@
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <unistd.h>
 #include "attribute.h"
 #include "vla.h"
 
-- 
2.46.1


--=-=-=--