]> granicus.if.org Git - php/commitdiff
because we use int64_t we need corresponding printf modifiers. the type
authorAndrey Hristov <andrey@php.net>
Wed, 27 May 2009 19:56:47 +0000 (19:56 +0000)
committerAndrey Hristov <andrey@php.net>
Wed, 27 May 2009 19:56:47 +0000 (19:56 +0000)
can be different on 32 and 64 bit, thus we can't use ld and lld but
C helps us with inttypes.h and PRId64 and PRIu64 modifiers (without the %)

ext/mysqli/php_mysqli_structs.h

index 943b4f8fdf10bbbd575599f23fa6546f09f47fa6..c42794face63929359e8cf15e31d6ffb7d69e80c 100644 (file)
@@ -173,10 +173,12 @@ typedef __int64 my_longlong;
 # else
 #  define PHP_MYSQLI_API
 # endif
-#define MYSQLI_LLU_SPEC "%llu"
-#define MYSQLI_LL_SPEC "%lld"
+/* we need this for PRIu64 and PRId64 */
+#include <inttypes.h>
+#define MYSQLI_LLU_SPEC "%" PRIu64
+#define MYSQLI_LL_SPEC "%" PRId64
 #define L64(x) x##LL
-typedef long long my_longlong;
+typedef int64_t my_longlong;
 #endif
 
 #ifdef ZTS