From f4bd17eab2667962090fc8a918b553badad671bc Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 10 Jan 2014 19:53:11 -0800 Subject: * configure (lang_flags): Let us switch from using _XOPEN_SOURCE=2 to _POSIX_C_SOURCE=199309L and _BSD_SOURCE. In the .exe suffix test, try harder to redirect ls's output. Test for fork stuff now needs evidently; does not necessarily pid_t, even though it defines functions that return and accept pid_t! The timegm test no longer needs _SVID_SOURCE since _BSD_SOURCE covers it, and so we end up not using _SVID_SOURCE any more. New tests for usleep and nanosleep. The test for setenv is not conditional on timegm failing. * eval.c: Include and conditionally . (usleep_wrap): New function. (eval_init): New usleep_wrap function registered as usleep intrinsic. * lib.c: Only define setenv and unsetenv if we don't have timegm, because only in that situation they are used. --- lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib.c') diff --git a/lib.c b/lib.c index 194e0c65..9662668b 100644 --- a/lib.c +++ b/lib.c @@ -5190,6 +5190,8 @@ val make_time(val year, val month, val day, return make_time_impl(mktime, year, month, day, hour, minute, second, isdst); } +#if !HAVE_TIMEGM + #if !HAVE_SETENV static void setenv(const char *name, const char *value, int overwrite) @@ -5206,10 +5208,8 @@ unsetenv(const char *name) { setenv(name, "", 1); } - #endif -#if !HAVE_TIMEGM static time_t timegm_hack(struct tm *tm) { time_t ret; -- cgit v1.2.3