]> granicus.if.org Git - php/commitdiff
- Found my bug and managed to move the V_* macros to TSRM
authorAndi Gutmans <andi@php.net>
Mon, 4 Sep 2000 04:18:04 +0000 (04:18 +0000)
committerAndi Gutmans <andi@php.net>
Mon, 4 Sep 2000 04:18:04 +0000 (04:18 +0000)
main/SAPI.c
main/php.h

index 14ddf856c582d0a17ed6abe296f55fe9a1fdd2eb..51956b94d873333e2eca1488d185b4b464da1a7c 100644 (file)
@@ -85,7 +85,7 @@ SAPI_API void sapi_startup(sapi_module_struct *sf)
        sapi_globals_ctor(&sapi_globals);
 #endif
 
-#ifdef VIRTUAL_DIR
+#ifdef ZTS
        virtual_cwd_startup(); /* Could use shutdown to free the main cwd but it would just slow it down for CGI */
 #endif
 
@@ -97,7 +97,7 @@ SAPI_API void sapi_startup(sapi_module_struct *sf)
 SAPI_API void sapi_shutdown(void)
 {
        reentrancy_shutdown();
-#ifdef VIRTUAL_DIR
+#ifdef ZTS
        virtual_cwd_shutdown();
 #endif
        php_global_shutdown_internal_extensions();
index 600b3df9ebc18ff4f67b08cb95890c81e6050234..e48a6ccfe3034bf1303d10f15bfe7d0fb3290567 100644 (file)
@@ -290,66 +290,9 @@ PHPAPI int cfg_get_string(char *varname, char **result);
 #define VIRTUAL_DIR
 #endif
 
+/* Virtual current working directory support */
 #include "tsrm_virtual_cwd.h"
 
-/* Virtual current directory support */
-#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_STAT(path, buff) virtual_stat(path, buff)
-#ifdef PHP_WIN32
-#define V_LSTAT(path, buff) virtual_stat(path, buff)
-#else
-#define V_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)
-#if HAVE_UTIME
-#define V_UTIME(path,time) virtual_utime(path,time)
-#endif
-#define V_CHMOD(path,mode) virtual_chmod(path,mode)
-#ifndef PHP_WIN32
-#define V_CHOWN(path,owner,group) virtual_chown(path,owner,group)
-#endif
-
-#else /* !defined(VIRTUAL_DIR) */
-
-#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_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)
-#if HAVE_UTIME
-#define V_UTIME(path,time) utime(path,time)
-#endif
-#define V_CHMOD(path,mode) chmod(path,mode)
-#ifndef PHP_WIN32
-#define V_CHOWN(path,owner,group) chown(path,owner,group)
-#endif
-
-#endif /* VIRTUAL_DIR */
-
 #include "zend_constants.h"
 
 /* connection status states */