* gc_os_dep.c (GC_noop1, GC_bool, TRUE, FALSE, VOLATILE):
authorMarius Vollmer <mvo@zagadka.de>
Wed, 18 Oct 2000 18:27:55 +0000 (18:27 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Wed, 18 Oct 2000 18:27:55 +0000 (18:27 +0000)
Definitions copied from Boehm collector.

libguile/gc_os_dep.c

index f0e37bc..4ce37ec 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 /*
- * Copied from gc5.2, files "os_dep.c", "gc_priv.h"and "gcconfig.h",
+ * Copied from gc5.2, files "os_dep.c", "gc_priv.h", "mark.c" and "gcconfig.h",
  * and modified for Guile by Marius Vollmer.  
  */
 
@@ -45,6 +45,32 @@ typedef long GC_signed_word;
 typedef GC_word word;
 typedef GC_signed_word signed_word;
 
+typedef int GC_bool;
+# define TRUE 1
+# define FALSE 0
+
+#if defined(__STDC__)
+#   include <stdlib.h>
+#   if !(defined( sony_news ) )
+#       include <stddef.h>
+#   endif
+#   define VOLATILE volatile
+#else
+#   ifdef MSWIN32
+#      include <stdlib.h>
+#   endif
+#   define VOLATILE
+#endif
+
+/* Single argument version, robust against whole program analysis. */
+static void GC_noop1(x)
+word x;
+{
+    static VOLATILE word sink;
+
+    sink = x;
+}
+
 /* Machine dependent parameters.  Some tuning parameters can be found  */
 /* near the top of gc_private.h.                                       */