]> granicus.if.org Git - php/commitdiff
- Change macros from V_ to VCWD_ because of AIX name clash
authorAndi Gutmans <andi@php.net>
Mon, 30 Apr 2001 12:45:02 +0000 (12:45 +0000)
committerAndi Gutmans <andi@php.net>
Mon, 30 Apr 2001 12:45:02 +0000 (12:45 +0000)
42 files changed:
ChangeLog
TSRM/tsrm_virtual_cwd.h
ext/com/COM.c
ext/db/db.c
ext/dba/dba_cdb.c
ext/dba/dba_db2.c
ext/dba/dba_db3.c
ext/dba/dba_dbm.c
ext/dbase/dbase.c
ext/dbase/dbf_head.c
ext/exif/exif.c
ext/fdf/fdf.c
ext/filepro/filepro.c
ext/ftp/php_ftp.c
ext/gd/gd.c
ext/gd/gd_ctx.c
ext/gettext/gettext.c
ext/ming/ming.c
ext/oci8/oci8.c
ext/openssl/openssl.c
ext/posix/posix.c
ext/rpc/com/com_wrapper.c
ext/session/mod_files.c
ext/session/session.c
ext/standard/basic_functions.c
ext/standard/browscap.c
ext/standard/dir.c
ext/standard/exec.c
ext/standard/file.c
ext/standard/filestat.c
ext/standard/iptc.c
ext/standard/link.c
ext/swf/swf.c
main/SAPI.c
main/fopen_wrappers.c
main/main.c
main/php_open_temporary_file.c
main/rfc1867.c
main/safe_mode.c
sapi/caudium/caudium.c
sapi/cgi/cgi_main.c
win32/registry.c

index 698deaf556987d9e490e5ef945ca5897cc11fe41..f9cbc393413d62a9ded767f54541e8ca5c63234d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
 2001-04-03  Daniel Beulshausen  <daniel@php4win.de>
 
-    * ext/exif/exif.c: use V_STAT
+    * ext/exif/exif.c: use VCWD_STAT
 
     * ext/exif/exif.c: resolve realpath if in v-dir mode
 
