pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:5916:    if (!gmtime_s (&tm_s, &t)) tm = &tm_s; else tm = NULL;   #else    tm = gmtime(&t);   #endif    if (!tm) Pike_error ("gmtime() on this system cannot handle "    "the timestamp %"PRINTINT64"d.\n", (INT64) t);    pop_n_elems(args);    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.    *!    *! @returns    *! This function returns a mapping with the following components:    *! @mapping    *! @member int(0..60) "sec"    *! Seconds over the minute.    *! @member int(0..59) "min"
pike.git/src/builtin_functions.c:6027:    (tz/60)%60,    tz % 60);    putenv(tzbuf);    if (!orig_tz) {   #ifdef PUTENV_ALWAYS_REQUIRES_EQUAL    orig_tz = "TZ=";   #else    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);    return retval;    }    Pike_error("Time conversion unsuccessful.\n");    }       if(other_timezone)    {