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
47
48
49
|
$NetBSD: patch-ab,v 1.1.1.1 1998/12/03 15:08:53 frueauf Exp $
--- logs.c.orig Mon Oct 26 05:35:01 1998
+++ logs.c Mon Nov 30 16:25:23 1998
@@ -142,10 +142,10 @@
htm.tm_hour=12;
htm.tm_min=0;
htm.tm_sec=0;
-#ifndef SUNOS41x
- htt=mktime(&htm);
-#else
+#ifdef SUNOS41x
htt=timelocal(&htm);
+#else
+ htt=mktime(&htm);
#endif
memcpy(&ptm, localtime(&htt), sizeof(struct tm));
@@ -2483,13 +2483,13 @@
{
char emsg[MSGLEN_ERR+1];
-#ifndef SUNOS5x
+#ifdef HAVE_STRERROR
+ sprintf(emsg, "xISP: %s: %s\n", msg, strerror(errno));
+#else
if (errno < sys_nerr)
sprintf(emsg, "xISP: %s: %s\n", msg, sys_errlist[errno]);
else
sprintf(emsg, "xISP: %s: error #%d\n", msg, errno);
-#else
- sprintf(emsg, "xISP: %s: %s\n", msg, strerror(errno));
#endif
fputs(emsg, stderr);
exit(1);
@@ -2529,10 +2529,10 @@
}
for (++p; *p==' '; p++);
strncpy(sparam, p, sizeof(sparam)-1);
-#ifndef SUNOS41x
- *data = strtoul(sparam, &endp, 10);
-#else
+#ifdef SUNOS41x
*data = (unsigned long)strtol(sparam, &endp, 10);
+#else
+ *data = strtoul(sparam, &endp, 10);
#endif
return(line);
}
|