index b47159a0ff317958e2f3f61ae1840ebbaf3499c2..82dcc5765e06a05ac5698213d5d3e0805128f78f 100644 (file)
@@ -154,59 +154,59 @@ typedef struct _virtual_cwd_globals {
 
 #ifdef VIRTUAL_DIR
 
-#define V_GETCWD(buff, size) virtual_getcwd(buff,size)
-#define V_FOPEN(path, mode) virtual_fopen(path, mode)
-/* The V_OPEN macro will need to be used as V_OPEN((path, flags, ...)) */
-#define V_OPEN(open_args) virtual_open open_args
-#define V_CREAT(path, mode) virtual_creat(path, mode)
-#define V_CHDIR(path) virtual_chdir(path)
-#define V_CHDIR_FILE(path) virtual_chdir_file(path, virtual_chdir)
-#define V_GETWD(buf)
-#define V_REALPATH(path,real_path) virtual_realpath(path,real_path)
-#define V_RENAME(oldname,newname) virtual_rename(oldname,newname)
-#define V_STAT(path, buff) virtual_stat(path, buff)
+#define VCWD_GETCWD(buff, size) virtual_getcwd(buff,size)
+#define VCWD_FOPEN(path, mode) virtual_fopen(path, mode)
+/* The VCWD_OPEN macro will need to be used as VCWD_OPEN((path, flags, ...)) */
+#define VCWD_OPEN(open_args) virtual_open open_args
+#define VCWD_CREAT(path, mode) virtual_creat(path, mode)
+#define VCWD_CHDIR(path) virtual_chdir(path)
+#define VCWD_CHDIR_FILE(path) virtual_chdir_file(path, virtual_chdir)
+#define VCWD_GETWD(buf)
+#define VCWD_REALPATH(path,real_path) virtual_realpath(path,real_path)
+#define VCWD_RENAME(oldname,newname) virtual_rename(oldname,newname)
+#define VCWD_STAT(path, buff) virtual_stat(path, buff)
 #ifdef TSRM_WIN32
-#define V_LSTAT(path, buff) virtual_stat(path, buff)
+#define VCWD_LSTAT(path, buff) virtual_stat(path, buff)
 #else
-#define V_LSTAT(path, buff) virtual_lstat(path, buff)
+#define VCWD_LSTAT(path, buff) virtual_lstat(path, buff)
 #endif
-#define V_UNLINK(path) virtual_unlink(path)
-#define V_MKDIR(pathname, mode) virtual_mkdir(pathname, mode)
-#define V_RMDIR(pathname) virtual_rmdir(pathname)
-#define V_OPENDIR(pathname) virtual_opendir(pathname)
-#define V_POPEN(command, type) virtual_popen(command, type)
+#define VCWD_UNLINK(path) virtual_unlink(path)
+#define VCWD_MKDIR(pathname, mode) virtual_mkdir(pathname, mode)
+#define VCWD_RMDIR(pathname) virtual_rmdir(pathname)
+#define VCWD_OPENDIR(pathname) virtual_opendir(pathname)
+#define VCWD_POPEN(command, type) virtual_popen(command, type)
 #if HAVE_UTIME
-#define V_UTIME(path,time) virtual_utime(path,time)
+#define VCWD_UTIME(path,time) virtual_utime(path,time)
 #endif
-#define V_CHMOD(path,mode) virtual_chmod(path,mode)
+#define VCWD_CHMOD(path,mode) virtual_chmod(path,mode)
 #ifndef TSRM_WIN32
-#define V_CHOWN(path,owner,group) virtual_chown(path,owner,group)
+#define VCWD_CHOWN(path,owner,group) virtual_chown(path,owner,group)
 #endif
 
 #else
 
-#define V_GETCWD(buff, size) getcwd(buff,size)
-#define V_FOPEN(path, mode)  fopen(path, mode)
-#define V_OPEN(open_args) open open_args
-#define V_CREAT(path, mode) creat(path, mode)
-#define V_RENAME(oldname,newname) rename(oldname,newname)
-#define V_CHDIR(path) chdir(path)
-#define V_CHDIR_FILE(path) virtual_chdir_file(path, chdir)
-#define V_GETWD(buf) getwd(buf)
-#define V_STAT(path, buff) stat(path, buff)
-#define V_LSTAT(path, buff) lstat(path, buff)
-#define V_UNLINK(path) unlink(path)
-#define V_MKDIR(pathname, mode) mkdir(pathname, mode)
-#define V_RMDIR(pathname) rmdir(pathname)
-#define V_OPENDIR(pathname) opendir(pathname)
-#define V_POPEN(command, type) popen(command, type)
-#define V_REALPATH(path,real_path) realpath(path,real_path)
+#define VCWD_GETCWD(buff, size) getcwd(buff,size)
+#define VCWD_FOPEN(path, mode)  fopen(path, mode)
+#define VCWD_OPEN(open_args) open open_args
+#define VCWD_CREAT(path, mode) creat(path, mode)
+#define VCWD_RENAME(oldname,newname) rename(oldname,newname)
+#define VCWD_CHDIR(path) chdir(path)
+#define VCWD_CHDIR_FILE(path) virtual_chdir_file(path, chdir)
+#define VCWD_GETWD(buf) getwd(buf)
+#define VCWD_STAT(path, buff) stat(path, buff)
+#define VCWD_LSTAT(path, buff) lstat(path, buff)
+#define VCWD_UNLINK(path) unlink(path)
+#define VCWD_MKDIR(pathname, mode) mkdir(pathname, mode)
+#define VCWD_RMDIR(pathname) rmdir(pathname)
+#define VCWD_OPENDIR(pathname) opendir(pathname)
+#define VCWD_POPEN(command, type) popen(command, type)
+#define VCWD_REALPATH(path,real_path) realpath(path,real_path)
 #if HAVE_UTIME
-#define V_UTIME(path,time) utime(path,time)
+#define VCWD_UTIME(path,time) utime(path,time)
 #endif
-#define V_CHMOD(path,mode) chmod(path,mode)
+#define VCWD_CHMOD(path,mode) chmod(path,mode)
 #ifndef TSRM_WIN32
-#define V_CHOWN(path,owner,group) chown(path,owner,group)
+#define VCWD_CHOWN(path,owner,group) chown(path,owner,group)
 #endif
 
 #endif
index 9ed09eb8d467f99bb4eccbde39580ed374e5c3a2..1526b09e8a5f4d65e831a9441e1840c506a16935 100644 (file)
@@ -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;
        }
 
