summaryrefslogtreecommitdiff
path: root/ext/mysqli/php_mysqli_structs.h
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2009-05-27 19:57:11 +0000
committerAndrey Hristov <andrey@php.net>2009-05-27 19:57:11 +0000
commit91a4502914e9f182799dd6faf029bc404399dc6e (patch)
tree5687265d5e10a0eea9ee2a082ddb86ed40f48301 /ext/mysqli/php_mysqli_structs.h
parent07fc51d559950d46b6373920944e703af54300bf (diff)
downloadphp-git-91a4502914e9f182799dd6faf029bc404399dc6e.tar.gz
MFH:because we use int64_t we need corresponding printf modifiers. the type
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 %)
Diffstat (limited to 'ext/mysqli/php_mysqli_structs.h')
-rw-r--r--ext/mysqli/php_mysqli_structs.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/mysqli/php_mysqli_structs.h b/ext/mysqli/php_mysqli_structs.h
index 3e077ed736..72de483c37 100644
--- a/ext/mysqli/php_mysqli_structs.h
+++ b/ext/mysqli/php_mysqli_structs.h
@@ -141,7 +141,7 @@ typedef struct _mysqli_property_entry {
#if !defined(MYSQLI_USE_MYSQLND)
typedef struct {
char error_msg[LOCAL_INFILE_ERROR_LEN];
- void *userdata;
+ void *userdata;
} mysqli_local_infile;
#endif
@@ -161,10 +161,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