summaryrefslogtreecommitdiff
path: root/dev-vcs/cvs/files
diff options
context:
space:
mode:
Diffstat (limited to 'dev-vcs/cvs/files')
-rw-r--r--dev-vcs/cvs/files/0001-fix-quoting-around-potentially-empty-shell-var.patch30
-rw-r--r--dev-vcs/cvs/files/0001-gettext-autoreconf.patch25
-rw-r--r--dev-vcs/cvs/files/c99-roundup.patch122
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.12-mktime-configure-m4.patch412
4 files changed, 589 insertions, 0 deletions
diff --git a/dev-vcs/cvs/files/0001-fix-quoting-around-potentially-empty-shell-var.patch b/dev-vcs/cvs/files/0001-fix-quoting-around-potentially-empty-shell-var.patch
new file mode 100644
index 000000000000..74041583e835
--- /dev/null
+++ b/dev-vcs/cvs/files/0001-fix-quoting-around-potentially-empty-shell-var.patch
@@ -0,0 +1,30 @@
+From 6054eb157a25b4b46427baa6eb53b5e18135019a Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Sun, 19 May 2024 21:15:34 -0400
+Subject: [PATCH 1/2] fix quoting around potentially empty shell var
+
+required to handle POSIX `test` command
+
+ * QA Notice: Broken syntax in configure script
+ *
+ * ./configure: line 8046: test: =: unary operator expected
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index d4f3a44..2a9b0ff 100644
+--- a/configure.in
++++ b/configure.in
+@@ -179,7 +179,7 @@ AC_CHECK_MEMBERS([struct stat.st_blksize])
+ AC_CHECK_MEMBERS([struct stat.st_rdev])
+
+ AC_FUNC_FSEEKO
+-if test $ac_cv_func_fseeko = no; then
++if test "$ac_cv_func_fseeko" = no; then
+ AC_LIBOBJ(fseeko)
+ AC_LIBOBJ(ftello)
+ fi
+--
+2.44.1
+
diff --git a/dev-vcs/cvs/files/0001-gettext-autoreconf.patch b/dev-vcs/cvs/files/0001-gettext-autoreconf.patch
new file mode 100644
index 000000000000..b091fb6b4175
--- /dev/null
+++ b/dev-vcs/cvs/files/0001-gettext-autoreconf.patch
@@ -0,0 +1,25 @@
+From dafaeefa2d81034333ec73594b8209caebb69b23 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Sun, 19 May 2024 19:48:33 -0400
+Subject: [PATCH] gettext autoreconf
+
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index ada8454..d4f3a44 100644
+--- a/configure.in
++++ b/configure.in
+@@ -206,7 +206,7 @@ gl_INIT
+ dnl For one reason or another, the autogenerated m4/gnulib.m4 wants
+ dnl AM_GNU_GETTEXT([external]) called directly from here.
+ AM_GNU_GETTEXT([external])
+-AM_GNU_GETTEXT_VERSION dnl work around for autoconf-2.57 bug.
++AM_GNU_GETTEXT_VERSION(0.22.4)
+ # The error module still poses merge problems.
+ AC_FUNC_STRERROR_R
+ dnl The following macros can be called by other GNULIB macros but are also
+--
+2.44.1
+
diff --git a/dev-vcs/cvs/files/c99-roundup.patch b/dev-vcs/cvs/files/c99-roundup.patch
new file mode 100644
index 000000000000..7c8ad479117d
--- /dev/null
+++ b/dev-vcs/cvs/files/c99-roundup.patch
@@ -0,0 +1,122 @@
+From 4df675986524d0e8e76530a3e1bd7860aef9973d Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Sun, 19 May 2024 21:27:38 -0400
+Subject: [PATCH 1/2] m4: fix various missing includes of headers for feature
+ test funcs
+
+---
+ m4/cvs_func_printf_ptr.m4 | 1 +
+ m4/mkdir-slash.m4 | 6 +++++-
+ m4/nanosleep.m4 | 1 +
+ m4/regex.m4 | 1 +
+ m4/rename.m4 | 1 +
+ 5 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/m4/cvs_func_printf_ptr.m4 b/m4/cvs_func_printf_ptr.m4
+index 4348e29..f04c135 100644
+--- a/m4/cvs_func_printf_ptr.m4
++++ b/m4/cvs_func_printf_ptr.m4
+@@ -24,6 +24,7 @@ AC_DEFUN([CVS_FUNC_PRINTF_PTR],
+ [AC_CACHE_CHECK(whether printf supports %p,
+ cvs_cv_func_printf_ptr,
+ [AC_TRY_RUN([#include <stdio.h>
++#include <stdlib.h>
+ /* If printf supports %p, exit 0. */
+ int
+ main ()
+diff --git a/m4/mkdir-slash.m4 b/m4/mkdir-slash.m4
+index c1e595b..0ca9a91 100644
+--- a/m4/mkdir-slash.m4
++++ b/m4/mkdir-slash.m4
+@@ -1,4 +1,4 @@
+-#serial 4
++#serial 5
+
+ # Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
+ # This file is free software; the Free Software Foundation
+@@ -10,6 +10,7 @@
+ # trailing slashes.
+ AC_DEFUN([gl_FUNC_MKDIR_TRAILING_SLASH],
+ [dnl
++ AC_CHECK_HEADERS_ONCE(unistd.h)
+ AC_CACHE_CHECK([whether mkdir fails due to a trailing slash],
+ gl_cv_func_mkdir_trailing_slash_bug,
+ [
+@@ -19,6 +20,9 @@ AC_DEFUN([gl_FUNC_MKDIR_TRAILING_SLASH],
+ # include <sys/types.h>
+ # include <sys/stat.h>
+ # include <stdlib.h>
++# ifdef HAVE_UNISTD_H
++# include <unistd.h>
++# endif
+ int main ()
+ {
+ rmdir ("confdir-slash");
+diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4
+index 5590b9b..035e440 100644
+--- a/m4/nanosleep.m4
++++ b/m4/nanosleep.m4
+@@ -39,6 +39,7 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
+ # include <time.h>
+ # endif
+ # endif
++# include <stdlib.h>
+
+ int
+ main ()
+diff --git a/m4/regex.m4 b/m4/regex.m4
+index 34435de..5988f68 100644
+--- a/m4/regex.m4
++++ b/m4/regex.m4
+@@ -36,6 +36,7 @@ AC_DEFUN([gl_INCLUDED_REGEX],
+ [#include <stdio.h>
+ #include <string.h>
+ #include <regex.h>
++#include <stdlib.h>
+ int
+ main ()
+ {
+diff --git a/m4/rename.m4 b/m4/rename.m4
+index 7d59160..362fdd4 100644
+--- a/m4/rename.m4
++++ b/m4/rename.m4
+@@ -23,6 +23,7 @@ AC_DEFUN([vb_FUNC_RENAME],
+ AC_MSG_ERROR([cannot create temporary directory])
+ AC_TRY_RUN([
+ # include <stdio.h>
++# include <stdlib.h>
+ int
+ main ()
+ {
+--
+2.44.1
+
+
+From f6e7556c404e1cb3ddb088fab480aa39a9ad0306 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Sun, 19 May 2024 21:47:06 -0400
+Subject: [PATCH 2/2] fix missing config.h includes preventing functions from
+ being found
+
+_GNU_SOURCE needs to be defined by config.h, so that fputs_unlocked is
+provided by stdio.h (as used by gnulib's unlocked-io module).
+---
+ src/add.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/add.c b/src/add.c
+index 7f94e2b..025cfc9 100644
+--- a/src/add.c
++++ b/src/add.c
+@@ -29,6 +29,8 @@
+ * file to be resurrected.
+ */
+
++#include <config.h>
++
+ #include <assert.h>
+ #include "cvs.h"
+ #include "save-cwd.h"
+--
+2.44.1
+
diff --git a/dev-vcs/cvs/files/cvs-1.12.12-mktime-configure-m4.patch b/dev-vcs/cvs/files/cvs-1.12.12-mktime-configure-m4.patch
new file mode 100644
index 000000000000..f5b445682b11
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.12-mktime-configure-m4.patch
@@ -0,0 +1,412 @@
+https://bugs.gentoo.org/220040
+https://bugs.gentoo.org/570208
+
+update mktime check to latest autoconf version which is less buggy
+
+--- a/configure
++++ b/configure
+@@ -5299,26 +6059,25 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ /* Test program from Paul Eggert and Tony Leneis. */
+-#if TIME_WITH_SYS_TIME
++#ifdef TIME_WITH_SYS_TIME
+ # include <sys/time.h>
+ # include <time.h>
+ #else
+-# if HAVE_SYS_TIME_H
++# ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ # else
+ # include <time.h>
+ # endif
+ #endif
+
+-#if HAVE_STDLIB_H
+-# include <stdlib.h>
+-#endif
++#include <limits.h>
++#include <stdlib.h>
+
+-#if HAVE_UNISTD_H
++#ifdef HAVE_UNISTD_H
+ # include <unistd.h>
+ #endif
+
+-#if !HAVE_ALARM
++#ifndef HAVE_ALARM
+ # define alarm(X) /* empty */
+ #endif
+
+@@ -5335,9 +6094,9 @@
+ };
+ #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
+
+-/* Fail if mktime fails to convert a date in the spring-forward gap.
++/* Return 0 if mktime fails to convert a date in the spring-forward gap.
+ Based on a problem report from Andreas Jaeger. */
+-static void
++static int
+ spring_forward_gap ()
+ {
+ /* glibc (up to about 1998-10-07) failed this test. */
+@@ -5356,29 +6115,27 @@
+ tm.tm_min = 0;
+ tm.tm_sec = 0;
+ tm.tm_isdst = -1;
+- if (mktime (&tm) == (time_t)-1)
+- exit (1);
++ return mktime (&tm) != (time_t) -1;
+ }
+
+-static void
++static int
+ mktime_test1 (now)
+ time_t now;
+ {
+ struct tm *lt;
+- if ((lt = localtime (&now)) && mktime (lt) != now)
+- exit (1);
++ return ! (lt = localtime (&now)) || mktime (lt) == now;
+ }
+
+-static void
++static int
+ mktime_test (now)
+ time_t now;
+ {
+- mktime_test1 (now);
+- mktime_test1 ((time_t) (time_t_max - now));
+- mktime_test1 ((time_t) (time_t_min + now));
++ return (mktime_test1 (now)
++ && mktime_test1 ((time_t) (time_t_max - now))
++ && mktime_test1 ((time_t) (time_t_min + now)));
+ }
+
+-static void
++static int
+ irix_6_4_bug ()
+ {
+ /* Based on code from Ariel Faigon. */
+@@ -5391,11 +6148,10 @@
+ tm.tm_sec = 0;
+ tm.tm_isdst = -1;
+ mktime (&tm);
+- if (tm.tm_mon != 2 || tm.tm_mday != 31)
+- exit (1);
++ return tm.tm_mon == 2 && tm.tm_mday == 31;
+ }
+
+-static void
++static int
+ bigtime_test (j)
+ int j;
+ {
+@@ -5417,8 +6173,39 @@
+ && lt->tm_wday == tm.tm_wday
+ && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
+ == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
+- exit (1);
++ return 0;
+ }
++ return 1;
++}
++
++static int
++year_2050_test ()
++{
++ /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
++ ignoring leap seconds. */
++ unsigned long int answer = 2527315200UL;
++
++ struct tm tm;
++ time_t t;
++ tm.tm_year = 2050 - 1900;
++ tm.tm_mon = 2 - 1;
++ tm.tm_mday = 1;
++ tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
++ tm.tm_isdst = -1;
++
++ /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
++ instead of "TZ=America/Vancouver" in order to detect the bug even
++ on systems that don't support the Olson extension, or don't have the
++ full zoneinfo tables installed. */
++ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
++
++ t = mktime (&tm);
++
++ /* Check that the result is either a failure, or close enough
++ to the correct answer that we can assume the discrepancy is
++ due to leap seconds. */
++ return (t == (time_t) -1
++ || (0 < t && answer - 120 <= t && t <= answer + 120));
+ }
+
+ int
+@@ -5432,12 +6219,15 @@
+ isn't worth using anyway. */
+ alarm (60);
+
+- for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
+- continue;
+- time_t_max--;
+- if ((time_t) -1 < 0)
+- for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
+- continue;
++ for (;;)
++ {
++ t = (time_t_max << 1) + 1;
++ if (t <= time_t_max)
++ break;
++ time_t_max = t;
++ }
++ time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
++
+ delta = time_t_max / 997; /* a suitable prime number */
+ for (i = 0; i < N_STRINGS; i++)
+ {
+@@ -5445,18 +6235,22 @@
+ putenv (tz_strings[i]);
+
+ for (t = 0; t <= time_t_max - delta; t += delta)
+- mktime_test (t);
+- mktime_test ((time_t) 1);
+- mktime_test ((time_t) (60 * 60));
+- mktime_test ((time_t) (60 * 60 * 24));
+-
+- for (j = 1; 0 < j; j *= 2)
+- bigtime_test (j);
+- bigtime_test (j - 1);
++ if (! mktime_test (t))
++ return 1;
++ if (! (mktime_test ((time_t) 1)
++ && mktime_test ((time_t) (60 * 60))
++ && mktime_test ((time_t) (60 * 60 * 24))))
++ return 1;
++
++ for (j = 1; ; j <<= 1)
++ if (! bigtime_test (j))
++ return 1;
++ else if (INT_MAX / 2 < j)
++ break;
++ if (! bigtime_test (INT_MAX))
++ return 1;
+ }
+- irix_6_4_bug ();
+- spring_forward_gap ();
+- exit (0);
++ return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+From 243eb722f2c53d07bc7cbb2304e35582bddd4e45 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Sun, 19 May 2024 20:11:58 -0400
+Subject: [PATCH] update mktime check to latest autoconf version which is less
+ buggy
+
+---
+ m4/mktime.m4 | 114 +++++++++++++++++++++++++++++++++------------------
+ 1 file changed, 74 insertions(+), 40 deletions(-)
+
+diff --git a/m4/mktime.m4 b/m4/mktime.m4
+index 25ca6dc..da00ee5 100644
+--- a/m4/mktime.m4
++++ b/m4/mktime.m4
+@@ -19,26 +19,25 @@ AC_CHECK_FUNCS(alarm)
+ AC_CACHE_CHECK([for working mktime], ac_cv_func_working_mktime,
+ [AC_RUN_IFELSE([AC_LANG_SOURCE(
+ [[/* Test program from Paul Eggert and Tony Leneis. */
+-#if TIME_WITH_SYS_TIME
++#ifdef TIME_WITH_SYS_TIME
+ # include <sys/time.h>
+ # include <time.h>
+ #else
+-# if HAVE_SYS_TIME_H
++# ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ # else
+ # include <time.h>
+ # endif
+ #endif
+
+-#if HAVE_STDLIB_H
+-# include <stdlib.h>
+-#endif
++#include <limits.h>
++#include <stdlib.h>
+
+-#if HAVE_UNISTD_H
++#ifdef HAVE_UNISTD_H
+ # include <unistd.h>
+ #endif
+
+-#if !HAVE_ALARM
++#ifndef HAVE_ALARM
+ # define alarm(X) /* empty */
+ #endif
+
+@@ -55,9 +54,9 @@ static char *tz_strings[] = {
+ };
+ #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
+
+-/* Fail if mktime fails to convert a date in the spring-forward gap.
++/* Return 0 if mktime fails to convert a date in the spring-forward gap.
+ Based on a problem report from Andreas Jaeger. */
+-static void
++static int
+ spring_forward_gap ()
+ {
+ /* glibc (up to about 1998-10-07) failed this test. */
+@@ -76,29 +75,27 @@ spring_forward_gap ()
+ tm.tm_min = 0;
+ tm.tm_sec = 0;
+ tm.tm_isdst = -1;
+- if (mktime (&tm) == (time_t)-1)
+- exit (1);
++ return mktime (&tm) != (time_t) -1;
+ }
+
+-static void
++static int
+ mktime_test1 (now)
+ time_t now;
+ {
+ struct tm *lt;
+- if ((lt = localtime (&now)) && mktime (lt) != now)
+- exit (1);
++ return ! (lt = localtime (&now)) || mktime (lt) == now;
+ }
+
+-static void
++static int
+ mktime_test (now)
+ time_t now;
+ {
+- mktime_test1 (now);
+- mktime_test1 ((time_t) (time_t_max - now));
+- mktime_test1 ((time_t) (time_t_min + now));
++ return (mktime_test1 (now)
++ && mktime_test1 ((time_t) (time_t_max - now))
++ && mktime_test1 ((time_t) (time_t_min + now)));
+ }
+
+-static void
++static int
+ irix_6_4_bug ()
+ {
+ /* Based on code from Ariel Faigon. */
+@@ -111,11 +108,10 @@ irix_6_4_bug ()
+ tm.tm_sec = 0;
+ tm.tm_isdst = -1;
+ mktime (&tm);
+- if (tm.tm_mon != 2 || tm.tm_mday != 31)
+- exit (1);
++ return tm.tm_mon == 2 && tm.tm_mday == 31;
+ }
+
+-static void
++static int
+ bigtime_test (j)
+ int j;
+ {
+@@ -137,8 +133,39 @@ bigtime_test (j)
+ && lt->tm_wday == tm.tm_wday
+ && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
+ == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
+- exit (1);
++ return 0;
+ }
++ return 1;
++}
++
++static int
++year_2050_test ()
++{
++ /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
++ ignoring leap seconds. */
++ unsigned long int answer = 2527315200UL;
++
++ struct tm tm;
++ time_t t;
++ tm.tm_year = 2050 - 1900;
++ tm.tm_mon = 2 - 1;
++ tm.tm_mday = 1;
++ tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
++ tm.tm_isdst = -1;
++
++ /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
++ instead of "TZ=America/Vancouver" in order to detect the bug even
++ on systems that don't support the Olson extension, or don't have the
++ full zoneinfo tables installed. */
++ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
++
++ t = mktime (&tm);
++
++ /* Check that the result is either a failure, or close enough
++ to the correct answer that we can assume the discrepancy is
++ due to leap seconds. */
++ return (t == (time_t) -1
++ || (0 < t && answer - 120 <= t && t <= answer + 120));
+ }
+
+ int
+@@ -152,12 +179,15 @@ main ()
+ isn't worth using anyway. */
+ alarm (60);
+
+- for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
+- continue;
+- time_t_max--;
+- if ((time_t) -1 < 0)
+- for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
+- continue;
++ for (;;)
++ {
++ t = (time_t_max << 1) + 1;
++ if (t <= time_t_max)
++ break;
++ time_t_max = t;
++ }
++ time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
++
+ delta = time_t_max / 997; /* a suitable prime number */
+ for (i = 0; i < N_STRINGS; i++)
+ {
+@@ -165,18 +195,22 @@ main ()
+ putenv (tz_strings[i]);
+
+ for (t = 0; t <= time_t_max - delta; t += delta)
+- mktime_test (t);
+- mktime_test ((time_t) 1);
+- mktime_test ((time_t) (60 * 60));
+- mktime_test ((time_t) (60 * 60 * 24));
+-
+- for (j = 1; 0 < j; j *= 2)
+- bigtime_test (j);
+- bigtime_test (j - 1);
++ if (! mktime_test (t))
++ return 1;
++ if (! (mktime_test ((time_t) 1)
++ && mktime_test ((time_t) (60 * 60))
++ && mktime_test ((time_t) (60 * 60 * 24))))
++ return 1;
++
++ for (j = 1; ; j <<= 1)
++ if (! bigtime_test (j))
++ return 1;
++ else if (INT_MAX / 2 < j)
++ break;
++ if (! bigtime_test (INT_MAX))
++ return 1;
+ }
+- irix_6_4_bug ();
+- spring_forward_gap ();
+- exit (0);
++ return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
+ }]])],
+ [ac_cv_func_working_mktime=yes],
+ [ac_cv_func_working_mktime=no],
+--
+2.44.1
+