index d49d6f6c47cf4dbfe3c085b0eefa5f0a3ffe59d4..80e19d47aea1b30994956f66ada483a8eed75592 100644 (file)
@@ -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);
        }
index 93abec59344594bf8e2f610d6adb22143061c75f..ab54d12da64eee62a9cb5d5cb804de7b079f4c7d 100644 (file)
@@ -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;
index d79e62ed42734e9ddd9ea540a7f1526179ee6373..2c6fcb8acee9157ac1c6faa48929770288125aea 100644 (file)
@@ -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 : 
index 5d3cd696066b4c68db401233c639837e75232af0..e0832a86a0f0146d1e3f93447c786901683ecace 100644 (file)
@@ -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 : 
index a9df5452c16bd347b9c32740beac4cc710e8159a..ede05a47ca99a997cfb6af94fa51dd2c496fe65f 100644 (file)
@@ -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);
 
index 9cb8325b742d8196c33367026daa536d08eecfa0..63312f47b6824fd2ec2caada88a8de4e336802e3 100644 (file)
@@ -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;
        }
index c92a29ba3a211c0bac2807105b942eacedba3c7d..b99c1a1acdd8e97b3e492dd88b382a25effe0733 100644 (file)
@@ -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;
                }
index e84322e751a888ecce2efb67871918bfa29d3fca..fce8281d955f16c7a939b0722f6c61315ccfa2be 100644 (file)
@@ -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 {
index 0e883469b6d5e290ed5667241e9fe5100b3a8fb7..590df50d500b660f2b6febb8e644eb178ddfb3f7 100644 (file)
@@ -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);
index 915e4f3de8f8ab3ad828d81499692ca97f1e19cd..85a24cadfb6675e6059f2a7a22fda616fd1de249 100644 (file)
@@ -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);
index 8f74068eac8c3fa2b8c7bb05b60d6aede0b59d0e..2dcbdbda3e7e9e4e9d89b0f0923bde6f61612c63 100644 (file)
@@ -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;
index 3c8b96336849192c48ec43069b6202f8aae82aca..aacd2b94631571761a128d1ba4de6ba5bcd15ae8 100644 (file)
@@ -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;
index 3e8d595c22d44f3ab16f68e5c630f3cb02fe6854..6fb5a08bb2a81d5033f5c7e1fec17041f24ad47d 100644 (file)
@@ -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;
index 7d75dbe026d7c3ce5e8adfc53d0296d958e898ec..3de4b007f5e43a4cdf512f33571238c88c4eb24d 100644 (file)
@@ -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);
index f2203c2e59fef4e3d8f331b841202f67724e7639..3ac7e47cfddfcb731f8834ddf72f9e792e12d743 100644 (file)
@@ -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));
index 0f994da22d01822b17b7cfbd7ab3e73596b1b4a6..b2c4e7174ffa0b5b4d69da8039798ff8ed4e7db2 100644 (file)
@@ -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;
                        } 
index 9e9f4433d0d7c1b72298539cd5606c3dd0192970..8e7f3b9244edf79188ec40ec349e79e32d64c9f2 100644 (file)
@@ -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;
                        }
