summaryrefslogtreecommitdiffstats
path: root/Python/getcompiler.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/getcompiler.c')
-rw-r--r--Python/getcompiler.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/Python/getcompiler.c b/Python/getcompiler.c
new file mode 100644
index 0000000..a65789f
--- /dev/null
+++ b/Python/getcompiler.c
@@ -0,0 +1,17 @@
+#ifdef __GNUC__
+#define COMPILER " [GCC " __VERSION__ "]"
+#endif
+
+#ifndef COMPILER
+#ifdef __cplusplus
+#define COMPILER "[C++]"
+#else
+#define COMPILER "[C]"
+#endif
+#endif
+
+char *
+getcompiler()
+{
+ return COMPILER;
+}