]> granicus.if.org Git - php/commitdiff
Instead of checking whether realpath exists based on OS. Use the
authorIlia Alshanetsky <iliaa@php.net>
Wed, 6 Nov 2002 18:07:23 +0000 (18:07 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 6 Nov 2002 18:07:23 +0000 (18:07 +0000)
HAVE_REALPATH define, which is set if realpath() is avaliable. This patch
also resolves bug #18868.

TSRM/tsrm_virtual_cwd.c
TSRM/tsrm_virtual_cwd.h
ext/standard/file.c
main/safe_mode.c

index 86cc3fc724c6d7835770686b309f17ba4ed878ff..12c35e1ced2962e32c270a6c80d3fdeb525f4574 100644 (file)
@@ -41,7 +41,7 @@
 #include "tsrm_nw.h"
 #endif
 
-#ifdef __BEOS__
+#ifndef HAVE_REALPATH
 #define realpath(x,y) strcpy(y,x)
 #endif
 
index 18452304fd480e50c0c647504590652c628a77a3..2465d81b6d47d8bb37432d1f3d0b03296d9c5708 100644 (file)
@@ -233,7 +233,7 @@ typedef struct _virtual_cwd_globals {
 #define VCWD_POPEN(command, type) popen(command, type)
 #define VCWD_ACCESS(pathname, mode) access(pathname, mode)
 
-#if !defined(TSRM_WIN32) && !defined(NETWARE)
+#ifdef HAVE_REALPATH
 #define VCWD_REALPATH(path, real_path) realpath(path, real_path)
 #else
 #define VCWD_REALPATH(path, real_path) strcpy(real_path, path)
index 048c723f7a9a49ff59f50b4dca4ad0d1be74a97b..e08c3c0ee3d7dcda80d915f10340b37b68d6844e 100644 (file)
@@ -115,10 +115,6 @@ php_file_globals file_globals;
 #include <fnmatch.h>
 #endif
 
-#ifdef __BEOS__
-#define realpath(x,y) strcpy(y,x)
-#endif
-
 /* }}} */
 /* {{{ ZTS-stuff / Globals / Prototypes */
 
index 6a0f733eb57c491099e8fc7f76503d67d753d0cf..fe19761ae85c4c07d3f064e25a8465514008f51c 100644 (file)
 #include "SAPI.h"
 #include "php_globals.h"
 
-#ifdef __BEOS__
-#define realpath(x,y) strcpy(y,x)
-#endif
-
 /*
  * php_checkuid
  *