summaryrefslogtreecommitdiff
path: root/libguile
diff options
context:
space:
mode:
Diffstat (limited to 'libguile')
-rw-r--r--libguile/_scm.h19
-rw-r--r--libguile/inline.h2
-rw-r--r--libguile/threads.h2
3 files changed, 21 insertions, 2 deletions
diff --git a/libguile/_scm.h b/libguile/_scm.h
index 15faa1734..ff033ded0 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"
diff --git a/libguile/inline.h b/libguile/inline.h
index 7d2dabaad..ff8d2d4d1 100644
--- a/libguile/inline.h
+++ b/libguile/inline.h
@@ -54,7 +54,7 @@
C99 mode and doesn't define `__GNUC_STDC_INLINE__'. Fall back to "static
inline" in that case. */
-# if (defined __GNUC__) && (!(__APPLE_CC__ > 5400 && __STDC_VERSION__ >= 199901L))
+# if (defined __GNUC__) && (!(((defined __APPLE_CC__) && (__APPLE_CC__ > 5400)) && __STDC_VERSION__ >= 199901L))
# define SCM_C_USE_EXTERN_INLINE 1
# if (defined __GNUC_STDC_INLINE__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 2)
# define SCM_C_EXTERN_INLINE \
diff --git a/libguile/threads.h b/libguile/threads.h
index 9ce04e1ff..59c7c2c60 100644
--- a/libguile/threads.h
+++ b/libguile/threads.h
@@ -210,7 +210,7 @@ SCM_API int scm_pthread_cond_wait (pthread_cond_t *cond,
pthread_mutex_t *mutex);
SCM_API int scm_pthread_cond_timedwait (pthread_cond_t *cond,
pthread_mutex_t *mutex,
- const struct timespec *abstime);
+ const scm_t_timespec *abstime);
#endif
/* More convenience functions.