summaryrefslogtreecommitdiff
path: root/TSRM
diff options
context:
space:
mode:
authorAnantha Kesari H Y <hyanantha@php.net>2005-07-07 07:10:50 +0000
committerAnantha Kesari H Y <hyanantha@php.net>2005-07-07 07:10:50 +0000
commit958803655eb54e082547c86ced97606b6202eb7a (patch)
tree79f78ea076ee4ff5796b71157225af934045781d /TSRM
parente61dfb0213ff0b52898238c31994cb8c72e77339 (diff)
downloadphp-git-958803655eb54e082547c86ced97606b6202eb7a.tar.gz
gwtcwd of NetWare LibC gives a cwd with a volume information.
So using getcwdpath which gives with volume information. getcwdpath gives with directory seperator as \ which is against our DEFAULT_SLASH of /. So finding and replacing \ with / -- Kamesh
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/tsrm_virtual_cwd.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c
index a5ec310030..c984f1451e 100644
--- a/TSRM/tsrm_virtual_cwd.c
+++ b/TSRM/tsrm_virtual_cwd.c
@@ -42,6 +42,10 @@
# endif
#endif
+#ifdef NETWARE
+#include <fsio.h>
+#endif
+
#ifndef HAVE_REALPATH
#define realpath(x,y) strcpy(y,x)
#endif
@@ -206,7 +210,20 @@ CWD_API void virtual_cwd_startup(void)
char cwd[MAXPATHLEN];
char *result;
+#ifdef NETWARE
+ result = getcwdpath(cwd, NULL, 1);
+ if(result)
+ {
+ char *c=cwd;
+ while(c = strchr(c, '\\'))
+ {
+ *c='/';
+ ++c;
+ }
+ }
+#else
result = getcwd(cwd, sizeof(cwd));
+#endif
if (!result) {
cwd[0] = '\0';
}