cvs: php4 /main php_virtual_cwd.c
| From: | Stanislav Malyshev | Date: | Sun, 06 Aug 2000 16:34:37 +0000 |
| Subject: | cvs: php4 /main php_virtual_cwd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1062@lists.php.net to get a copy of this message | ||
stas Sun Aug 6 09:34:37 2000 EDT
Modified files:
/php4/main php_virtual_cwd.c
Log:
Replace min() - not everyone has it
Index: php4/main/php_virtual_cwd.c
diff -u php4/main/php_virtual_cwd.c:1.64 php4/main/php_virtual_cwd.c:1.65
--- php4/main/php_virtual_cwd.c:1.64 Sun Aug 6 09:22:07 2000
+++ php4/main/php_virtual_cwd.c Sun Aug 6 09:34:37 2000
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_virtual_cwd.c,v 1.64 2000/08/06 16:22:07 andi Exp $ */
+/* $Id: php_virtual_cwd.c,v 1.65 2000/08/06 16:34:37 stas Exp $ */
#include <sys/types.h>
#include <sys/stat.h>
@@ -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 @@
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;