implemented Setup.hs to build boehm cpp libs and install them;
[hs-boehmgc.git] / gc-7.2 / extra / gcname.c
diff --git a/gc-7.2/extra/gcname.c b/gc-7.2/extra/gcname.c
new file mode 100644 (file)
index 0000000..11cbeb1
--- /dev/null
@@ -0,0 +1,17 @@
+#include <stdio.h>
+#include <gc.h>
+
+#ifndef GC_ALPHA_VERSION
+# define GC_ALPHA_VERSION GC_TMP_ALPHA_VERSION
+#endif
+
+int main()
+{
+    if (GC_ALPHA_VERSION == GC_NOT_ALPHA) {
+       printf("gc%d.%d", GC_VERSION_MAJOR, GC_VERSION_MINOR);
+    } else {
+       printf("gc%d.%dalpha%d", GC_VERSION_MAJOR,
+                                GC_VERSION_MINOR, GC_ALPHA_VERSION);
+    }
+    return 0;
+}