Branch: Tag:

2019-03-18

2019-03-18 22:27:31 by Tobias S. Josefowitz <tobij@tobij.de>

EFUNs: Silence compiler warning

GCC 8 became much more aggressive about warning about casts between
incompatible function pointers. mktime_zone() is now thus more careful
and uses putenv() through a wrapper in SET_ONERROR() only.

5923:    encode_struct_tm(tm, 0);   }    + static void my_putenv(void *s) + { +  putenv(s); + } +    /*! @decl mapping(string:int) localtime(int timestamp)    *!    *! Convert seconds since 00:00:00 UTC, 1 Jan 1970 into components.
6034:    orig_tz = "TZ";   #endif    } -  SET_ONERROR(uwp, putenv, orig_tz); +  SET_ONERROR(uwp, my_putenv, orig_tz);    /* NB: No need to call tzset(); mktime() will call it. */    retval = mktime_zone(date, 0, 0);    CALL_AND_UNSET_ONERROR(uwp);