Re: com php-src: added macros for integer constants to append appropriate suffix: Zend/zend_int.h
| From: | Anatol Belski | Date: | Sun, 08 Dec 2013 17:33:25 +0000 |
| Subject: | Re: com php-src: added macros for integer constants to append appropriate suffix: Zend/zend_int.h | ||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-74304@lists.php.net to get a copy of this message | ||
Hi Michael,
On Sun, December 8, 2013 08:19, Michael Wallner wrote:
> Why not use already existing stdint macros for that?
> On Dec 7, 2013 8:56 AM, "Anatol Belski" <ab@php.net> wrote:
>
>
>> Commit: 20217b04b4517702f57b4c2621ab1235d774fa72
>> Author: Anatol Belski <ab@php.net> Sat, 7 Dec 2013 08:55:31
>> +0100
>> Parents: 3982b3eccf036e8554db18f333d8499d90dda4c4
>> Branches: str_size_and_int64
>>
>>
>> Link:
>>
>> http://git.php.net/?p=php-src.git;a=commitdiff;h=20217b04b4517702f57b4c2
>> 621ab1235d774fa72
>>
>>
>> Log:
>> added macros for integer constants to append appropriate suffix
>>
>> Changed paths:
>> M Zend/zend_int.h
>>
>>
>>
>> Diff:
>> diff --git a/Zend/zend_int.h b/Zend/zend_int.h index ed06dd0..88b6f72
>> 100644
>> --- a/Zend/zend_int.h
>> +++ b/Zend/zend_int.h
>> @@ -19,6 +19,8 @@ typedef __int64 zend_off_t;
>> # define ZEND_INT_MAX _I64_MAX
>> # define ZEND_INT_MIN _I64_MIN
>> # define ZEND_UINT_MAX _UI64_MAX
>> +# define Z_I(i) i##i64
>> +# define Z_UI(i) i##Ui64
>> # else
>> # error Cant enable 64 bit integers on non 64 bit platform
>> # endif
>> @@ -30,6 +32,8 @@ typedef off_t zend_off_t;
>> # define ZEND_INT_MAX INT64_MAX
>> # define ZEND_INT_MIN INT64_MIN
>> # define ZEND_UINT_MAX UINT64_MAX
>> +# define Z_I(i) i##LL
>> +# define Z_UI(i) i##ULL
>> # else
>> # error Cant enable 64 bit integers on non 64 bit platform
>> # endif
>> @@ -42,6 +46,8 @@ typedef long zend_off_t;
>> # define ZEND_INT_MAX LONG_MAX
>> # define ZEND_INT_MIN LONG_MIN
>> # define ZEND_UINT_MAX ULONG_MAX
>> +# define Z_I(i) i##L
>> +# define Z_UI(i) i##UL
>> # define SIZEOF_ZEND_INT SIZEOF_LONG
>> #endif
>>
>>
I've looked for those, but VC11 has no explicit definition for i64, what
is has is
#define INT64_C(x) (x ## LL)
It might be the same, but to be sure i've resolved it manually. For the
linux variant the stdint.h stuff were ok, but is eventually the same :)
Regards
Anatol