From: Andrey Hristov Date: Thu, 1 Dec 2005 14:12:56 +0000 (+0000) Subject: fix compile failure on Windows - Microsoft hasn't heard of long long :) X-Git-Tag: php-5.1.2RC1~271 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c23052d6d2fcbc88862bcb2a86d6612c8f344bb2;p=php fix compile failure on Windows - Microsoft hasn't heard of long long :) --- diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 3a8b26fd66..3178ed8ee7 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -682,8 +682,8 @@ PHP_FUNCTION(mysqli_stmt_fetch) #if SIZEOF_LONG==8 if (uns && llval > 9223372036854775807L) { #elif SIZEOF_LONG==4 - if ((uns && llval > 2147483647LL) || - (!uns && (( 2147483647LL < (long long) llval) || (-2147483648LL > (long long) llval)))) + if ((uns && llval > L64(2147483647)) || + (!uns && (( L64(2147483647) < (my_longlong) llval) || (L64(-2147483648) > (my_longlong) llval)))) { #endif char tmp[22]; diff --git a/ext/mysqli/php_mysqli.h b/ext/mysqli/php_mysqli.h index a55df7f26e..881421c7be 100644 --- a/ext/mysqli/php_mysqli.h +++ b/ext/mysqli/php_mysqli.h @@ -446,6 +446,15 @@ MYSQLI_PROPERTY(my_prop_link_host); #define my_estrdup(x) (x) ? estrdup(x) : NULL #define my_efree(x) if (x) efree(x) +#ifdef PHP_WIN32 +#define L64(x) x##i64 +typedef __int64 my_longlong; +#else +#define L64(x) x##LL +typedef long long my_longlong; +#endif + + ZEND_EXTERN_MODULE_GLOBALS(mysqli) #endif /* PHP_MYSQLI.H */