File: 0001-removed-no-argument-prototype-for-pow-include-math.h.patch

package info (click to toggle)
sc 7.16-1.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,116 kB
  • sloc: ansic: 18,674; yacc: 1,334; sh: 1,127; makefile: 187; lisp: 99; sed: 4
file content (33 lines) | stat: -rw-r--r-- 891 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From f7340575f4a042fd6f2cb26920f7892f488aafc7 Mon Sep 17 00:00:00 2001
From: Andreas Baumann <mail@andreasbaumann.cc>
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