Control: tags 1097847 + patch
Control: tags 1097847 + pending

Dear maintainer,

I've prepared an NMU for sc (versioned as 7.16-1.1.2-1.1) and uploaded 
it to DELAYED/2. Please feel free to tell me if I should cancel it.

cu
Adrian
diffstat for sc-7.16-1.1.2 sc-7.16-1.1.2

 changelog                                                               |    7 +
 patches/0001-removed-no-argument-prototype-for-pow-include-math.h.patch |   33 +++++++
 patches/0002-function-pointers-in-fn1_eval-fn2_eval-need-paramete.patch |   45 ++++++++++
 patches/0003-fixed-a-signal-handler-prototype-for-sig_save.patch        |   28 ++++++
 patches/series                                                          |    3 
 5 files changed, 116 insertions(+)

diff -Nru sc-7.16-1.1.2/debian/changelog sc-7.16-1.1.2/debian/changelog
--- sc-7.16-1.1.2/debian/changelog	2024-11-21 17:57:39.000000000 +0200
+++ sc-7.16-1.1.2/debian/changelog	2025-10-24 22:07:43.000000000 +0300
@@ -1,3 +1,10 @@
+sc (7.16-1.1.2-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Backport upstream fixes for FTBFS with GCC 15. (Closes: #1097847)
+
+ -- Adrian Bunk <[email protected]>  Fri, 24 Oct 2025 22:07:43 +0300
+
 sc (7.16-1.1.2-1) unstable; urgency=medium
 
   * Team upload of Debian team.
diff -Nru sc-7.16-1.1.2/debian/patches/0001-removed-no-argument-prototype-for-pow-include-math.h.patch sc-7.16-1.1.2/debian/patches/0001-removed-no-argument-prototype-for-pow-include-math.h.patch
--- sc-7.16-1.1.2/debian/patches/0001-removed-no-argument-prototype-for-pow-include-math.h.patch	1970-01-01 02:00:00.000000000 +0200
+++ sc-7.16-1.1.2/debian/patches/0001-removed-no-argument-prototype-for-pow-include-math.h.patch	2025-10-24 22:07:43.000000000 +0300
@@ -0,0 +1,33 @@
+From f7340575f4a042fd6f2cb26920f7892f488aafc7 Mon Sep 17 00:00:00 2001
+From: Andreas Baumann <[email protected]>
+Date: Fri, 16 May 2025 07:27:28 +0200
+Subject: removed no-argument prototype for pow, include math.h
+
+---
+ format.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/format.c b/format.c
+index 8c95f1d..a5d3c30 100644
+--- a/format.c
++++ b/format.c
+@@ -94,6 +94,7 @@
+ #include <sys/types.h>
+ #include <time.h>
+ #include <limits.h>
++#include <math.h>
+ #include "compat.h"
+ #include "sc.h"
+ 
+@@ -504,7 +505,7 @@ engformat(int fmt, int width, int lprecision, double val, char *buf, int buflen)
+ 	"+03", "+06", "+09", "+12", "+15", "+18"
+     };
+     int engind = 0;
+-    double engmant, pow(), engabs, engexp;
++    double engmant, engabs, engexp;
+ 
+     if (buflen < width) return (false);
+     if (fmt >= 0 && fmt < COLFORMATS && colformat[fmt])
+-- 
+2.30.2
+
diff -Nru sc-7.16-1.1.2/debian/patches/0002-function-pointers-in-fn1_eval-fn2_eval-need-paramete.patch sc-7.16-1.1.2/debian/patches/0002-function-pointers-in-fn1_eval-fn2_eval-need-paramete.patch
--- sc-7.16-1.1.2/debian/patches/0002-function-pointers-in-fn1_eval-fn2_eval-need-paramete.patch	1970-01-01 02:00:00.000000000 +0200
+++ sc-7.16-1.1.2/debian/patches/0002-function-pointers-in-fn1_eval-fn2_eval-need-paramete.patch	2025-10-24 22:07:43.000000000 +0300
@@ -0,0 +1,45 @@
+From 4f0d99b7a7e595f20b8592ec5f92566b405a2b45 Mon Sep 17 00:00:00 2001
+From: Andreas Baumann <[email protected]>
+Date: Fri, 16 May 2025 07:29:25 +0200
+Subject: function pointers in fn1_eval, fn2_eval need parameter in prototype
+
+---
+ interp.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/interp.c b/interp.c
+index f9e20d2..8d36c9c 100644
+--- a/interp.c
++++ b/interp.c
+@@ -75,8 +75,8 @@ struct enode *freeenodes = NULL;
+ 
+ double	dolookup(struct enode * val, int minr, int minc, int maxr,
+ 	int maxc, int offr, int offc);
+-double	fn1_eval(double (*fn)(), double arg);
+-double	fn2_eval(double (*fn)(), double arg1, double arg2);
++double	fn1_eval(double (*fn)(double), double arg);
++double	fn2_eval(double (*fn)(double, double), double arg1, double arg2);
+ static int RealEvalAll(void);
+ int	constant(register struct enode *e);
+ void	RealEvalOne(register struct ent *p, int i, int j, int *chgct);
+@@ -1018,7 +1018,7 @@ eval_fpe(int i) /* Trap for FPE errors in eval */
+ }
+ 
+ double
+-fn1_eval(double (*fn)(), double a)
++fn1_eval(double (*fn)(double), double a)
+ {
+     double res;
+     errno = 0;
+@@ -1030,7 +1030,7 @@ fn1_eval(double (*fn)(), double a)
+ }
+ 
+ double
+-fn2_eval(double (*fn)(), double arg1, double arg2)
++fn2_eval(double (*fn)(double, double), double arg1, double arg2)
+ {
+     double res;
+     errno = 0;
+-- 
+2.30.2
+
diff -Nru sc-7.16-1.1.2/debian/patches/0003-fixed-a-signal-handler-prototype-for-sig_save.patch sc-7.16-1.1.2/debian/patches/0003-fixed-a-signal-handler-prototype-for-sig_save.patch
--- sc-7.16-1.1.2/debian/patches/0003-fixed-a-signal-handler-prototype-for-sig_save.patch	1970-01-01 02:00:00.000000000 +0200
+++ sc-7.16-1.1.2/debian/patches/0003-fixed-a-signal-handler-prototype-for-sig_save.patch	2025-10-24 22:07:43.000000000 +0300
@@ -0,0 +1,28 @@
+From 5da3ace039ca70b13327d81e55db83815a191904 Mon Sep 17 00:00:00 2001
+From: Andreas Baumann <[email protected]>
+Date: Fri, 16 May 2025 07:35:34 +0200
+Subject: fixed a signal handler prototype for sig_save
+
+---
+ lex.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lex.c b/lex.c
+index 3218d1c..3d3b53e 100644
+--- a/lex.c
++++ b/lex.c
+@@ -195,9 +195,9 @@ yylex(void)
+ 	}
+     } else if ((*p == '.') || isdigit((int)*p)) {
+ #ifdef SIGVOID
+-	void (*sig_save)();
++	void (*sig_save)(int signum);
+ #else
+-	int (*sig_save)();
++	int (*sig_save)(int signum);
+ #endif
+ 	double v = 0.0;
+ 	int temp;
+-- 
+2.30.2
+
diff -Nru sc-7.16-1.1.2/debian/patches/series sc-7.16-1.1.2/debian/patches/series
--- sc-7.16-1.1.2/debian/patches/series	2024-11-21 17:57:39.000000000 +0200
+++ sc-7.16-1.1.2/debian/patches/series	2025-10-24 22:07:43.000000000 +0300
@@ -5,3 +5,6 @@
 #hardening
 #fix-ftbfs-implicit-function-declaration.patch
 no-rpath.patch
+0001-removed-no-argument-prototype-for-pow-include-math.h.patch
+0002-function-pointers-in-fn1_eval-fn2_eval-need-paramete.patch
+0003-fixed-a-signal-handler-prototype-for-sig_save.patch

Reply via email to