fix compile failure on Windows - Microsoft hasn't heard of long long :)

This commit is contained in:
Andrey Hristov 2005-12-01 14:12:56 +00:00
parent 7a652e397b
commit c23052d6d2
2 changed files with 11 additions and 2 deletions

View file

@ -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];

View file

@ -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 */