mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
- Change PHP_ to V_ (directory & file functions)
This commit is contained in:
parent
1665cba750
commit
c9911a151e
@ -571,7 +571,7 @@ PHP_FUNCTION(posix_getcwd)
|
||||
char buffer[MAXPATHLEN];
|
||||
char *p;
|
||||
|
||||
p = PHP_GETCWD(buffer, MAXPATHLEN);
|
||||
p = V_GETCWD(buffer, MAXPATHLEN);
|
||||
if (!p) {
|
||||
php_error(E_WARNING, "posix_getcwd() failed with '%s'",
|
||||
strerror(errno));
|
||||
|
@ -210,7 +210,7 @@ PHP_FUNCTION(chdir)
|
||||
}
|
||||
convert_to_string_ex(arg);
|
||||
|
||||
ret = PHP_CHDIR((*arg)->value.str.val);
|
||||
ret = V_CHDIR((*arg)->value.str.val);
|
||||
|
||||
if (ret < 0) {
|
||||
php_error(E_WARNING, "ChDir: %s (errno %d)", strerror(errno), errno);
|
||||
@ -234,9 +234,9 @@ PHP_FUNCTION(getcwd)
|
||||
}
|
||||
|
||||
#if HAVE_GETCWD
|
||||
ret = PHP_GETCWD(path,MAXPATHLEN-1);
|
||||
ret = V_GETCWD(path,MAXPATHLEN-1);
|
||||
#elif HAVE_GETWD
|
||||
ret = PHP_GETWD(path);
|
||||
ret = V_GETWD(path);
|
||||
/*
|
||||
* #warning is not ANSI C
|
||||
* #else
|
||||
|
@ -387,7 +387,7 @@ PHP_FUNCTION(touch)
|
||||
/* create the file if it doesn't exist already */
|
||||
ret = stat((*filename)->value.str.val, &sb);
|
||||
if (ret == -1) {
|
||||
file = PHP_FOPEN((*filename)->value.str.val, "w");
|
||||
file = V_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);
|
||||
|
@ -338,7 +338,7 @@ PHP_FUNCTION(getimagesize)
|
||||
/* Check open_basedir */
|
||||
if (php_check_open_basedir((*arg1)->value.str.val)) return;
|
||||
|
||||
if ((fp = PHP_FOPEN((*arg1)->value.str.val,"rb")) == 0) {
|
||||
if ((fp = V_FOPEN((*arg1)->value.str.val,"rb")) == 0) {
|
||||
php_error(E_WARNING, "Unable to open %s", (*arg1)->value.str.val);
|
||||
return;
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ PHP_FUNCTION(iptcembed)
|
||||
if (php_check_open_basedir((*jpeg_file)->value.str.val))
|
||||
RETURN_FALSE;
|
||||
|
||||
if ((fp = PHP_FOPEN((*jpeg_file)->value.str.val,"rb")) == 0) {
|
||||
if ((fp = V_FOPEN((*jpeg_file)->value.str.val,"rb")) == 0) {
|
||||
php_error(E_WARNING, "Unable to open %s", (*jpeg_file)->value.str.val);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
@ -483,7 +483,7 @@ int send_php(request_rec *r, int display_source_mode, char *filename)
|
||||
SG(server_context) = r;
|
||||
|
||||
php_save_umask();
|
||||
PHP_CHDIR_FILE(filename);
|
||||
V_CHDIR_FILE(filename);
|
||||
add_common_vars(r);
|
||||
add_cgi_vars(r);
|
||||
|
||||
|
@ -457,7 +457,7 @@ static void init_request_info(sapi_globals_struct *sapi_globals, LPEXTENSION_CON
|
||||
|
||||
if (path_end) {
|
||||
*path_end = 0;
|
||||
PHP_CHDIR(SG(request_info).path_translated);
|
||||
V_CHDIR(SG(request_info).path_translated);
|
||||
*path_end = SEPARATOR;
|
||||
}
|
||||
}
|
||||
|
@ -601,7 +601,7 @@ static int php_roxen_module_main(SLS_D)
|
||||
/* VERY BAD, but should work */
|
||||
if(len > 0) {
|
||||
dir[len] = '\0';
|
||||
PHP_CHDIR(dir);
|
||||
V_CHDIR(dir);
|
||||
}
|
||||
free(dir);
|
||||
#endif
|
||||
|
@ -29,7 +29,7 @@ void UpdateIniFromRegistry(char *path)
|
||||
char drive_letter;
|
||||
|
||||
/* get current working directory and prepend it to the path */
|
||||
if (!PHP_GETCWD(tmp_buf, MAXPATHLEN)) {
|
||||
if (!V_GETCWD(tmp_buf, MAXPATHLEN)) {
|
||||
efree(orig_path);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user