summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-26 09:49:54 +0200
committerAnatol Belski <ab@php.net>2014-08-26 09:49:54 +0200
commit5d030000c1d65cf03ce8bec4b74079708100ddad (patch)
tree7e65603b8c081f43e7c6f2e6158cd76a4b2f04bb
parentc49cd84da92c411d9cabce05d09c1a4a345b6c04 (diff)
downloadphp-git-5d030000c1d65cf03ce8bec4b74079708100ddad.tar.gz
simplify zend_long defs even more
-rw-r--r--Zend/zend_long.h34
1 files changed, 10 insertions, 24 deletions
diff --git a/Zend/zend_long.h b/Zend/zend_long.h
index bc51132f44..e7e193d00c 100644
--- a/Zend/zend_long.h
+++ b/Zend/zend_long.h
@@ -32,32 +32,18 @@
/* Integer types or the old bad long. */
#ifdef ZEND_ENABLE_INT64
-# ifdef ZEND_WIN32
-# ifdef _WIN64
-typedef __int64 zend_long;
-typedef unsigned __int64 zend_ulong;
-typedef __int64 zend_off_t;
-# define ZEND_LONG_MAX _I64_MAX
-# define ZEND_LONG_MIN _I64_MIN
-# define ZEND_ULONG_MAX _UI64_MAX
+typedef int64_t zend_long;
+typedef uint64_t zend_ulong;
+typedef int64_t zend_off_t;
+# define ZEND_LONG_MAX INT64_MAX
+# define ZEND_LONG_MIN INT64_MIN
+# define ZEND_ULONG_MAX UINT64_MAX
+# ifdef _WIN64
# define Z_L(i) i##i64
# define Z_UL(i) i##Ui64
-# else
-# error Cant enable 64 bit integers on non 64 bit platform
-# endif
# else
-# if defined(__X86_64__) || defined(__LP64__) || defined(_LP64)
-typedef int64_t zend_long;
-typedef uint64_t zend_ulong;
-typedef off_t zend_off_t;
-# define ZEND_LONG_MAX INT64_MAX
-# define ZEND_LONG_MIN INT64_MIN
-# define ZEND_ULONG_MAX UINT64_MAX
# define Z_L(i) i##LL
# define Z_UL(i) i##ULL
-# else
-# error Cant enable 64 bit integers on non 64 bit platform
-# endif
# endif
# define SIZEOF_ZEND_LONG 8
#else
@@ -67,9 +53,9 @@ typedef int32_t zend_off_t;
# define ZEND_LONG_MAX INT32_MAX
# define ZEND_LONG_MIN INT32_MIN
# define ZEND_ULONG_MAX UINT32_MAX
-# define Z_L(i) i##L
-# define Z_UL(i) i##UL
-# define SIZEOF_ZEND_LONG SIZEOF_LONG
+# define Z_L(i) i
+# define Z_UL(i) i
+# define SIZEOF_ZEND_LONG 4
#endif