diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c index 8ab9003fa815b..3836ddde143d4 100644 --- a/ext/pdo/pdo.c +++ b/ext/pdo/pdo.c @@ -250,7 +250,7 @@ PDO_API int php_pdo_parse_data_source(const char *data_source, zend_ulong data_s /* TODO Refactor */ static const char digit_vec[] = "0123456789"; -PDO_API zend_string *php_pdo_int64_to_str(pdo_int64_t i64) /* {{{ */ +PDO_API zend_string *php_pdo_int64_to_str(int64_t i64) /* {{{ */ { char buffer[65]; char outbuf[65] = ""; @@ -270,11 +270,11 @@ PDO_API zend_string *php_pdo_int64_to_str(pdo_int64_t i64) /* {{{ */ p = &buffer[sizeof(buffer)-1]; *p = '\0'; - while ((pdo_uint64_t)i64 > (pdo_uint64_t)ZEND_LONG_MAX) { - pdo_uint64_t quo = (pdo_uint64_t)i64 / (unsigned int)10; + while ((uint64_t)i64 > (uint64_t)ZEND_LONG_MAX) { + uint64_t quo = (uint64_t)i64 / (unsigned int)10; unsigned int rem = (unsigned int)(i64 - quo*10U); *--p = digit_vec[rem]; - i64 = (pdo_int64_t)quo; + i64 = (int64_t)quo; } long_val = (zend_long)i64; while (long_val != 0) { diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h index 775ffd240f946..2f5c5b1e45844 100644 --- a/ext/pdo/php_pdo_driver.h +++ b/ext/pdo/php_pdo_driver.h @@ -26,14 +26,7 @@ typedef struct _pdo_stmt_t pdo_stmt_t; typedef struct _pdo_row_t pdo_row_t; struct pdo_bound_param_data; -#ifdef PHP_WIN32 -typedef __int64 pdo_int64_t; -typedef unsigned __int64 pdo_uint64_t; -#else -typedef long long int pdo_int64_t; -typedef unsigned long long int pdo_uint64_t; -#endif -PDO_API zend_string *php_pdo_int64_to_str(pdo_int64_t i64); +PDO_API zend_string *php_pdo_int64_to_str(int64_t i64); #ifndef TRUE # define TRUE 1