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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
*** Makefile.old Wed Jul 17 22:02:20 1991
--- Makefile Wed Dec 28 04:39:21 1994
***************
*** 1,5 ****
!
! CC=cc
all: unarj
--- 1,4 ----
! CFLAGS+=-DUNIX
all: unarj
--- environ.c.orig Wed Jun 23 06:07:20 1993
+++ environ.c Wed Jan 21 14:59:59 1998
@@ -435,10 +435,14 @@
#define time_t long
#endif
+#include <sys/param.h>
+
+#if !(defined(BSD) && BSD >= 199306)
extern struct tm *localtime();
extern time_t time();
extern char *strcpy();
extern voidp *malloc();
+#endif
FILE *
file_open(name, mode)
@@ -534,8 +538,12 @@
}
long
-gettz() /* returns the offset from GMT in seconds */
+gettz(stamp) /* returns the offset from GMT in seconds */
+time_t stamp;
{
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
+ return -localtime(&stamp)->tm_gmtoff;
+#else
#define NOONOFFSET 43200L
#define SEC_IN_DAY (24L * 60L * 60L)
#define INV_VALUE (SEC_IN_DAY + 1L)
@@ -551,6 +559,7 @@
noontm = localtime(&noon);
retval = NOONOFFSET - 60 * (60 * noontm->tm_hour - noontm->tm_min);
return retval;
+#endif
}
long
@@ -608,7 +617,8 @@
(uint) attribute;
(uint) host;
- m_time = mstonix(tstamp) + gettz();
+ m_time = mstonix(tstamp);
+ m_time += gettz(m_time);
tb.mtime = m_time; /* Set modification time */
tb.atime = m_time; /* Set access time */
--- unarj.h.orig Wed Jun 23 06:07:20 1993
+++ unarj.h Wed Jan 21 15:03:39 1998
@@ -104,9 +104,13 @@
#endif
typedef unsigned char uchar; /* 8 bits or more */
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
typedef unsigned int uint; /* 16 - 32 bits or more */
typedef unsigned short ushort; /* 16 bits or more */
typedef unsigned long ulong; /* 32 bits or more */
+#else
+# include <sys/types.h>
+#endif
#define USHRT_BIT (CHAR_BIT * sizeof(ushort))
|