From: Ilia Alshanetsky Date: Wed, 6 Nov 2002 18:07:23 +0000 (+0000) Subject: Instead of checking whether realpath exists based on OS. Use the X-Git-Tag: php-4.3.0RC1~216 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=78e2e69b23a6811f148f68fcabe41dedc9e29005;p=php Instead of checking whether realpath exists based on OS. Use the HAVE_REALPATH define, which is set if realpath() is avaliable. This patch also resolves bug #18868. --- diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index 86cc3fc724..12c35e1ced 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -41,7 +41,7 @@ #include "tsrm_nw.h" #endif -#ifdef __BEOS__ +#ifndef HAVE_REALPATH #define realpath(x,y) strcpy(y,x) #endif diff --git a/TSRM/tsrm_virtual_cwd.h b/TSRM/tsrm_virtual_cwd.h index 18452304fd..2465d81b6d 100644 --- a/TSRM/tsrm_virtual_cwd.h +++ b/TSRM/tsrm_virtual_cwd.h @@ -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) diff --git a/ext/standard/file.c b/ext/standard/file.c index 048c723f7a..e08c3c0ee3 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -115,10 +115,6 @@ php_file_globals file_globals; #include #endif -#ifdef __BEOS__ -#define realpath(x,y) strcpy(y,x) -#endif - /* }}} */ /* {{{ ZTS-stuff / Globals / Prototypes */ diff --git a/main/safe_mode.c b/main/safe_mode.c index 6a0f733eb5..fe19761ae8 100644 --- a/main/safe_mode.c +++ b/main/safe_mode.c @@ -31,10 +31,6 @@ #include "SAPI.h" #include "php_globals.h" -#ifdef __BEOS__ -#define realpath(x,y) strcpy(y,x) -#endif - /* * php_checkuid *