summaryrefslogtreecommitdiff
path: root/main/php_virtual_cwd.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2000-03-16 19:10:01 +0000
committerAndi Gutmans <andi@php.net>2000-03-16 19:10:01 +0000
commit14f76028aa716d781e6770ad800595c721b2e449 (patch)
tree11c224abec75f9e6efc30b03ffa0b35568f1fe61 /main/php_virtual_cwd.c
parentc46d1e340279d03ec8972c2cff0ef893af01051d (diff)
downloadphp-git-14f76028aa716d781e6770ad800595c721b2e449.tar.gz
- php_is_dir_ok() should work on Windows now.
Diffstat (limited to 'main/php_virtual_cwd.c')
-rw-r--r--main/php_virtual_cwd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/main/php_virtual_cwd.c b/main/php_virtual_cwd.c
index 1086fa05d8..974caf567b 100644
--- a/main/php_virtual_cwd.c
+++ b/main/php_virtual_cwd.c
@@ -72,7 +72,10 @@ typedef struct _cwd_state {
uint cwd_length;
} cwd_state;
-#ifndef PHP_WIN32
+#ifndef S_ISDIR
+#define S_ISDIR(mode) ((mode) & _S_IFDIR)
+#endif
+
static int php_is_dir_ok(const cwd_state *state)
{
struct stat buf;
@@ -82,7 +85,7 @@ static int php_is_dir_ok(const cwd_state *state)
return (1);
}
-#endif
+
char *virtual_getcwd(cwd_state *state, uint *length)