summaryrefslogtreecommitdiff
path: root/math/sc/patches/patch-ac
blob: 355fc3e34c7034c36a15c50ea0b7bdf7e40df16e (plain)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
$NetBSD: patch-ac,v 1.3 2005/11/10 17:23:18 joerg Exp $

--- interp.c.orig	1992-05-11 18:43:36.000000000 +0000
+++ interp.c
@@ -21,13 +21,13 @@
 #include <ieeefp.h>
 #endif /* IEEE_MATH */
 
+#include <errno.h>
 #include <math.h>
 #include <signal.h>
 #include <setjmp.h>
 #include <stdio.h>
 #include <ctype.h>
 
-extern int errno;		/* set by math functions */
 #ifdef BSD42
 #include <strings.h>
 #include <sys/time.h>
@@ -476,7 +476,7 @@ double
 dodts(mo, day, yr)
 int mo, day, yr;
 {
-    long trial;
+    time_t trial;
     register struct tm *tp; 
     register int i;
     register long jdate;
@@ -551,15 +551,13 @@ dotime(which, when)
 int which;
 double when;
 {
-	long time();
-
 	static long t_cache;
 	static struct tm tm_cache;
 	struct tm *tp;
-	long tloc;
+	time_t tloc;
 
 	if (which == NOW) 
-	    return (double)time((long *)0);
+	    return (double)time(NULL);
 
 	tloc = (long)when;