Adjust to be usable with `libgc' 7.1.
authorLudovic Courtès <ludo@gnu.org>
Wed, 10 Sep 2008 22:44:13 +0000 (00:44 +0200)
committerLudovic Courtès <ludo@gnu.org>
Wed, 10 Sep 2008 22:44:13 +0000 (00:44 +0200)
* libguile/boehm-gc.h: Only include <gc/gc_local_alloc.h> with
  `libgc' 6.x.  Define `GC_PTR' for `libgc' 7.x+.

libguile/boehm-gc.h

index 49a3695..ea8ad51 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef SCM_BOEHM_GC_H
 #define SCM_BOEHM_GC_H
 
-/* Copyright (C) 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2006, 2008 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
 #endif
 
 #include <gc/gc.h>
-#include <gc/gc_local_alloc.h>
+
+#if (defined GC_VERSION_MAJOR) && (GC_VERSION_MAJOR < 7)
+/* This was needed with `libgc' 6.x.  */
+# include <gc/gc_local_alloc.h>
+#endif
+
+#if (defined GC_VERSION_MAJOR) && (GC_VERSION_MAJOR >= 7)
+/* This type was provided by `libgc' 6.x.  */
+typedef void *GC_PTR;
+#endif
 
 #endif /* SCM_BOEHM_GC_H */