From 303baf27cf34c2a57db97c4c567fd744241fa14b Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Wed, 2 Jul 2008 08:01:00 -0700 Subject: Version abc80702 --- src/misc/util/port_type.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/misc/util') 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. -- cgit v1.2.3