index 537ad4bf23a0100731b4d2bb5b9cfd0836fcf186..c562b2e2b7e70848c247c2afa483ae3762406e44 100644 (file)
@@ -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));
index 9ed09eb8d467f99bb4eccbde39580ed374e5c3a2..1526b09e8a5f4d65e831a9441e1840c506a16935 100644 (file)
@@ -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;
        }
 
index 2348f144fea4c2aa7212ea6e6a925f7d4bf807ba..ab24ee6354b0a3cb4541cf84b63bf27eba990b31 100644 (file)
@@ -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;
        }
 
index 013754301c9ab0932e1dcb16450868ca141f8433..5fad364eaf22a9c3775a5e6ccb9e95a0995af98e 100644 (file)
@@ -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;
                }
 
index 7e779a7f7503fb0a358b087cdac1004b89ca5355..4063d78468ca458a298365a2e394dc290dec2cf5 100644 (file)
@@ -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;
index 20e0a620c251c71a0532a6925be8fa1a65aa6e1e..3976613a7943f64627d23e6c96735e17024efae4 100644 (file)
@@ -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;
index fcb1ea75430c436d4f7fabd010b3565790514f86..2e1b4605c10a5c2af20332f3a9126074d90c6047 100644 (file)
@@ -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
index 832251fbcedbfa6e7186933549ae8c01e860bfe3..56f2c6481af0c022143d6364b6df8d3de31a48d6 100644 (file)
@@ -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));
        }
index b8c941706e8364e719acc594c844dab0011b16df..82bfa0eba7ddfb5fddd859e5661bdc50750bc8b3 100644 (file)
@@ -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;
index 1ea165677db91afa42830c7746f92a5da10120e4..866403238eca6f727db7024df57b8eb4b9651c39 100644 (file)
@@ -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;
                }
index b437befa5e9fda8b7cd0afbacd4649fe6129bfe7..c32ae918c97fe2acd8395fc4c8b9e9e580a93f87 100644 (file)
@@ -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;
     }
index 038075cffe7665d593349b78a9f4867dc92e1ee1..7e7e60697e62d2180763f1d000599d1069fa0a86 100644 (file)
@@ -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);
index 820d082042dbc1173a50736ad285dd6edf51fede..b81e9f7c9467e595eced9ce6590801cb260c606d 100644 (file)
@@ -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));
        }
 }
 /* }}} */
