summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/com/COM.c2
-rw-r--r--ext/db/db.c12
-rw-r--r--ext/dba/dba_cdb.c2
-rw-r--r--ext/dba/dba_db2.c2
-rw-r--r--ext/dba/dba_db3.c2
-rw-r--r--ext/dba/dba_dbm.c2
-rw-r--r--ext/dbase/dbase.c2
-rw-r--r--ext/dbase/dbf_head.c4
-rw-r--r--ext/exif/exif.c4
-rw-r--r--ext/fdf/fdf.c2
-rw-r--r--ext/filepro/filepro.c6
-rw-r--r--ext/ftp/php_ftp.c8
-rw-r--r--ext/gd/gd.c10
-rw-r--r--ext/gd/gd_ctx.c2
-rw-r--r--ext/gettext/gettext.c4
-rw-r--r--ext/ming/ming.c14
-rw-r--r--ext/oci8/oci8.c4
-rw-r--r--ext/openssl/openssl.c2
-rw-r--r--ext/posix/posix.c2
-rw-r--r--ext/rpc/com/com_wrapper.c2
-rw-r--r--ext/session/mod_files.c12
-rw-r--r--ext/session/session.c4
-rw-r--r--ext/standard/basic_functions.c6
-rw-r--r--ext/standard/browscap.c2
-rw-r--r--ext/standard/dir.c8
-rw-r--r--ext/standard/exec.c12
-rw-r--r--ext/standard/file.c22
-rw-r--r--ext/standard/filestat.c16
-rw-r--r--ext/standard/iptc.c2
-rw-r--r--ext/standard/link.c2
-rw-r--r--ext/swf/swf.c6
31 files changed, 90 insertions, 90 deletions
diff --git a/ext/com/COM.c b/ext/com/COM.c
index 9ed09eb8d4..1526b09e8a 100644
--- a/ext/com/COM.c
+++ b/ext/com/COM.c
@@ -205,7 +205,7 @@ static PHP_INI_MH(OnTypelibFileChange)
#endif
- if (!new_value || (typelib_file=V_FOPEN(new_value, "r"))==NULL) {
+ if (!new_value || (typelib_file=VCWD_FOPEN(new_value, "r"))==NULL) {
return FAILURE;
}
diff --git a/ext/db/db.c b/ext/db/db.c
index d49d6f6c47..80e19d47ae 100644
--- a/ext/db/db.c
+++ b/ext/db/db.c
@@ -120,7 +120,7 @@ static int php_dbm_key_exists(DBM *dbf, datum key_datum) {
#define DBM_CREATE_MODE "a+b"
#define DBM_NEW_MODE "w+b"
#define DBM_DEFAULT_MODE "r"
-#define DBM_OPEN(filename, mode) V_FOPEN(filename, mode)
+#define DBM_OPEN(filename, mode) VCWD_FOPEN(filename, mode)
#define DBM_CLOSE(dbf) fclose(dbf)
#define DBM_STORE(dbf, key, value, mode) flatfile_store(dbf, key, value, mode)
#define DBM_FETCH(dbf, key) flatfile_fetch(dbf, key)
@@ -322,7 +322,7 @@ dbm_info *php_dbm_open(char *filename, char *mode) {
strcat(lockfn, ".lck");
#if NFS_HACK
- while((last_try = V_STAT(lockfn,&sb))==0) {
+ while((last_try = VCWD_STAT(lockfn,&sb))==0) {
retries++;
php_sleep(1);
if (retries>30) break;
@@ -336,7 +336,7 @@ dbm_info *php_dbm_open(char *filename, char *mode) {
}
#else /* NFS_HACK */
- lockfd = V_OPEN((lockfn,O_RDWR|O_CREAT,0644));
+ lockfd = VCWD_OPEN((lockfn,O_RDWR|O_CREAT,0644));
if (lockfd) {
flock(lockfd,LOCK_EX);
@@ -396,7 +396,7 @@ dbm_info *php_dbm_open(char *filename, char *mode) {
#if NFS_HACK
if (lockfn) {
- V_UNLINK(lockfn);
+ VCWD_UNLINK(lockfn);
}
#endif
if (lockfn) efree(lockfn);
@@ -432,10 +432,10 @@ int php_dbm_close(zend_rsrc_list_entry *rsrc) {
dbf = info->dbf;
#if NFS_HACK
- V_UNLINK(info->lockfn);
+ VCWD_UNLINK(info->lockfn);
#else
if (info->lockfn) {
- lockfd = V_OPEN((info->lockfn,O_RDWR,0644));
+ lockfd = VCWD_OPEN((info->lockfn,O_RDWR,0644));
flock(lockfd,LOCK_UN);
close(lockfd);
}
diff --git a/ext/dba/dba_cdb.c b/ext/dba/dba_cdb.c
index 93abec5934..ab54d12da6 100644
--- a/ext/dba/dba_cdb.c
+++ b/ext/dba/dba_cdb.c
@@ -71,7 +71,7 @@ DBA_OPEN_FUNC(cdb)
cdb = malloc(sizeof *cdb);
memset(cdb, 0, sizeof *cdb);
- cdb->fd = V_OPEN((info->path, gmode));
+ cdb->fd = VCWD_OPEN((info->path, gmode));
if(cdb->fd < 0) {
free(cdb);
return FAILURE;
diff --git a/ext/dba/dba_db2.c b/ext/dba/dba_db2.c
index d79e62ed42..2c6fcb8ace 100644
--- a/ext/dba/dba_db2.c
+++ b/ext/dba/dba_db2.c
@@ -61,7 +61,7 @@ DBA_OPEN_FUNC(db2)
type = info->mode == DBA_READER ? DB_UNKNOWN :
info->mode == DBA_TRUNC ? DB_BTREE :
- V_STAT(info->path, &check_stat) ? DB_BTREE : DB_UNKNOWN;
+ VCWD_STAT(info->path, &check_stat) ? DB_BTREE : DB_UNKNOWN;
gmode = info->mode == DBA_READER ? DB_RDONLY :
info->mode == DBA_CREAT ? DB_CREATE :
diff --git a/ext/dba/dba_db3.c b/ext/dba/dba_db3.c
index 5d3cd69606..e0832a86a0 100644
--- a/ext/dba/dba_db3.c
+++ b/ext/dba/dba_db3.c
@@ -63,7 +63,7 @@ DBA_OPEN_FUNC(db3)
type = info->mode == DBA_READER ? DB_UNKNOWN :
info->mode == DBA_TRUNC ? DB_BTREE :
- V_STAT(info->path, &check_stat) ? DB_BTREE : DB_UNKNOWN;
+ VCWD_STAT(info->path, &check_stat) ? DB_BTREE : DB_UNKNOWN;
gmode = info->mode == DBA_READER ? DB_RDONLY :
info->mode == DBA_CREAT ? DB_CREATE :
diff --git a/ext/dba/dba_dbm.c b/ext/dba/dba_dbm.c
index a9df5452c1..ede05a47ca 100644
--- a/ext/dba/dba_dbm.c
+++ b/ext/dba/dba_dbm.c
@@ -47,7 +47,7 @@
#define TRUNC_IT(extension, mode) \
snprintf(buf, MAXPATHLEN, "%s" extension, info->path); \
buf[MAXPATHLEN-1] = '\0'; \
- if((fd = V_OPEN((buf, O_CREAT | mode | O_WRONLY, filemode))) == -1) \
+ if((fd = VCWD_OPEN((buf, O_CREAT | mode | O_WRONLY, filemode))) == -1) \
return FAILURE; \
close(fd);
diff --git a/ext/dbase/dbase.c b/ext/dbase/dbase.c
index 9cb8325b74..63312f47b6 100644
--- a/ext/dbase/dbase.c
+++ b/ext/dbase/dbase.c
@@ -598,7 +598,7 @@ PHP_FUNCTION(dbase_create) {
RETURN_FALSE;
}
- if ((fd = V_OPEN((Z_STRVAL_P(filename), O_BINARY|O_RDWR|O_CREAT, 0644))) < 0) {
+ if ((fd = VCWD_OPEN((Z_STRVAL_P(filename), O_BINARY|O_RDWR|O_CREAT, 0644))) < 0) {
php_error(E_WARNING, "Unable to create database (%d): %s", errno, strerror(errno));
RETURN_FALSE;
}
diff --git a/ext/dbase/dbf_head.c b/ext/dbase/dbf_head.c
index c92a29ba3a..b99c1a1acd 100644
--- a/ext/dbase/dbf_head.c
+++ b/ext/dbase/dbf_head.c
@@ -227,10 +227,10 @@ dbhead_t *dbf_open(char *dp, int o_flags)
dbhead_t *dbh;
cp = dp;
- if ((fd = V_OPEN((cp, o_flags|O_BINARY))) < 0) {
+ if ((fd = VCWD_OPEN((cp, o_flags|O_BINARY))) < 0) {
cp = (char *)malloc(256);
strcpy(cp, dp); strcat(cp, ".dbf");
- if ((fd = V_OPEN((cp, o_flags))) < 0) {
+ if ((fd = VCWD_OPEN((cp, o_flags))) < 0) {
perror("open");
return NULL;
}
diff --git a/ext/exif/exif.c b/ext/exif/exif.c
index e84322e751..fce8281d95 100644
--- a/ext/exif/exif.c
+++ b/ext/exif/exif.c
@@ -973,7 +973,7 @@ int ReadJpegFile(ImageInfoType *ImageInfo, Section_t *Sections,
int ret;
char *tmp;
- infile = V_FOPEN(FileName, "rb"); /* Unix ignores 'b', windows needs it. */
+ infile = VCWD_FOPEN(FileName, "rb"); /* Unix ignores 'b', windows needs it. */
if (infile == NULL) {
php_error(E_ERROR, "Unable to open '%s'", FileName);
@@ -1002,7 +1002,7 @@ int ReadJpegFile(ImageInfoType *ImageInfo, Section_t *Sections,
{
/* Store file date/time. */
struct stat st;
- if (V_STAT(FileName, &st) >= 0) {
+ if (VCWD_STAT(FileName, &st) >= 0) {
ImageInfo->FileDateTime = st.st_mtime;
ImageInfo->FileSize = st.st_size;
} else {
diff --git a/ext/fdf/fdf.c b/ext/fdf/fdf.c
index 0e883469b6..590df50d50 100644
--- a/ext/fdf/fdf.c
+++ b/ext/fdf/fdf.c
@@ -748,7 +748,7 @@ SAPI_POST_HANDLER_FUNC(fdf_post_handler)
}
FDFClose(theFDF);
- V_UNLINK((const char *)filename);
+ VCWD_UNLINK((const char *)filename);
efree(filename);
if(name) efree(name);
diff --git a/ext/filepro/filepro.c b/ext/filepro/filepro.c
index 915e4f3de8..85a24cadfb 100644
--- a/ext/filepro/filepro.c
+++ b/ext/filepro/filepro.c
@@ -214,7 +214,7 @@ PHP_FUNCTION(filepro)
RETURN_FALSE;
}
- if (!(fp = V_FOPEN(workbuf, "r"))) {
+ if (!(fp = VCWD_FOPEN(workbuf, "r"))) {
php_error(E_WARNING, "filePro: cannot open map: [%d] %s",
errno, strerror(errno));
RETURN_FALSE;
@@ -313,7 +313,7 @@ PHP_FUNCTION(filepro_rowcount)
RETURN_FALSE;
}
- if (!(fp = V_FOPEN(workbuf, "r"))) {
+ if (!(fp = VCWD_FOPEN(workbuf, "r"))) {
php_error(E_WARNING, "filePro: cannot open key: [%d] %s",
errno, strerror(errno));
RETURN_FALSE;
@@ -538,7 +538,7 @@ PHP_FUNCTION(filepro_retrieve)
RETURN_FALSE;
}
- if (!(fp = V_FOPEN(workbuf, "r"))) {
+ if (!(fp = VCWD_FOPEN(workbuf, "r"))) {
php_error(E_WARNING, "filePro: cannot open key: [%d] %s",
errno, strerror(errno));
fclose(fp);
diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c
index 8f74068eac..2dcbdbda3e 100644
--- a/ext/ftp/php_ftp.c
+++ b/ext/ftp/php_ftp.c
@@ -592,9 +592,9 @@ PHP_FUNCTION(ftp_get)
}
#ifdef PHP_WIN32
- if ((outfp = V_FOPEN(Z_STRVAL_P(arg2), "wb")) == NULL) {
+ if ((outfp = VCWD_FOPEN(Z_STRVAL_P(arg2), "wb")) == NULL) {
#else
- if ((outfp = V_FOPEN(Z_STRVAL_P(arg2), "w")) == NULL) {
+ if ((outfp = VCWD_FOPEN(Z_STRVAL_P(arg2), "w")) == NULL) {
#endif
fclose(tmpfp);
php_error(E_WARNING, "error opening %s", Z_STRVAL_P(arg2));
@@ -680,9 +680,9 @@ PHP_FUNCTION(ftp_put)
XTYPE(xtype, arg4);
#ifdef PHP_WIN32
- if ((infp = V_FOPEN(Z_STRVAL_P(arg3), "rb")) == NULL) {
+ if ((infp = VCWD_FOPEN(Z_STRVAL_P(arg3), "rb")) == NULL) {
#else
- if ((infp = V_FOPEN(Z_STRVAL_P(arg3), "r")) == NULL) {
+ if ((infp = VCWD_FOPEN(Z_STRVAL_P(arg3), "r")) == NULL) {
#endif
php_error(E_WARNING, "error opening %s", Z_STRVAL_P(arg3));
RETURN_FALSE;
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 3c8b963368..aacd2b9463 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -432,7 +432,7 @@ PHP_FUNCTION(imageloadfont)
convert_to_string_ex(file);
#ifdef PHP_WIN32
- fp = V_FOPEN(Z_STRVAL_PP(file), "rb");
+ fp = VCWD_FOPEN(Z_STRVAL_PP(file), "rb");
#else
fp = php_fopen_wrapper(Z_STRVAL_PP(file), "r", IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd, NULL);
#endif
@@ -1138,7 +1138,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
fn = Z_STRVAL_PP(file);
#ifdef PHP_WIN32
- fp = V_FOPEN(fn, "rb");
+ fp = VCWD_FOPEN(fn, "rb");
#else
fp = php_fopen_wrapper(fn, "r", IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd, NULL);
#endif
@@ -1314,7 +1314,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
RETURN_FALSE;
}
- fp = V_FOPEN(fn, "wb");
+ fp = VCWD_FOPEN(fn, "wb");
if (!fp) {
php_error(E_WARNING, "%s: unable to open '%s' for writing", get_active_function_name(), fn);
RETURN_FALSE;
@@ -3338,14 +3338,14 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) {
}
/* Open origin file */
- org = V_FOPEN(fn_org, "rb");
+ org = VCWD_FOPEN(fn_org, "rb");
if (!org) {
php_error (E_WARNING, "%s: unable to open '%s' for reading", get_active_function_name(), fn_org);
RETURN_FALSE;
}
/* Open destination file */
- dest = V_FOPEN(fn_dest, "wb");
+ dest = VCWD_FOPEN(fn_dest, "wb");
if (!dest) {
php_error (E_WARNING, "%s: unable to open '%s' for writing", get_active_function_name(), fn_dest);
RETURN_FALSE;
diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c
index 3e8d595c22..6fb5a08bb2 100644
--- a/ext/gd/gd_ctx.c
+++ b/ext/gd/gd_ctx.c
@@ -52,7 +52,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
RETURN_FALSE;
}
- fp = V_FOPEN(fn, "wb");
+ fp = VCWD_FOPEN(fn, "wb");
if (!fp) {
php_error(E_WARNING, "%s: unable to open '%s' for writing", get_active_function_name(), fn);
RETURN_FALSE;
diff --git a/ext/gettext/gettext.c b/ext/gettext/gettext.c
index 7d75dbe026..3de4b007f5 100644
--- a/ext/gettext/gettext.c
+++ b/ext/gettext/gettext.c
@@ -151,9 +151,9 @@ PHP_FUNCTION(bindtextdomain)
convert_to_string_ex(dir);
if (strcmp((*dir)->value.str.val, "") && strcmp((*dir)->value.str.val, "0")) {
- V_REALPATH((*dir)->value.str.val, dir_name);
+ VCWD_REALPATH((*dir)->value.str.val, dir_name);
} else {
- V_GETCWD(dir_name, MAXPATHLEN);
+ VCWD_GETCWD(dir_name, MAXPATHLEN);
}
retval = bindtextdomain((*domain_name)->value.str.val, dir_name);
diff --git a/ext/ming/ming.c b/ext/ming/ming.c
index f2203c2e59..3ac7e47cfd 100644
--- a/ext/ming/ming.c
+++ b/ext/ming/ming.c
@@ -245,10 +245,10 @@ PHP_FUNCTION(swfbitmap_init)
if(maskname != NULL)
{
FILE *jpeg, *mask;
- if((jpeg = V_FOPEN(filename, "rb")) == NULL)
+ if((jpeg = VCWD_FOPEN(filename, "rb")) == NULL)
php_error(E_ERROR, "Couldn't find file %s", filename);
- if((mask = V_FOPEN(maskname, "rb")) == NULL)
+ if((mask = VCWD_FOPEN(maskname, "rb")) == NULL)
php_error(E_ERROR, "Couldn't find file %s", maskname);
bitmap = newSWFJpegWithAlpha(jpeg, mask);
@@ -260,7 +260,7 @@ PHP_FUNCTION(swfbitmap_init)
{
FILE *jpeg;
- if((jpeg = V_FOPEN(filename, "rb")) == NULL)
+ if((jpeg = VCWD_FOPEN(filename, "rb")) == NULL)
php_error(E_ERROR, "Couldn't find file %s", filename);
bitmap = newSWFJpegBitmap(jpeg);
@@ -272,7 +272,7 @@ PHP_FUNCTION(swfbitmap_init)
{
FILE *dbl;
- if((dbl = V_FOPEN(filename, "rb")) == NULL)
+ if((dbl = VCWD_FOPEN(filename, "rb")) == NULL)
php_error(E_ERROR, "Couldn't find file %s", filename);
bitmap = newSWFDBLBitmap(dbl);
@@ -1091,7 +1091,7 @@ PHP_FUNCTION(swffont_init)
if(strcmp(Z_STRVAL_PP(zfile)+Z_STRLEN_PP(zfile)-4, ".fdb") == 0)
{
- file = V_FOPEN(Z_STRVAL_PP(zfile), "rb");
+ file = VCWD_FOPEN(Z_STRVAL_PP(zfile), "rb");
if(!file)
php_error(E_ERROR, "Couldn't find FDB file %s", Z_STRVAL_PP(zfile));
@@ -1522,7 +1522,7 @@ PHP_FUNCTION(swfmovie_save)
convert_to_string_ex(x);
- file = V_FOPEN(Z_STRVAL_PP(x), "wb");
+ file = VCWD_FOPEN(Z_STRVAL_PP(x), "wb");
if(file == NULL)
php_error(E_ERROR, "couldn't open file %s for writing", Z_STRVAL_PP(x));
@@ -1624,7 +1624,7 @@ PHP_FUNCTION(swfmovie_streamMp3)
{
convert_to_string_ex(zfile);
- file = V_FOPEN(Z_STRVAL_PP(zfile), "rb");
+ file = VCWD_FOPEN(Z_STRVAL_PP(zfile), "rb");
if(!file)
php_error(E_ERROR, "Couldn't find file %s", Z_STRVAL_PP(zfile));
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 0f994da22d..b2c4e7174f 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -2925,7 +2925,7 @@ PHP_FUNCTION(ocisavelobfile)
filename = (*arg)->value.str.val;
- if ((fp = V_OPEN((filename, O_RDONLY|O_BINARY))) == -1) {
+ if ((fp = VCWD_OPEN((filename, O_RDONLY|O_BINARY))) == -1) {
php_error(E_WARNING, "Can't open file %s", filename);
RETURN_FALSE;
}
@@ -3043,7 +3043,7 @@ PHP_FUNCTION(ociwritelobtofile)
goto bail;
}
- if ((fp = V_OPEN((filename,O_CREAT | O_RDWR | O_BINARY | O_TRUNC, 0600))) == -1) {
+ if ((fp = VCWD_OPEN((filename,O_CREAT | O_RDWR | O_BINARY | O_TRUNC, 0600))) == -1) {
php_error(E_WARNING, "Can't create file %s", filename);
goto bail;
}
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 9e9f4433d0..8e7f3b9244 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -778,7 +778,7 @@ static X509_STORE * setup_verify(zval * calist)
convert_to_string_ex(item);
- if (V_STAT(Z_STRVAL_PP(item), &sb) == -1) {
+ if (VCWD_STAT(Z_STRVAL_PP(item), &sb) == -1) {
zend_error(E_WARNING, "%s() unable to stat %s", get_active_function_name(), Z_STRVAL_PP(item));
continue;
}
diff --git a/ext/posix/posix.c b/ext/posix/posix.c
index 537ad4bf23..c562b2e2b7 100644
--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -632,7 +632,7 @@ PHP_FUNCTION(posix_getcwd)
char buffer[MAXPATHLEN];
char *p;
- p = V_GETCWD(buffer, MAXPATHLEN);
+ p = VCWD_GETCWD(buffer, MAXPATHLEN);
if (!p) {
php_error(E_WARNING, "posix_getcwd() failed with '%s'",
strerror(errno));
diff --git a/ext/rpc/com/com_wrapper.c b/ext/rpc/com/com_wrapper.c
index 9ed09eb8d4..1526b09e8a 100644
--- a/ext/rpc/com/com_wrapper.c
+++ b/ext/rpc/com/com_wrapper.c
@@ -205,7 +205,7 @@ static PHP_INI_MH(OnTypelibFileChange)
#endif
- if (!new_value || (typelib_file=V_FOPEN(new_value, "r"))==NULL) {
+ if (!new_value || (typelib_file=VCWD_FOPEN(new_value, "r"))==NULL) {
return FAILURE;
}
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index 2348f144fe..ab24ee6354 100644
--- a/ext/session/mod_files.c
+++ b/ext/session/mod_files.c
@@ -139,16 +139,16 @@ static void ps_files_open(ps_files *data, const char *key)
data->lastkey = estrdup(key);
#ifdef O_EXCL
- data->fd = V_OPEN((buf, O_RDWR | O_BINARY));
+ data->fd = VCWD_OPEN((buf, O_RDWR | O_BINARY));
if (data->fd == -1) {
if (errno == ENOENT) {
- data->fd = V_OPEN((buf, O_EXCL | O_RDWR | O_CREAT | O_BINARY, 0600));
+ data->fd = VCWD_OPEN((buf, O_EXCL | O_RDWR | O_CREAT | O_BINARY, 0600));
}
} else {
flock(data->fd, LOCK_EX);
}
#else
- data->fd = V_OPEN((buf, O_CREAT | O_RDWR | O_BINARY, 0600));
+ data->fd = VCWD_OPEN((buf, O_CREAT | O_RDWR | O_BINARY, 0600));
if (data->fd != -1)
flock(data->fd, LOCK_EX);
#endif
@@ -196,9 +196,9 @@ static int ps_files_cleanup_dir(const char *dirname, int maxlifetime)
/* NUL terminate it and */
buf[dirname_len + entry_len + 1] = '\0';
/* check whether its last access was more than maxlifet ago */
- if (V_STAT(buf, &sbuf) == 0 &&
+ if (VCWD_STAT(buf, &sbuf) == 0 &&
(now - sbuf.st_atime) > maxlifetime) {
- V_UNLINK(buf);
+ VCWD_UNLINK(buf);
nrdels++;
}
}
@@ -301,7 +301,7 @@ PS_DESTROY_FUNC(files)
ps_files_close(data);
- if (V_UNLINK(buf) == -1) {
+ if (VCWD_UNLINK(buf) == -1) {
return FAILURE;
}
diff --git a/ext/session/session.c b/ext/session/session.c
index 013754301c..5fad364eaf 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -536,7 +536,7 @@ static char *_php_create_id(int *newlen PSLS_DC)
if (PS(entropy_length) > 0) {
int fd;
- fd = V_OPEN((PS(entropy_file), O_RDONLY));
+ fd = VCWD_OPEN((PS(entropy_file), O_RDONLY));
if (fd >= 0) {
char *p;
int n;
@@ -652,7 +652,7 @@ static void last_modified(void)
path = SG(request_info).path_translated;
if (path) {
- if (V_STAT(path, &sb) == -1) {
+ if (VCWD_STAT(path, &sb) == -1) {
return;
}
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 7e779a7f75..4063d78468 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -2502,11 +2502,11 @@ PHP_FUNCTION(move_uploaded_file)
RETURN_FALSE;
}
- V_UNLINK(Z_STRVAL_PP(new_path));
+ VCWD_UNLINK(Z_STRVAL_PP(new_path));
if (rename(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path))==0) {
successful=1;
} else if (php_copy_file(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path))==SUCCESS) {
- V_UNLINK(Z_STRVAL_PP(path));
+ VCWD_UNLINK(Z_STRVAL_PP(path));
successful=1;
}
@@ -2604,7 +2604,7 @@ PHP_FUNCTION(parse_ini_file)
}
convert_to_string_ex(filename);
- fh.handle.fp = V_FOPEN(Z_STRVAL_PP(filename), "r");
+ fh.handle.fp = VCWD_FOPEN(Z_STRVAL_PP(filename), "r");
if (!fh.handle.fp) {
php_error(E_WARNING,"Cannot open '%s' for reading", Z_STRVAL_PP(filename));
return;
diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c
index 20e0a620c2..3976613a79 100644
--- a/ext/standard/browscap.c
+++ b/ext/standard/browscap.c
@@ -139,7 +139,7 @@ PHP_MINIT_FUNCTION(browscap)
return FAILURE;
}
- fh.handle.fp = V_FOPEN(browscap, "r");
+ fh.handle.fp = VCWD_FOPEN(browscap, "r");
if (!fh.handle.fp) {
php_error(E_CORE_WARNING,"Cannot open '%s' for reading", browscap);
return FAILURE;
diff --git a/ext/standard/dir.c b/ext/standard/dir.c
index fcb1ea7543..2e1b4605c1 100644
--- a/ext/standard/dir.c
+++ b/ext/standard/dir.c
@@ -166,7 +166,7 @@ static void _php_do_opendir(INTERNAL_FUNCTION_PARAMETERS, int createobject)
dirp = emalloc(sizeof(php_dir));
- dirp->dir = V_OPENDIR((*arg)->value.str.val);
+ dirp->dir = VCWD_OPENDIR((*arg)->value.str.val);
#ifdef PHP_WIN32
if (!dirp->dir || dirp->dir->finished) {
@@ -281,7 +281,7 @@ PHP_FUNCTION(chdir)
}
convert_to_string_ex(arg);
- ret = V_CHDIR((*arg)->value.str.val);
+ ret = VCWD_CHDIR((*arg)->value.str.val);
if (ret != 0) {
php_error(E_WARNING, "ChDir: %s (errno %d)", strerror(errno), errno);
@@ -305,9 +305,9 @@ PHP_FUNCTION(getcwd)
}
#if HAVE_GETCWD
- ret = V_GETCWD(path, MAXPATHLEN);
+ ret = VCWD_GETCWD(path, MAXPATHLEN);
#elif HAVE_GETWD
- ret = V_GETWD(path);
+ ret = VCWD_GETWD(path);
/*
* #warning is not ANSI C
* #else
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index 832251fbce..56f2c6481a 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -99,9 +99,9 @@ int php_Exec(int type, char *cmd, pval *array, pval *return_value)
sig_handler = signal (SIGCHLD, SIG_DFL);
#endif
#ifdef PHP_WIN32
- fp = V_POPEN(d, "rb");
+ fp = VCWD_POPEN(d, "rb");
#else
- fp = V_POPEN(d, "r");
+ fp = VCWD_POPEN(d, "r");
#endif
if (!fp) {
php_error(E_WARNING, "Unable to fork [%s]", d);
@@ -117,9 +117,9 @@ int php_Exec(int type, char *cmd, pval *array, pval *return_value)
sig_handler = signal (SIGCHLD, SIG_DFL);
#endif
#ifdef PHP_WIN32
- fp = V_POPEN(cmd, "rb");
+ fp = VCWD_POPEN(cmd, "rb");
#else
- fp = V_POPEN(cmd, "r");
+ fp = VCWD_POPEN(cmd, "r");
#endif
if (!fp) {
php_error(E_WARNING, "Unable to fork [%s]", cmd);
@@ -451,9 +451,9 @@ PHP_FUNCTION(shell_exec)
convert_to_string_ex(cmd);
#ifdef PHP_WIN32
- if ((in=V_POPEN(Z_STRVAL_PP(cmd),"rt"))==NULL) {
+ if ((in=VCWD_POPEN(Z_STRVAL_PP(cmd),"rt"))==NULL) {
#else
- if ((in=V_POPEN(Z_STRVAL_PP(cmd),"r"))==NULL) {
+ if ((in=VCWD_POPEN(Z_STRVAL_PP(cmd),"r"))==NULL) {
#endif
php_error(E_WARNING,"Unable to execute '%s'",Z_STRVAL_PP(cmd));
}
diff --git a/ext/standard/file.c b/ext/standard/file.c
index b8c941706e..82bfa0eba7 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -719,7 +719,7 @@ PHP_FUNCTION(popen)
}
tmp = php_escape_shell_cmd(buf);
- fp = V_POPEN(tmp,p);
+ fp = VCWD_POPEN(tmp,p);
efree(tmp);
if (!fp) {
@@ -727,7 +727,7 @@ PHP_FUNCTION(popen)
RETURN_FALSE;
}
} else {
- fp = V_POPEN((*arg1)->value.str.val, p);
+ fp = VCWD_POPEN((*arg1)->value.str.val, p);
if (!fp) {
php_error(E_WARNING,"popen(\"%s\",\"%s\") - %s",(*arg1)->value.str.val,p,strerror(errno));
efree(p);
@@ -1483,7 +1483,7 @@ PHP_FUNCTION(mkdir)
if (PG(safe_mode) &&(!php_checkuid((*arg1)->value.str.val, NULL, CHECKUID_ALLOW_ONLY_DIR))) {
RETURN_FALSE;
}
- ret = V_MKDIR((*arg1)->value.str.val, mode);
+ ret = VCWD_MKDIR((*arg1)->value.str.val, mode);
if (ret < 0) {
php_error(E_WARNING,"MkDir failed (%s)", strerror(errno));
RETURN_FALSE;
@@ -1508,7 +1508,7 @@ PHP_FUNCTION(rmdir)
if (PG(safe_mode) &&(!php_checkuid((*arg1)->value.str.val, NULL, CHECKUID_ALLOW_FILE_NOT_EXISTS))) {
RETURN_FALSE;
}
- ret = V_RMDIR((*arg1)->value.str.val);
+ ret = VCWD_RMDIR((*arg1)->value.str.val);
if (ret < 0) {
php_error(E_WARNING,"RmDir failed (%s)", strerror(errno));
RETURN_FALSE;
@@ -1707,7 +1707,7 @@ PHP_FUNCTION(rename)
if (PG(safe_mode) &&(!php_checkuid(old_name, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
RETURN_FALSE;
}
- ret = V_RENAME(old_name, new_name);
+ ret = VCWD_RENAME(old_name, new_name);
if (ret == -1) {
php_error(E_WARNING,"Rename failed (%s)", strerror(errno));
@@ -1736,7 +1736,7 @@ PHP_FUNCTION(unlink)
RETURN_FALSE;
}
- ret = V_UNLINK((*filename)->value.str.val);
+ ret = VCWD_UNLINK((*filename)->value.str.val);
if (ret == -1) {
php_error(E_WARNING, "Unlink failed (%s)", strerror(errno));
RETURN_FALSE;
@@ -1867,17 +1867,17 @@ PHPAPI int php_copy_file(char *src, char *dest)
int ret = FAILURE;
#ifdef PHP_WIN32
- if ((fd_s=V_OPEN((src,O_RDONLY|_O_BINARY)))==-1) {
+ if ((fd_s=VCWD_OPEN((src,O_RDONLY|_O_BINARY)))==-1) {
#else
- if ((fd_s=V_OPEN((src,O_RDONLY)))==-1) {
+ if ((fd_s=VCWD_OPEN((src,O_RDONLY)))==-1) {
#endif
php_error(E_WARNING,"Unable to open '%s' for reading: %s", src, strerror(errno));
return FAILURE;
}
#ifdef PHP_WIN32
- if ((fd_t=V_OPEN((dest,_O_WRONLY|_O_CREAT|_O_TRUNC|_O_BINARY,_S_IREAD|_S_IWRITE)))==-1) {
+ if ((fd_t=VCWD_OPEN((dest,_O_WRONLY|_O_CREAT|_O_TRUNC|_O_BINARY,_S_IREAD|_S_IWRITE)))==-1) {
#else
- if ((fd_t=V_CREAT(dest,0777))==-1) {
+ if ((fd_t=VCWD_CREAT(dest,0777))==-1) {
#endif
php_error(E_WARNING,"Unable to create '%s': %s", dest, strerror(errno));
close(fd_s);
@@ -2152,7 +2152,7 @@ PHP_FUNCTION(realpath)
convert_to_string_ex(path);
- if (V_REALPATH((*path)->value.str.val, resolved_path_buff)) {
+ if (VCWD_REALPATH((*path)->value.str.val, resolved_path_buff)) {
RETURN_STRING(resolved_path_buff, 1);
} else {
RETURN_FALSE;
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index 1ea165677d..866403238e 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -260,7 +260,7 @@ PHP_FUNCTION(chgrp)
if (php_check_open_basedir((*filename)->value.str.val))
RETURN_FALSE;
- ret = V_CHOWN((*filename)->value.str.val, -1, gid);
+ ret = VCWD_CHOWN((*filename)->value.str.val, -1, gid);
if (ret == -1) {
php_error(E_WARNING, "chgrp failed: %s", strerror(errno));
RETURN_FALSE;
@@ -308,7 +308,7 @@ PHP_FUNCTION(chown)
if (php_check_open_basedir((*filename)->value.str.val))
RETURN_FALSE;
- ret = V_CHOWN((*filename)->value.str.val, uid, -1);
+ ret = VCWD_CHOWN((*filename)->value.str.val, uid, -1);
if (ret == -1) {
php_error(E_WARNING, "chown failed: %s", strerror(errno));
RETURN_FALSE;
@@ -350,7 +350,7 @@ PHP_FUNCTION(chmod)
if(PG(safe_mode))
imode &= 0777;
- ret = V_CHMOD((*filename)->value.str.val, imode);
+ ret = VCWD_CHMOD((*filename)->value.str.val, imode);
if (ret == -1) {
php_error(E_WARNING, "chmod failed: %s", strerror(errno));
RETURN_FALSE;
@@ -409,9 +409,9 @@ PHP_FUNCTION(touch)
}
/* create the file if it doesn't exist already */
- ret = V_STAT((*filename)->value.str.val, &sb);
+ ret = VCWD_STAT((*filename)->value.str.val, &sb);
if (ret == -1) {
- file = V_FOPEN((*filename)->value.str.val, "w");
+ file = VCWD_FOPEN((*filename)->value.str.val, "w");
if (file == NULL) {
php_error(E_WARNING, "unable to create file %s because %s", (*filename)->value.str.val, strerror(errno));
if (newtime) efree(newtime);
@@ -420,7 +420,7 @@ PHP_FUNCTION(touch)
fclose(file);
}
- ret = V_UTIME((*filename)->value.str.val, newtime);
+ ret = VCWD_UTIME((*filename)->value.str.val, newtime);
if (newtime) efree(newtime);
if (ret == -1) {
php_error(E_WARNING, "utime failed: %s", strerror(errno));
@@ -469,7 +469,7 @@ static void php_stat(const char *filename, php_stat_len filename_length, int typ
#if HAVE_SYMLINK
BG(lsb).st_mode = 0; /* mark lstat buf invalid */
#endif
- if (V_STAT(BG(CurrentStatFile), &BG(sb)) == -1) {
+ if (VCWD_STAT(BG(CurrentStatFile), &BG(sb)) == -1) {
if (!IS_LINK_OPERATION() && (type != 15 || errno != ENOENT)) { /* fileexists() test must print no error */
php_error(E_NOTICE,"stat failed for %s (errno=%d - %s)", BG(CurrentStatFile), errno, strerror(errno));
}
@@ -484,7 +484,7 @@ static void php_stat(const char *filename, php_stat_len filename_length, int typ
#if HAVE_SYMLINK
if (IS_LINK_OPERATION() && !BG(lsb).st_mode) {
/* do lstat if the buffer is empty */
- if (V_LSTAT(filename, &BG(lsb)) == -1) {
+ if (VCWD_LSTAT(filename, &BG(lsb)) == -1) {
php_error(E_NOTICE, "lstat failed for %s (errno=%d - %s)", filename, errno, strerror(errno));
RETURN_FALSE;
}
diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c
index b437befa5e..c32ae918c9 100644
--- a/ext/standard/iptc.c
+++ b/ext/standard/iptc.c
@@ -198,7 +198,7 @@ PHP_FUNCTION(iptcembed)
if (php_check_open_basedir((*jpeg_file)->value.str.val))
RETURN_FALSE;
- if ((fp = V_FOPEN((*jpeg_file)->value.str.val,"rb")) == 0) {
+ if ((fp = VCWD_FOPEN((*jpeg_file)->value.str.val,"rb")) == 0) {
php_error(E_WARNING, "Unable to open %s", (*jpeg_file)->value.str.val);
RETURN_FALSE;
}
diff --git a/ext/standard/link.c b/ext/standard/link.c
index 038075cffe..7e7e60697e 100644
--- a/ext/standard/link.c
+++ b/ext/standard/link.c
@@ -87,7 +87,7 @@ PHP_FUNCTION(linkinfo)
}
convert_to_string_ex(filename);
- ret = V_LSTAT((*filename)->value.str.val, &sb);
+ ret = VCWD_LSTAT((*filename)->value.str.val, &sb);
if (ret == -1) {
php_error(E_WARNING, "LinkInfo failed (%s)", strerror(errno));
RETURN_LONG(-1L);
diff --git a/ext/swf/swf.c b/ext/swf/swf.c
index 820d082042..b81e9f7c94 100644
--- a/ext/swf/swf.c
+++ b/ext/swf/swf.c
@@ -190,7 +190,7 @@ PHP_FUNCTION(swf_openfile)
free_na = 0;
RETURN_FALSE;
}
- V_UNLINK((const char *)na);
+ VCWD_UNLINK((const char *)na);
fclose(fp);
free_na = 1;
SWFG(use_file) = 0;
@@ -236,7 +236,7 @@ PHP_FUNCTION(swf_closefile)
char buf[4096];
int b;
- if ((f = V_FOPEN(SWFG(tmpfile_name), "r")) == NULL) {
+ if ((f = VCWD_FOPEN(SWFG(tmpfile_name), "r")) == NULL) {
php_error(E_WARNING, "Cannot create temporary file for stdout support with SWF");
RETURN_NULL();
}
@@ -246,7 +246,7 @@ PHP_FUNCTION(swf_closefile)
fclose(f);
- V_UNLINK((const char *)SWFG(tmpfile_name));
+ VCWD_UNLINK((const char *)SWFG(tmpfile_name));
}
}
/* }}} */