diff options
| author | Andi Gutmans <andi@php.net> | 2000-04-09 19:54:50 +0000 |
|---|---|---|
| committer | Andi Gutmans <andi@php.net> | 2000-04-09 19:54:50 +0000 |
| commit | c981be0bca1e37754de77c500b962ec277860013 (patch) | |
| tree | 7d35a2c788624ecc7824939f614eab242f761a51 /main/fopen_wrappers.c | |
| parent | 4cdcf638ce793d10e879c8481d88284aef8d914f (diff) | |
| download | php-git-c981be0bca1e37754de77c500b962ec277860013.tar.gz | |
- Don't need to extern functions
- Use virtual_file_ex() in expand_filepath()
Diffstat (limited to 'main/fopen_wrappers.c')
| -rw-r--r-- | main/fopen_wrappers.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 1d6797997a..116985675e 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -973,6 +973,28 @@ PHPAPI char *php_strip_url_passwd(char *url) } +#if 1 + +PHPAPI char *expand_filepath(char *filepath) +{ + cwd_state new_state; + char cwd[MAXPATHLEN+1]; + char *result; + + result = getcwd(cwd, MAXPATHLEN); + if (!result) { + cwd[0] = '\0'; + } + + new_state.cwd = strdup(cwd); + new_state.cwd_length = strlen(cwd); + + virtual_file_ex(&new_state, filepath, NULL); + return new_state.cwd; +} + +#else + PHPAPI char *expand_filepath(char *filepath) { char *retval = NULL; @@ -1013,6 +1035,8 @@ PHPAPI char *expand_filepath(char *filepath) return retval; } +#endif + /* * Local variables: * tab-width: 4 |
