com php-src: started to fix ext/session: ext/session/mod_file s.c ext/session/php_session.h ext/session/session.c

From: Date: Sat, 23 Nov 2013 09:06:42 +0000
Subject: com php-src: started to fix ext/session: ext/session/mod_file s.c ext/session/php_session.h ext/session/session.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-74026@lists.php.net to get a copy of this message
Commit: 9238345922c2c42e1f9b9ac90cf80423c7e996cb Author: Anatol Belski <ab@php.net> Sat, 23 Nov 2013 10:06:42 +0100 Parents: 4a6981433d8f4008e702e46ca4321ee0dab5b96d Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9238345922c2c42e1f9b9ac90cf80423c7e996cb Log: started to fix ext/session Changed paths: M ext/session/mod_files.c M ext/session/php_session.h M ext/session/session.c Diff: diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index c94d393..dec0d5d 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -57,7 +57,7 @@ typedef struct { size_t basedir_len; size_t dirdepth; size_t st_size; - int filemode; + php_int_t filemode; } ps_files; ps_module ps_mod_files = { @@ -246,7 +246,7 @@ PS_OPEN_FUNC(files) const char *argv[3]; int argc = 0; size_t dirdepth = 0; - int filemode = 0600; + php_int_t filemode = 0600; if (*save_path == '\0') { /* if save path is an empty string, determine the temporary dir */ @@ -270,7 +270,7 @@ PS_OPEN_FUNC(files) if (argc > 1) { errno = 0; - dirdepth = (size_t) strtol(argv[0], NULL, 10); + dirdepth = (size_t) ZEND_STRTOL(argv[0], NULL, 10); if (errno == ERANGE) { php_error(E_WARNING, "The first parameter in session.save_path is invalid"); return FAILURE; @@ -279,7 +279,7 @@ PS_OPEN_FUNC(files) if (argc > 2) { errno = 0; - filemode = strtol(argv[1], NULL, 8); + filemode = ZEND_STRTOL(argv[1], NULL, 8); if (errno == ERANGE || filemode < 0 || filemode > 07777) { php_error(E_WARNING, "The second parameter in session.save_path is invalid"); return FAILURE; diff --git a/ext/session/php_session..h b/ext/session/php_session.h index 8ca34e3..f732e27 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -125,8 +125,8 @@ typedef struct _php_ps_globals { char *extern_referer_chk; char *entropy_file; char *cache_limiter; - long entropy_length; - long cookie_lifetime; + php_int_t entropy_length; + php_int_t cookie_lifetime; char *cookie_path; char *cookie_domain; zend_bool cookie_secure; @@ -135,11 +135,11 @@ typedef struct _php_ps_globals { ps_module *default_mod; void *mod_data; php_session_status session_status; - long gc_probability; - long gc_divisor; + php_int_t gc_probability; + php_int_t gc_divisor; php_int_t gc_maxlifetime; int module_number; - long cache_expire; + php_int_t cache_expire; union { zval *names[7]; struct { diff --git a/ext/session/session.c b/ext/session/session.c index fa4a384..f2a861f 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -706,14 +706,14 @@ static PHP_INI_MH(OnUpdateName) /* {{{ */ static PHP_INI_MH(OnUpdateHashFunc) /* {{{ */ { - long val; + php_int_t val; char *endptr = NULL; #if defined(HAVE_HASH_EXT) && !defined(COMPILE_DL_HASH) PS(hash_ops) = NULL; #endif - val = strtol(new_value, &endptr, 10); + val = ZEND_STRTOL(new_value, &endptr, 10); if (endptr && (*endptr == '\0')) { /* Numeric value */ PS(hash_func) = val ? 1 : 0;

« previous php.cvs (#74026) next »