summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Jerram <neil@ossau.uklinux.net>2009-01-23 01:02:46 +0000
committerNeil Jerram <neil@ossau.uklinux.net>2009-01-23 01:02:46 +0000
commitd6818567553aafdbbbca327d4a1b1289a6816858 (patch)
tree0f7eae1b4e0e1078600c0d50be81529c346f71d5
parente4c39847a2b083829d111fcae4e9459d2f8a4ba1 (diff)
downloadguile-d6818567553aafdbbbca327d4a1b1289a6816858.tar.gz
Fix MinGW HAVE_STRUCT_TIMESPEC build problem
Reported by Carlo Bramini. See the comment in _scm.h. * THANKS: Add Carlo Bramini. * libguile/_scm.h: Undefine HAVE_STRUCT_TIMESPEC.
-rw-r--r--NEWS1
-rw-r--r--THANKS1
-rw-r--r--libguile/_scm.h19
3 files changed, 21 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index bd96d141b..128af079f 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ Changes in 1.8.7 (since 1.8.6)
* Bugs fixed
** Fix %fast-slot-ref/set!, to avoid possible segmentation fault
+** Fix MinGW build problem caused by HAVE_STRUCT_TIMESPEC confusion
Changes in 1.8.6 (since 1.8.5)
diff --git a/THANKS b/THANKS
index e07db45c4..1853a67ce 100644
--- a/THANKS
+++ b/THANKS
@@ -23,6 +23,7 @@ For fixes or providing information which led to a fix:
David Allouche
Martin Baulig
Fabrice Bauzac
+ Carlo Bramini
Rob Browning
Adrian Bunk
Michael Carmack
diff --git a/libguile/_scm.h b/libguile/_scm.h
index 6b728be2b..e40f29bb0 100644
--- a/libguile/_scm.h
+++ b/libguile/_scm.h
@@ -38,6 +38,25 @@
# include <config.h>
#endif
+/* Undefine HAVE_STRUCT_TIMESPEC, because the libguile C code doesn't
+ need it anymore, and because on MinGW:
+
+ - the definition of struct timespec is provided (if at all) by
+ pthread.h
+
+ - pthread.h will _not_ define struct timespec if
+ HAVE_STRUCT_TIMESPEC is 1, because then it thinks that it doesn't
+ need to.
+
+ The libguile C code doesn't need HAVE_STRUCT_TIMESPEC anymore,
+ because the value of HAVE_STRUCT_TIMESPEC has already been
+ incorporated in how scm_t_timespec is defined (in scmconfig.h), and
+ the rest of the libguile C code now just uses scm_t_timespec.
+ */
+#ifdef HAVE_STRUCT_TIMESPEC
+#undef HAVE_STRUCT_TIMESPEC
+#endif
+
#include <errno.h>
#include "libguile/__scm.h"