aboutsummaryrefslogtreecommitdiff
path: root/boehm-gc/tools/gcname.c
diff options
context:
space:
mode:
Diffstat (limited to 'boehm-gc/tools/gcname.c')
-rw-r--r--boehm-gc/tools/gcname.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/boehm-gc/tools/gcname.c b/boehm-gc/tools/gcname.c
new file mode 100644
index 00000000000..74be553c977
--- /dev/null
+++ b/boehm-gc/tools/gcname.c
@@ -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(void)
+{
+ 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;
+}