summaryrefslogtreecommitdiff
path: root/libguile/gen-scmconfig.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2012-07-06 10:43:02 +0200
committerAndy Wingo <wingo@pobox.com>2012-07-06 10:43:02 +0200
commit3b6e61982466d2a4b5cc7de6c83c4a553ffab72c (patch)
tree2cbbed08160cc8ed5d5ffde40d05141d2527f0e5 /libguile/gen-scmconfig.c
parent13e3d3d95dcb6c9cb4b3d69129d6b5fd9ad2e65a (diff)
downloadguile-3b6e61982466d2a4b5cc7de6c83c4a553ffab72c.tar.gz
be sure to include time.h for struct timespec
* libguile/gen-scmconfig.c: The GNU libc manual says that struct timespec is defined in time.h. So, just include both sys/time.h and time.h, if they are available.
Diffstat (limited to 'libguile/gen-scmconfig.c')
-rw-r--r--libguile/gen-scmconfig.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/libguile/gen-scmconfig.c b/libguile/gen-scmconfig.c
index 176f25c02..77ab94ff7 100644
--- a/libguile/gen-scmconfig.c
+++ b/libguile/gen-scmconfig.c
@@ -149,18 +149,17 @@ main (int argc, char *argv[])
pf ("/* limits.h not available */\n");
#endif
-# ifdef TIME_WITH_SYS_TIME
+#if HAVE_SYS_TIME_H
pf ("#include <sys/time.h>\n");
+#else
+ pf ("/* sys/time.h not available */\n");
+#endif
+
+#if HAVE_TIME_H
pf ("#include <time.h>\n");
-# else
-# ifdef HAVE_SYS_TIME_H
- pf ("#include <sys/time.h>\n");
-# else
-# ifdef HAVE_TIME_H
- pf ("#include <time.h>\n");
-# endif
-# endif
-# endif
+#else
+ pf ("/* time.h not available */\n");
+#endif
pf("\n");
#ifdef STDC_HEADERS