summaryrefslogtreecommitdiff
path: root/ext/session/mod_files.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-19 14:18:24 +0200
committerAnatol Belski <ab@php.net>2014-08-19 14:18:24 +0200
commit48e6adeee23ef7e8c71656f2eaf3dc4d228f7fd6 (patch)
tree6419cc8946120d8a5042d7dd05ccfd3d25b4fdec /ext/session/mod_files.c
parent64d54461bf17efe0f0facb5856e566010a5eb0da (diff)
downloadphp-git-48e6adeee23ef7e8c71656f2eaf3dc4d228f7fd6.tar.gz
ported ext/session
Diffstat (limited to 'ext/session/mod_files.c')
-rw-r--r--ext/session/mod_files.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index 3366985279..6ea33a71aa 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;
- struct stat sbuf;
+ php_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];
- struct stat sbuf;
+ php_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) strtol(argv[0], NULL, 10);
+ dirdepth = (size_t) ZEND_STRTOI(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 = strtol(argv[1], NULL, 8);
+ filemode = ZEND_STRTOI(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;
@@ -335,7 +335,7 @@ PS_CLOSE_FUNC(files)
PS_READ_FUNC(files)
{
- long n;
+ php_int_t n;
struct stat sbuf;
PS_FILES_DATA;
@@ -398,7 +398,7 @@ PS_READ_FUNC(files)
PS_WRITE_FUNC(files)
{
- long n;
+ php_int_t n;
PS_FILES_DATA;
ps_files_open(data, key->val TSRMLS_CC);