Darwinize. Instead of the deprecated timelocal() (which doesn't
exist on Darwin), use mktime() with a negative tm_isdst. Thanks to christos for comments.
This commit is contained in:
parent
9bc3b49de3
commit
035f65f2e2
2 changed files with 9 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
$NetBSD: distinfo,v 1.2 2001/04/18 11:21:02 agc Exp $
|
||||
$NetBSD: distinfo,v 1.3 2002/06/10 15:09:16 schmonz Exp $
|
||||
|
||||
SHA1 (arc521e.pl8.tar.Z) = 34210f9aeaac39a15b34e6aa400b38127b6a2a20
|
||||
Size (arc521e.pl8.tar.Z) = 100821 bytes
|
||||
SHA1 (patch-aa) = 62324f346559b2997eba56698b1c0c1c29a328c3
|
||||
SHA1 (patch-ab) = 607c5fd0f5083c573a59d2b1fafbf982dc282ae4
|
||||
SHA1 (patch-ab) = dfdfde740d70511adba711bb0a228154a9c9993e
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
$NetBSD: patch-ab,v 1.1 1999/05/22 19:54:09 tv Exp $
|
||||
$NetBSD: patch-ab,v 1.2 2002/06/10 15:09:17 schmonz Exp $
|
||||
|
||||
--- arcdos.c.orig Tue Apr 14 18:58:21 1992
|
||||
+++ arcdos.c Sat May 22 15:43:27 1999
|
||||
@@ -173,14 +173,20 @@
|
||||
+++ arcdos.c Sun Jun 9 12:01:30 2002
|
||||
@@ -173,14 +173,21 @@
|
||||
struct tm tm;
|
||||
struct timeval tvp[2];
|
||||
int utimes();
|
||||
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
|
||||
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__APPLE__)
|
||||
long tmclock();
|
||||
+#endif
|
||||
tm.tm_sec = (time & 31) * 2;
|
||||
|
@ -15,10 +15,11 @@ $NetBSD: patch-ab,v 1.1 1999/05/22 19:54:09 tv Exp $
|
|||
tm.tm_mday = date & 31;
|
||||
tm.tm_mon = ((date >> 5) & 15) - 1;
|
||||
tm.tm_year = (date >> 9) + 80;
|
||||
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
|
||||
+ tm.tm_isdst = -1;
|
||||
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__APPLE__)
|
||||
tvp[0].tv_sec = tmclock(&tm);
|
||||
+#else
|
||||
+ tvp[0].tv_sec = timelocal(&tm);
|
||||
+ tvp[0].tv_sec = mktime(&tm);
|
||||
+#endif
|
||||
tvp[1].tv_sec = tvp[0].tv_sec;
|
||||
tvp[0].tv_usec = tvp[1].tv_usec = 0;
|
||||
|
|
Loading…
Reference in a new issue