diff options
Diffstat (limited to 'ext/session')
| -rw-r--r-- | ext/session/mod_files.c | 8 | ||||
| -rw-r--r-- | ext/session/session.c | 10 | 
2 files changed, 9 insertions, 9 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index 45e27a96ab..b5c9354c87 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -187,7 +187,7 @@ static int ps_files_cleanup_dir(const char *dirname, int maxlifetime TSRMLS_DC)  	DIR *dir;  	char dentry[sizeof(struct dirent) + MAXPATHLEN];  	struct dirent *entry = (struct dirent *) &dentry; -	php_stat_t sbuf; +	zend_stat_t sbuf;  	char buf[MAXPATHLEN];  	time_t now;  	int nrdels = 0; @@ -238,7 +238,7 @@ static int ps_files_cleanup_dir(const char *dirname, int maxlifetime TSRMLS_DC)  static int ps_files_key_exists(ps_files *data, const char *key TSRMLS_DC)  {  	char buf[MAXPATHLEN]; -	php_stat_t sbuf; +	zend_stat_t sbuf;  	if (!key || !ps_files_path_create(buf, sizeof(buf), data, key)) {  		return FAILURE; @@ -283,7 +283,7 @@ PS_OPEN_FUNC(files)  	if (argc > 1) {  		errno = 0; -		dirdepth = (size_t) ZEND_STRTOI(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; @@ -292,7 +292,7 @@ PS_OPEN_FUNC(files)  	if (argc > 2) {  		errno = 0; -		filemode = ZEND_STRTOI(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/session.c b/ext/session/session.c index 58bfc33d2d..af1d50c255 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -305,7 +305,7 @@ PHPAPI zend_string *php_session_create_id(PS_CREATE_SID_ARGS) /* {{{ */  	}  	/* maximum 15+19+19+10 bytes */ -	spprintf(&buf, 0, "%.15s%ld" ZEND_INT_FMT "%0.8F", remote_addr ? remote_addr : "", tv.tv_sec, (zend_long)tv.tv_usec, php_combined_lcg(TSRMLS_C) * 10); +	spprintf(&buf, 0, "%.15s%ld" ZEND_LONG_FMT "%0.8F", remote_addr ? remote_addr : "", tv.tv_sec, (zend_long)tv.tv_usec, php_combined_lcg(TSRMLS_C) * 10);  	switch (PS(hash_func)) {  		case PS_HASH_FUNC_MD5: @@ -712,7 +712,7 @@ static PHP_INI_MH(OnUpdateHashFunc) /* {{{ */  	PS(hash_ops) = NULL;  #endif -	val = ZEND_STRTOI(new_value, &endptr, 10); +	val = ZEND_STRTOL(new_value, &endptr, 10);  	if (endptr && (*endptr == '\0')) {  		/* Numeric value */  		PS(hash_func) = val ? 1 : 0; @@ -1148,7 +1148,7 @@ static inline void strcpy_gmt(char *ubuf, time_t *when) /* {{{ */  static inline void last_modified(TSRMLS_D) /* {{{ */  {  	const char *path; -	php_stat_t sb; +	zend_stat_t sb;  	char buf[MAX_STR + 1];  	path = SG(request_info).path_translated; @@ -1178,7 +1178,7 @@ CACHE_LIMITER_FUNC(public) /* {{{ */  	strcpy_gmt(buf + sizeof(EXPIRES) - 1, &now);  	ADD_HEADER(buf); -	snprintf(buf, sizeof(buf) , "Cache-Control: public, max-age=" ZEND_INT_FMT, PS(cache_expire) * 60); /* SAFE */ +	snprintf(buf, sizeof(buf) , "Cache-Control: public, max-age=" ZEND_LONG_FMT, PS(cache_expire) * 60); /* SAFE */  	ADD_HEADER(buf);  	last_modified(TSRMLS_C); @@ -1189,7 +1189,7 @@ CACHE_LIMITER_FUNC(private_no_expire) /* {{{ */  {  	char buf[MAX_STR + 1]; -	snprintf(buf, sizeof(buf), "Cache-Control: private, max-age=" ZEND_INT_FMT ", pre-check=" ZEND_INT_FMT, PS(cache_expire) * 60, PS(cache_expire) * 60); /* SAFE */ +	snprintf(buf, sizeof(buf), "Cache-Control: private, max-age=" ZEND_LONG_FMT ", pre-check=" ZEND_LONG_FMT, PS(cache_expire) * 60, PS(cache_expire) * 60); /* SAFE */  	ADD_HEADER(buf);  	last_modified(TSRMLS_C);  | 
