summaryrefslogtreecommitdiff
path: root/include/platform.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-02-05 11:20:25 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-02-05 11:20:25 +0100
commitae07ef4cf606147c77b6ba472956e2793e251ba6 (patch)
treee09077fe8f2264446992494a5851e869cac0e66b /include/platform.h
parent877c2529e86686cc2005e7a523d061c955a4f468 (diff)
for 32bit systems there was a compile issue, hopefully this commit solves that (issue 167)
Diffstat (limited to 'include/platform.h')
-rw-r--r--include/platform.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h
new file mode 100644
index 0000000..561cd60
--- /dev/null
+++ b/include/platform.h
@@ -0,0 +1,27 @@
+/**
+ * Platform.h
+ *
+ * Macro that we use to find out whether we run on 64bit or 32bit
+ * platforms.
+ *
+ * @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
+ * @copyright 2015 Copernica BV
+ */
+
+// Check windows
+#if _WIN32 || _WIN64
+#if _WIN64
+#define PHPCPP_64BIT
+#else
+#define PHPCPP_32BIT
+#endif
+#endif
+
+// Check GCC and clang
+#if __GNUC__ || __clang__
+#if __x86_64__ || __ppc64__
+#define PHPCPP_64BIT
+#else
+#define PHPCPP_32BIT
+#endif
+#endif