OpenBSD fixes for dtcm. There are no global "timezone" and "tzname" symbols on BSD. Apart from that, mainly #ifdefs.

This commit is contained in:
Pascal Stumpf
2012-08-10 14:44:57 +02:00
committed by Jon Trulson
parent 3718075b7c
commit 57463ec10e
10 changed files with 34 additions and 1 deletions

View File

@@ -1008,6 +1008,7 @@ init_time()
_Xltimeparams localtime_buf;
_Xgtimeparams gmtime_buf;
#ifdef SVR4
/* Fix for QAR 31607 */
tzset();
if (getenv("TZ") == NULL){
@@ -1017,6 +1018,7 @@ init_time()
putenv(tzptr);
tzset();
}
#endif
t = now();
tm = *_XLocaltime(&t, localtime_buf);