index b0bb456cae263dae88d0d691a76ef2b5d9285808..8dc5e5890a7fe5d3477b813f0382398f68bf65cc 100644 (file)
@@ -574,7 +574,7 @@ SAPI_API struct stat *sapi_get_stat()
        if (sapi_module.get_stat) {
                return sapi_module.get_stat(SLS_C);
        } else {
-               if (!SG(request_info).path_translated || (V_STAT(SG(request_info).path_translated, &SG(global_stat))==-1)) {
+               if (!SG(request_info).path_translated || (VCWD_STAT(SG(request_info).path_translated, &SG(global_stat))==-1)) {
                        return NULL;
                }
                return &SG(global_stat);
index af541f417e0cdd7bd540a0f07e59ec8c438eee8e..217d35abd9cbecb7ed5ff1504212f8ab1a660aa6 100644 (file)
@@ -232,7 +232,7 @@ static FILE *php_fopen_and_set_opened_path(const char *path, char *mode, char **
                if (php_check_open_basedir((char *)path)) {
                        return NULL;
                }
-               fp = V_FOPEN(path, mode);
+               fp = VCWD_FOPEN(path, mode);
                if (fp && opened_path) {
                        *opened_path = expand_filepath(path,NULL);
                }
@@ -336,7 +336,7 @@ PHPAPI FILE *php_fopen_primary_script(void)
                SG(request_info).path_translated = NULL;
                return NULL;
        }
-       fp = V_FOPEN(filename, "rb");
+       fp = VCWD_FOPEN(filename, "rb");
 
        /* refuse to open anything that is not a regular file */
        if (fp && (0 > fstat(fileno(fp), &st) || !S_ISREG(st.st_mode))) {
@@ -349,7 +349,7 @@ PHPAPI FILE *php_fopen_primary_script(void)
                return NULL;
        }
     if (!(SG(options) & SAPI_OPTION_NO_CHDIR)) {
-               V_CHDIR_FILE(filename);
+               VCWD_CHDIR_FILE(filename);
     }
        SG(request_info).path_translated = filename;
 
@@ -406,7 +406,7 @@ PHPAPI FILE *php_fopen_with_path(char *filename, char *mode, char *path, char **
                }
                snprintf(trypath, MAXPATHLEN, "%s/%s", ptr, filename);
                if (PG(safe_mode)) {
-                       if (V_STAT(trypath, &sb) == 0 && (!php_checkuid(trypath, mode, CHECKUID_CHECK_MODE_PARAM))) {
+                       if (VCWD_STAT(trypath, &sb) == 0 && (!php_checkuid(trypath, mode, CHECKUID_CHECK_MODE_PARAM))) {
                                efree(pathbuf);
                                return NULL;
                        }
@@ -520,7 +520,7 @@ PHPAPI char *expand_filepath(const char *filepath, char *real_path)
        char cwd[MAXPATHLEN];
        char *result;
 
-       result = V_GETCWD(cwd, MAXPATHLEN);     
+       result = VCWD_GETCWD(cwd, MAXPATHLEN);  
        if (!result) {
                cwd[0] = '\0';
        }
index 04d0c16325fbe60c22afde93aceae4fdae323785..43c0c68a9ad0d5519c5943ed647686fe278961e9 100644 (file)
@@ -267,7 +267,7 @@ void php_log_err(char *log_message)
                        return;
                }
 #endif
-               log_file = V_FOPEN(PG(error_log), "a");
+               log_file = VCWD_FOPEN(PG(error_log), "a");
                if (log_file != NULL) {
                        time(&error_time);
                        strftime(error_time_str, 128, "%d-%b-%Y %H:%M:%S", php_localtime_r(&error_time, &tmbuf)); 
@@ -1168,7 +1168,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_D
 
        if (setjmp(EG(bailout))!=0) {
                if (old_cwd[0] != '\0')
-                       V_CHDIR(old_cwd);
+                       VCWD_CHDIR(old_cwd);
                free_alloca(old_cwd);
                return EG(exit_status);
        }
@@ -1181,8 +1181,8 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_D
 
        if (primary_file->type == ZEND_HANDLE_FILENAME 
                        && primary_file->filename) {
-               V_GETCWD(old_cwd, OLD_CWD_SIZE-1);
-               V_CHDIR_FILE(primary_file->filename);
+               VCWD_GETCWD(old_cwd, OLD_CWD_SIZE-1);
+               VCWD_CHDIR_FILE(primary_file->filename);
        }
 
        if (PG(auto_prepend_file) && PG(auto_prepend_file)[0]) {
@@ -1206,7 +1206,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_D
        zend_execute_scripts(ZEND_REQUIRE CLS_CC ELS_CC, 3, prepend_file_p, primary_file, append_file_p);
 
        if (old_cwd[0] != '\0')
-               V_CHDIR(old_cwd);
+               VCWD_CHDIR(old_cwd);
        free_alloca(old_cwd);
 
        return EG(exit_status);
index c9f29d983190bc586c3435d76fdf7636f236cba7..6ebcb2ed0fe5947d20c83f4208ac9ab6758d084d 100644 (file)
@@ -114,7 +114,7 @@ static FILE *php_do_open_temporary_file(char *path, const char *pfx, char **open
 
 #ifdef PHP_WIN32
        if (GetTempFileName(path, pfx, 0, opened_path)) {
-               fp = V_FOPEN(opened_path, "wb");
+               fp = VCWD_FOPEN(opened_path, "wb");
        } else {
                fp = NULL;
        }
@@ -127,7 +127,7 @@ static FILE *php_do_open_temporary_file(char *path, const char *pfx, char **open
        }
 #else
        if (mktemp(opened_path)) {
-               fp = V_FOPEN(opened_path, "wb");
+               fp = VCWD_FOPEN(opened_path, "wb");
        } else {
                fp = NULL;
        }
index 6f2bb85b635d226d4a1c33deb3e5a928ada1108c..d4240d552fc5d38d994d0ce66744fb869abbc4b8 100644 (file)
@@ -85,7 +85,7 @@ static void register_http_post_files_variable_ex(char *var, zval *val, zval *htt
 
 static int unlink_filename(char **filename)
 {
-       V_UNLINK(*filename);
+       VCWD_UNLINK(*filename);
        return 0;
 }
 
index cd828a71e5942bc7b2ffc202e8d10ef1a98da86f..0421ad2c7d8b022c683cd24fa84c9bbe9d0df7d0 100644 (file)
@@ -70,7 +70,7 @@ PHPAPI int php_checkuid(const char *filename, char *fopen_mode, int mode)
        }
                
        if (mode != CHECKUID_ALLOW_ONLY_DIR) {
-               ret = V_STAT(filename, &sb);
+               ret = VCWD_STAT(filename, &sb);
                if (ret < 0) {
                        if (mode == CHECKUID_DISALLOW_FILE_NOT_EXISTS) {
                                php_error(E_WARNING, "Unable to access %s", filename);
@@ -98,7 +98,7 @@ PHPAPI int php_checkuid(const char *filename, char *fopen_mode, int mode)
 
        if (s) {
                *s='\0';
-               ret = V_STAT(filename, &sb);
+               ret = VCWD_STAT(filename, &sb);
                *s='/';
                if (ret < 0) {
                        php_error(E_WARNING, "Unable to access %s", filename);
@@ -107,11 +107,11 @@ PHPAPI int php_checkuid(const char *filename, char *fopen_mode, int mode)
                duid = sb.st_uid;
        } else {
                char cwd[MAXPATHLEN];
-               if (!V_GETCWD(cwd, MAXPATHLEN)) {
+               if (!VCWD_GETCWD(cwd, MAXPATHLEN)) {
                        php_error(E_WARNING, "Unable to access current working directory");
                        return 0;
                }
-               ret = V_STAT(cwd, &sb);
+               ret = VCWD_STAT(cwd, &sb);
                if (ret < 0) {
                        php_error(E_WARNING, "Unable to access %s", cwd);
                        return 0;
index 278024dc2b7b6173d082ce8e0f64f8bfb7630bb8..ed04859af4b61f78e018cb23091ba645799eeb1e 100644 (file)
@@ -640,7 +640,7 @@ static void php_caudium_module_main(php_caudium_request *ureq)
    * isn't. Not a problem though, since it's on by default when using ZTS
    * which we require.
    */
-  V_CHDIR_FILE(THIS->filename->str);
+  VCWD_CHDIR_FILE(THIS->filename->str);
 #endif
   
   file_handle.type = ZEND_HANDLE_FILENAME;
index 58090fee3cd01986ee7cfe212e9eb8de02d08a32..d5097574328ddf7d231a62366d3a10fec9efb21e 100644 (file)
@@ -708,7 +708,7 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
        }
 
        if (cgi && !file_handle.handle.fp) {
-               file_handle.handle.fp = V_FOPEN(argv0, "rb");
+               file_handle.handle.fp = VCWD_FOPEN(argv0, "rb");
                if(!file_handle.handle.fp) {
                        PUTS("No input file specified.\n");
                        php_request_shutdown((void *) 0);
index d18ce40b41d68d94555ffa590ccf1efc5df193aa..8ae25011b74f5aa9d170668b011e180e71235a40 100644 (file)
@@ -25,7 +25,7 @@ void UpdateIniFromRegistry(char *path)
                        char drive_letter;
 
                        /* get current working directory and prepend it to the path */
-                       if (!V_GETCWD(tmp_buf, MAXPATHLEN)) {
+                       if (!VCWD_GETCWD(tmp_buf, MAXPATHLEN)) {
                                efree(orig_path);
                                return;
                        }