diff options
author | Stanislav Malyshev <stas@php.net> | 2000-08-06 16:34:37 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2000-08-06 16:34:37 +0000 |
commit | 57c54a093bcc080b94675d28e72e5b523955d432 (patch) | |
tree | 07939d05effcd7957d1f722a2c395bf690e407b6 /main | |
parent | 10f300094bedb3273264a52e6fe2f11827441335 (diff) | |
download | php-git-57c54a093bcc080b94675d28e72e5b523955d432.tar.gz |
Replace min() - not everyone has it
Diffstat (limited to 'main')
-rw-r--r-- | main/php_virtual_cwd.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/main/php_virtual_cwd.c b/main/php_virtual_cwd.c index 3dbb8fd629..bf497d5003 100644 --- a/main/php_virtual_cwd.c +++ b/main/php_virtual_cwd.c @@ -33,15 +33,6 @@ #include "win95nt.h" #endif -#if HAVE_UTIME -# ifdef PHP_WIN32 -# include <sys/utime.h> -# else -# include <utime.h> -# endif -#endif - - #include "php_virtual_cwd.h" #include "php_reentrancy.h" /* for php_strtok_r */ @@ -458,7 +449,7 @@ CWD_API char *virtual_realpath(char *path, char *real_path) retval = virtual_file_ex(&new_state, path, NULL); if(retval) { - int len = min(MAXPATHLEN-1,new_state.cwd_length); + int len = new_state.cwd_length>MAXPATHLEN-1?MAXPATHLEN-1:new_state.cwd_length; memcpy(real_path, new_state.cwd, len); real_path[len] = '\0'; return real_path; |