Fix: Don't cast SCM values to pointer. Use SCM2PTR instead.
[bpt/guile.git] / libguile / coop-defs.h
index ce0e947..30516c3 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef COOP_DEFSH
 #define COOP_DEFSH
 
-/*     Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/*     Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -153,7 +153,7 @@ extern int coop_mutex_lock (coop_m*);
 extern int coop_mutex_trylock (coop_m*);
 extern int coop_mutex_unlock (coop_m*);
 extern int coop_mutex_destroy (coop_m*);
-#define scm_mutex_init coop_new_mutex_init
+#define scm_mutex_init coop_mutex_init
 #define scm_mutex_lock coop_mutex_lock
 #define scm_mutex_trylock coop_mutex_lock
 #define scm_mutex_unlock coop_mutex_unlock
@@ -170,6 +170,16 @@ typedef int coop_cattr;
 
 typedef coop_c scm_cond_t;
 
+#ifndef HAVE_STRUCT_TIMESPEC
+/* POSIX.4 structure for a time value.  This is like a `struct timeval' but
+   has nanoseconds instead of microseconds.  */
+struct timespec
+{
+  long int tv_sec;             /* Seconds.  */
+  long int tv_nsec;            /* Nanoseconds.  */
+};
+#endif
+
 extern int coop_condition_variable_init (coop_c*);
 extern int coop_new_condition_variable_init (coop_c*, coop_cattr*);
 extern int coop_condition_variable_wait_mutex (coop_c*, coop_m*);
@@ -273,3 +283,9 @@ do { \
 #define SCM_SET_THREAD_LOCAL_DATA(ptr) (coop_global_curr->data = (ptr))
 
 #endif /* COOP_DEFSH */
+
+/*
+  Local Variables:
+  c-file-style: "gnu"
+  End:
+*/