diff options
Diffstat (limited to 'Zend/zend_long.h')
-rw-r--r-- | Zend/zend_long.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Zend/zend_long.h b/Zend/zend_long.h index 60d1c71d3c..e6713da871 100644 --- a/Zend/zend_long.h +++ b/Zend/zend_long.h @@ -59,6 +59,7 @@ typedef int32_t zend_off_t; #ifdef ZEND_ENABLE_ZVAL_LONG64 # define ZEND_LONG_FMT "%" PRId64 # define ZEND_ULONG_FMT "%" PRIu64 +# define ZEND_XLONG_FMT "%" PRIx64 # define ZEND_LONG_FMT_SPEC PRId64 # define ZEND_ULONG_FMT_SPEC PRIu64 # ifdef ZEND_WIN32 @@ -87,6 +88,7 @@ typedef int32_t zend_off_t; # define ZEND_STRTOUL(s0, s1, base) strtoul((s0), (s1), (base)) # define ZEND_LONG_FMT "%" PRId32 # define ZEND_ULONG_FMT "%" PRIu32 +# define ZEND_XLONG_FMT "%" PRIx32 # define ZEND_LONG_FMT_SPEC PRId32 # define ZEND_ULONG_FMT_SPEC PRIu32 # ifdef ZEND_WIN32 @@ -117,6 +119,16 @@ typedef int32_t zend_off_t; static const char long_min_digits[] = LONG_MIN_DIGITS; +#ifdef _WIN64 +# define ZEND_ADDR_FMT "0x%016I64x" +#elif SIZEOF_SIZE_T == 4 +# define ZEND_ADDR_FMT "0x%08zx" +#elif SIZEOF_SIZE_T == 8 +# define ZEND_ADDR_FMT "0x%016zx" +#else +# error "Unknown SIZEOF_SIZE_T" +#endif + #endif /* ZEND_LONG_H */ /* |