diff options
author | Anatol Belski <ab@php.net> | 2014-08-17 13:31:39 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-08-17 13:31:39 +0200 |
commit | 90d6f60bc17bb4fea69feeab506eb02bfeec20fd (patch) | |
tree | f759964466d23656e796bd79964a424464655ee2 /ext/standard | |
parent | 977cf1dc11da0363692374951088696855ae293d (diff) | |
download | php-git-90d6f60bc17bb4fea69feeab506eb02bfeec20fd.tar.gz |
mostly fixes to spl, but also some other
Diffstat (limited to 'ext/standard')
-rw-r--r-- | ext/standard/crypt_sha256.c | 2 | ||||
-rw-r--r-- | ext/standard/crypt_sha512.c | 2 | ||||
-rw-r--r-- | ext/standard/filestat.c | 4 | ||||
-rw-r--r-- | ext/standard/filters.c | 2 | ||||
-rw-r--r-- | ext/standard/fsock.c | 4 | ||||
-rw-r--r-- | ext/standard/quot_print.c | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/ext/standard/crypt_sha256.c b/ext/standard/crypt_sha256.c index ccfa66bd60..bf731b256f 100644 --- a/ext/standard/crypt_sha256.c +++ b/ext/standard/crypt_sha256.c @@ -372,7 +372,7 @@ char * php_sha256_crypt_r(const char *key, const char *salt, char *buffer, int b if (strncmp(salt, sha256_rounds_prefix, sizeof(sha256_rounds_prefix) - 1) == 0) { const char *num = salt + sizeof(sha256_rounds_prefix) - 1; char *endp; - unsigned long int srounds = strtoul(num, &endp, 10); + php_uint_t srounds = ZEND_STRTOUI(num, &endp, 10); if (*endp == '$') { salt = endp + 1; rounds = MAX(ROUNDS_MIN, MIN(srounds, ROUNDS_MAX)); diff --git a/ext/standard/crypt_sha512.c b/ext/standard/crypt_sha512.c index ebabed9d24..f0732e3e17 100644 --- a/ext/standard/crypt_sha512.c +++ b/ext/standard/crypt_sha512.c @@ -405,7 +405,7 @@ php_sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen) if (strncmp(salt, sha512_rounds_prefix, sizeof(sha512_rounds_prefix) - 1) == 0) { const char *num = salt + sizeof(sha512_rounds_prefix) - 1; char *endp; - unsigned long int srounds = strtoul(num, &endp, 10); + php_uint_t srounds = ZEND_STRTOUI(num, &endp, 10); if (*endp == '$') { salt = endp + 1; diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 15af20198e..8e24fec657 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -158,7 +158,7 @@ static int php_disk_total_space(char *path, double *space TSRMLS_DC) /* {{{ */ /* i know - this is ugly, but i works <thies@thieso.net> */ bytestotal = TotalNumberOfBytes.HighPart * - (double) (((unsigned long)1) << 31) * 2.0 + + (double) (((php_uint_t)1) << 31) * 2.0 + TotalNumberOfBytes.LowPart; } else { /* If it's not available, we just use GetDiskFreeSpace */ if (GetDiskFreeSpace(path, @@ -290,7 +290,7 @@ static int php_disk_free_space(char *path, double *space TSRMLS_DC) /* {{{ */ /* i know - this is ugly, but i works <thies@thieso.net> */ bytesfree = FreeBytesAvailableToCaller.HighPart * - (double) (((unsigned long)1) << 31) * 2.0 + + (double) (((php_uint_t)1) << 31) * 2.0 + FreeBytesAvailableToCaller.LowPart; } else { /* If it's not available, we just use GetDiskFreeSpace */ if (GetDiskFreeSpace(path, diff --git a/ext/standard/filters.c b/ext/standard/filters.c index f794cbad38..9a0dc672c4 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -1320,7 +1320,7 @@ static int php_conv_get_int_prop_ex(const HashTable *ht, int *pretval, char *fie static int php_conv_get_uint_prop_ex(const HashTable *ht, unsigned int *pretval, char *field_name, size_t field_name_len) { - unsigned long l; + php_uint_t l; php_conv_err_t err; *pretval = 0; diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c index f47331f6af..17163b0234 100644 --- a/ext/standard/fsock.c +++ b/ext/standard/fsock.c @@ -36,7 +36,7 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent) long port = -1; zval *zerrno = NULL, *zerrstr = NULL; double timeout = FG(default_socket_timeout); - unsigned long conv; + php_uint_t conv; struct timeval tv; char *hashkey = NULL; php_stream *stream = NULL; @@ -63,7 +63,7 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent) } /* prepare the timeout value for use */ - conv = (unsigned long) (timeout * 1000000.0); + conv = (php_uint_t) (timeout * 1000000.0); tv.tv_sec = conv / 1000000; tv.tv_usec = conv % 1000000; diff --git a/ext/standard/quot_print.c b/ext/standard/quot_print.c index aa3d256c3a..c2e659d43e 100644 --- a/ext/standard/quot_print.c +++ b/ext/standard/quot_print.c @@ -147,7 +147,7 @@ PHPAPI zend_string *php_quot_print_decode(const unsigned char *str, size_t lengt PHPAPI zend_string *php_quot_print_encode(const unsigned char *str, size_t length) /* {{{ */ { - unsigned long lp = 0; + php_uint_t lp = 0; unsigned char c, *d; char *hex = "0123456789ABCDEF"; zend_string *ret; |