com php-src: simplify zend_long defs even more: Zen d/zend_long.h
| From: | Anatol Belski | Date: | Tue, 26 Aug 2014 07:49:54 +0000 |
| Subject: | com php-src: simplify zend_long defs even more: Zen d/zend_long.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-81112@lists.php.net to get a copy of this message | ||
Commit: 5d030000c1d65cf03ce8bec4b74079708100ddad
Author: Anatol Belski <ab@php.net> Tue, 26 Aug 2014 09:49:54 +0200
Parents: c49cd84da92c411d9cabce05d09c1a4a345b6c04
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5d030000c1d65cf03ce8bec4b74079708100ddad
Log:
simplify zend_long defs even more
Changed paths:
M Zend/zend_long.h
Diff:
diff --git a/Zend/zend_long.h b/Zend/zend_long.h
index bc51132..e7e193d 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