summaryrefslogtreecommitdiffstats
path: root/src/misc/util/port_type.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc/util/port_type.h')
-rw-r--r--src/misc/util/port_type.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/misc/util/port_type.h b/src/misc/util/port_type.h
index 316905f3..67b7d454 100644
--- a/src/misc/util/port_type.h
+++ b/src/misc/util/port_type.h
@@ -41,6 +41,24 @@ typedef unsigned int PORT_PTRUINT_T;
#error unknown platform
#endif /* defined(PLATFORM) */
+/**
+ * Signed integral type that can contain a pointer.
+ *
+ * This is a signed integral type that is the same size as a pointer.
+ *
+ * NOTE: This type may be different sizes on different platforms.
+ */
+#if defined(__ccdoc__)
+typedef platform_dependent_type PORT_PTRINT_T;
+#elif defined(LIN64)
+typedef long PORT_PTRINT_T;
+#elif defined(NT64)
+typedef long long PORT_PTRINT_T;
+#elif defined(NT) || defined(LIN) || defined(WIN32)
+typedef int PORT_PTRINT_T;
+#else
+ #error unknown platform
+#endif /* defined(PLATFORM) */
/**
* 64-bit signed integral type.