]> granicus.if.org Git - php/commitdiff
fix compile failure on Windows - Microsoft hasn't heard of long long :)
authorAndrey Hristov <andrey@php.net>
Thu, 1 Dec 2005 14:12:56 +0000 (14:12 +0000)
committerAndrey Hristov <andrey@php.net>
Thu, 1 Dec 2005 14:12:56 +0000 (14:12 +0000)
ext/mysqli/mysqli_api.c
ext/mysqli/php_mysqli.h

index 3a8b26fd66df409e60d2b03050dfe36d05d60b92..3178ed8ee79d5e95807d23fb0855c3aefe4d17b0 100644 (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];
index a55df7f26ee7ec11934e1c87a08d1b93cd94c4d0..881421c7bea34f99006a828e9ea5a2cf564580fe 100644 (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 */