Re: RCS-5.8.2 Re: rcs-5.7.96 build feedback

Paul Eggert <[email protected]> Sat, 02 Aug 2014 10:19:19 -0700
Newsgroups gmane.comp.version-control.rcs.bugs
Organization UCLA Computer Science Department
Message-ID <[email protected]>
Thien-Thi Nguyen wrote:
> GCC 3.4.3 was released 2004-11-04.  I suggest you try a more recent
> version.

Unfortunately GCC 3.4.3 is the standard GCC version that is shipped as 
part of Solaris 10.  It's helpful to have RCS work even when compiled 
with 3.4.3, as it's often quite a pain to download and install a newer 
compiler.  The patch is trivial, so this shouldn't be much of a 
maintenance burden.  I ported RCS to Solaris 10 (there were two other 
minor glitches) and applied the attached patch to the "p" branch of the 
RCS sources on Savannah.  I hope that's the right branch for this sort 
of thing; if not please feel free to move it.
0001-Port-to-Solaris-10-which-uses-GCC-3.4.3.patch (text/plain, 3.5 KB)
From 9d202465b5e16d244e8afa23ba0a0301de8fb8a6 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email protected]>
Date: Sat, 2 Aug 2014 10:11:31 -0700
Subject: [PATCH] Port to Solaris 10, which uses GCC 3.4.3.

Array problem reported by Nelson H. F. Beebe.
* src/b-feph.c (reap):
* src/b-isr.c (setup_catchsig):
* tests/btdt.c (main):
Comment out size of array parameter, as GCC 3.4.3 doesn't allow it.
* src/b-isr.c (catchsigaction): Use 'char *' (not 'const char *')
for a local variable, to pacify Solaris 10 psiginfo.
* tests/Makefile.am (TESTS_ENVIRONMENT): Use $(SHELL), not sh.
---
 src/ChangeLog     | 10 ++++++++++
 src/b-feph.c      |  2 +-
 src/b-isr.c       |  4 ++--
 tests/ChangeLog   |  7 +++++++
 tests/Makefile.am |  2 +-
 tests/btdt.c      |  2 +-
 6 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index 4585c53..2d3ff9b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
+2014-08-02  Paul Eggert  <[email protected]>
+
+	Port to Solaris 10, which uses GCC 3.4.3.
+	Array problem reported by Nelson H. F. Beebe.
+	* b-feph.c (reap):
+	* b-isr.c (setup_catchsig):
+	Comment out size of array parameter, as GCC 3.4.3 doesn't allow it.
+	* b-isr.c (catchsigaction): Use 'char *' (not 'const char *')
+	for a local variable, to pacify Solaris 10 psiginfo.
+
 2013-11-28  Thien-Thi Nguyen  <[email protected]>
 
 	Release: 5.9.2
diff --git a/src/b-feph.c b/src/b-feph.c
index 605b2e4..31b90c9 100644
--- a/src/b-feph.c
+++ b/src/b-feph.c
@@ -168,7 +168,7 @@ keepdirtemp (char const *name)
 }
 
 static void
-reap (size_t count, struct sff all[count],
+reap (size_t count, struct sff all[/*count*/],
       int (*cut) (char const *filename))
 {
   enum maker m;
diff --git a/src/b-isr.c b/src/b-isr.c
index 48ad728..96c9e15 100644
--- a/src/b-isr.c
+++ b/src/b-isr.c
@@ -128,7 +128,7 @@ catchsigaction (int signo, siginfo_t *info, RCS_UNUSED void *uc)
       /* If this signal was planned, don't complain about it.  */
       if (!(from_mmap && ISR (access_name)))
         {
-          const char *nRCS = "\nRCS";
+          char *nRCS = "\nRCS";
 
           if (from_mmap && info && info->si_errno)
             {
@@ -163,7 +163,7 @@ catchsigaction (int signo, siginfo_t *info, RCS_UNUSED void *uc)
 #endif
 
 static void
-setup_catchsig (size_t count, int const set[count])
+setup_catchsig (size_t count, int const set[/*count*/])
 {
   sigset_t blocked;
 
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 2ca826f..894e3b3 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,10 @@
+2014-08-02  Paul Eggert  <[email protected]>
+
+	Port to Solaris 10, which uses GCC 3.4.3.
+	* Makefile.am (TESTS_ENVIRONMENT): Use $(SHELL), not sh.
+	* btdt.c (main):
+	Comment out size of array parameter, as GCC 3.4.3 doesn't allow it.
+
 2013-11-28  Thien-Thi Nguyen  <[email protected]>
 
 	Release: 5.9.2
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d8eb3a2..2feedda 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -27,7 +27,7 @@ btdt_LDADD = ../src/libparts.a ../lib/libgnu.a
 # This helps certain RCS programs find their peers.
 PATHPREFIX = $(abs_top_builddir)/src
 
-TESTS_ENVIRONMENT = PATHPREFIX="$(PATHPREFIX)" sh
+TESTS_ENVIRONMENT = PATHPREFIX="$(PATHPREFIX)" $(SHELL)
 
 XFAIL_TESTS =
 
diff --git a/tests/btdt.c b/tests/btdt.c
index 8062442..62cec3f 100644
--- a/tests/btdt.c
+++ b/tests/btdt.c
@@ -158,7 +158,7 @@ struct yeah yeah[] =
 #define NYEAH  (sizeof (yeah) / sizeof (struct yeah))
 
 int
-main (int argc, char *argv[argc])
+main (int argc, char *argv[/*argc*/])
 {
   char const *me = "btdt";
 
-- 
1.9.3