summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-01-10 19:53:11 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-01-10 19:53:11 -0800
commitf4bd17eab2667962090fc8a918b553badad671bc (patch)
treee1d9568e3ca63300474c7b2789fb0ec4d3089f80 /lib.c
parentaf2af7a4ed4321f955251f9da13a161a1e8940b3 (diff)
downloadtxr-f4bd17eab2667962090fc8a918b553badad671bc.tar.gz
txr-f4bd17eab2667962090fc8a918b553badad671bc.tar.bz2
txr-f4bd17eab2667962090fc8a918b553badad671bc.zip
* 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 <sys/types.h> evidently; <unistd.h> 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 <time.h> and conditionally <windows.h>. (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.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c4
1 files changed, 2 insertions, 2 deletions
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;