On Linux, use SVR4's (now POSIX) mktime() instead of BSD's non-standard timelocal().

This commit is contained in:
Lev Kujawski
2021-01-06 12:17:28 -07:00
committed by Jon Trulson
parent 0e282a0ad7
commit 13c173d22c
2 changed files with 12 additions and 12 deletions

View File

@@ -286,7 +286,7 @@ paint_month(Calendar *c, Tick key, XRectangle *rect)
tm = *_XLocaltime(&key, localtime_buf);
tm.tm_mday = 1;
#ifdef SVR4
#if defined(SVR4) || defined(__linux__)
tm.tm_isdst = -1;
day = mktime(&tm);
#else
@@ -466,7 +466,7 @@ layout_month(
tm = *_XLocaltime(&date, localtime_buf);
tm.tm_mday = 1;
#ifdef SVR4
#if defined(SVR4) || defined(__linux__)
tm.tm_isdst = -1;
day = mktime(&tm);
#else
@@ -703,7 +703,7 @@ count_month_pages(Calendar *c, Tick start_date, int lines_per_box)
tm = *_XLocaltime(&start_date, localtime_buf);
tm.tm_mday = 1;
#ifdef SVR4
#if defined(SVR4) || defined(__linux__)
tm.tm_isdst = -1;
day = (int)mktime(&tm);
#else