head	1.2;
access;
symbols
	RELEASE_8_3_0:1.2
	RELEASE_9_0_0:1.2
	RELEASE_7_4_0:1.2
	RELEASE_8_2_0:1.2
	RELEASE_6_EOL:1.2
	RELEASE_8_1_0:1.2
	RELEASE_7_3_0:1.2
	RELEASE_8_0_0:1.2
	RELEASE_7_2_0:1.2
	RELEASE_7_1_0:1.2
	RELEASE_6_4_0:1.2
	RELEASE_5_EOL:1.2
	RELEASE_7_0_0:1.2
	RELEASE_6_3_0:1.2
	PRE_XORG_7:1.2
	RELEASE_4_EOL:1.2
	RELEASE_6_2_0:1.2
	RELEASE_6_1_0:1.2
	RELEASE_5_5_0:1.2
	RELEASE_6_0_0:1.2
	RELEASE_5_4_0:1.2
	RELEASE_4_11_0:1.2
	RELEASE_5_3_0:1.2
	RELEASE_4_10_0:1.2
	RELEASE_5_2_1:1.2
	RELEASE_5_2_0:1.2
	RELEASE_4_9_0:1.2
	RELEASE_5_1_0:1.2
	RELEASE_4_8_0:1.2
	RELEASE_5_0_0:1.2
	RELEASE_4_7_0:1.2
	RELEASE_4_6_2:1.2
	RELEASE_4_6_1:1.2
	RELEASE_4_6_0:1.2
	RELEASE_5_0_DP1:1.2
	RELEASE_4_5_0:1.2
	RELEASE_4_4_0:1.2
	RELEASE_4_3_0:1.2
	RELEASE_4_2_0:1.2
	RELEASE_4_1_1:1.2
	RELEASE_4_1_0:1.2
	RELEASE_3_5_0:1.2
	RELEASE_4_0_0:1.2
	RELEASE_3_4_0:1.2
	RELEASE_3_3_0:1.2
	RELEASE_3_2_0:1.2
	RELEASE_3_1_0:1.1;
locks; strict;
comment	@# @;


1.2
date	99.02.17.22.25.40;	author ache;	state Exp;
branches;
next	1.1;

1.1
date	99.01.03.07.59.26;	author simokawa;	state Exp;
branches;
next	;


desc
@@


1.2
log
@upgrade to 2.43
@
text
@--- environ.c.orig	Mon Sep 29 14:00:24 1997
+++ environ.c	Thu Feb 18 01:14:35 1999
@@@@ -430,16 +430,24 @@@@
 
 #define SUBS_DEFINED
 
+#include <stdlib.h>
+#include <string.h>
 #include <time.h>
+#include <sys/types.h>
+#include <utime.h>
 
-#ifndef time_t
-#define time_t long
-#endif
+/*#ifndef time_t
+ #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)
@@@@ -535,8 +543,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)
@@@@ -552,6 +564,7 @@@@
     noontm = localtime(&noon);
     retval = NOONOFFSET - 60 * (60 * noontm->tm_hour - noontm->tm_min);
     return retval;
+#endif
 }
 
 long
@@@@ -600,19 +613,29 @@@@
 {
     time_t m_time;
     struct utimbuf
+#ifndef __FreeBSD__
     {
        time_t atime;             /* New access time */
        time_t mtime;             /* New modification time */
     } tb;
+#else
+    tb;
+#endif
 
     (char *) name;
     (uint) attribute;
     (uint) host;
 
-    m_time = mstonix(tstamp) + gettz();
+    m_time = mstonix(tstamp);
+    m_time += gettz(m_time);
 
+#ifndef __FreeBSD__
     tb.mtime = m_time;                  /* Set modification time */
     tb.atime = m_time;                  /* Set access time */
+#else
+    tb.modtime = m_time;                /* Set modification time */
+    tb.actime = m_time;                 /* Set access time */
+#endif
 
     /* set the time stamp on the file */
     return utime(name, &tb);
@


1.1
log
@- fix time_t conflicts on alpha
- split up patches into one source file per patch file.
Obtained from: NetBSD (with a litte modification by me)
@
text
@d1 3
a3 3
--- environ.c.orig	Tue Jun 22 22:07:20 1993
+++ environ.c	Sat Dec 26 08:39:07 1998
@@@@ -429,16 +429,23 @@@@
d11 1
d31 1
a31 1
@@@@ -534,8 +541,12 @@@@
d45 1
a45 1
@@@@ -551,6 +562,7 @@@@
d53 14
a66 1
@@@@ -608,7 +620,8 @@@@
d74 1
d77 7
@

