summaryrefslogtreecommitdiffstats
path: root/src/misc/util
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2008-07-02 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2008-07-02 08:01:00 -0700
commit303baf27cf34c2a57db97c4c567fd744241fa14b (patch)
treed6235cca48e7bdfe5884e517058c7791e66bb806 /src/misc/util
parentfa67e3c19e27c011517b91182eb3929412aaf402 (diff)
downloadabc-303baf27cf34c2a57db97c4c567fd744241fa14b.tar.gz
abc-303baf27cf34c2a57db97c4c567fd744241fa14b.tar.bz2
abc-303baf27cf34c2a57db97c4c567fd744241fa14b.zip
Version abc80702
Diffstat (limited to 'src/misc/util')
-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.