head 1.1; access; symbols OPENPKG_E1_MP_HEAD:1.1 OPENPKG_E1_MP:1.1 OPENPKG_E1_MP_2_STABLE:1.1 OPENPKG_E1_FP:1.1 OPENPKG_2_STABLE_MP:1.1 OPENPKG_2_STABLE_20061018:1.1 OPENPKG_2_STABLE_20060622:1.1 OPENPKG_2_STABLE:1.1.0.14 OPENPKG_2_STABLE_BP:1.1 OPENPKG_2_5_RELEASE:1.1 OPENPKG_2_5_SOLID:1.1.0.12 OPENPKG_2_5_SOLID_BP:1.1 OPENPKG_2_4_RELEASE:1.1 OPENPKG_2_4_SOLID:1.1.0.10 OPENPKG_2_4_SOLID_BP:1.1 OPENPKG_CW_FP:1.1 OPENPKG_2_3_RELEASE:1.1 OPENPKG_2_3_SOLID:1.1.0.8 OPENPKG_2_3_SOLID_BP:1.1 OPENPKG_2_2_RELEASE:1.1 OPENPKG_2_2_SOLID:1.1.0.6 OPENPKG_2_2_SOLID_BP:1.1 OPENPKG_2_1_RELEASE:1.1 OPENPKG_2_1_SOLID:1.1.0.4 OPENPKG_2_1_SOLID_BP:1.1 OPENPKG_2_0_RELEASE:1.1 OPENPKG_2_0_SOLID:1.1.0.2 OPENPKG_2_0_SOLID_BP:1.1; locks; strict; comment @# @; 1.1 date 2004.01.24.21.27.56; author rse; state Exp; branches; next ; desc @@ 1.1 log @make more portable @ text @Index: environ.c --- environ.c.orig Sat Jan 24 22:25:16 2004 +++ environ.c Sat Jan 24 22:26:27 2004 @@@@ -430,18 +430,13 @@@@ #define SUBS_DEFINED +#include +#include +#include #include #include #include - -#ifndef time_t -#define time_t long -#endif - -extern struct tm *localtime(); -extern time_t time(); -extern char *strcpy(); -extern voidp *malloc(); +#include FILE * file_open(name, mode) @@@@ -545,12 +540,12 @@@@ #define SEC_IN_DAY (24L * 60L * 60L) #define INV_VALUE (SEC_IN_DAY + 1L) static long retval = INV_VALUE; - long now, noon; + time_t now, noon; struct tm *noontm; if (retval != INV_VALUE) return retval; - now = (long) time((long *) 0); + now = time(NULL); /* Find local time for GMT noon today */ noon = now - now % SEC_IN_DAY + NOONOFFSET ; noontm = localtime(&noon); @