summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Beulshausen <dbeu@php.net>2001-06-11 14:46:44 +0000
committerDaniel Beulshausen <dbeu@php.net>2001-06-11 14:46:44 +0000
commitcae817a5200d54fde7237a6fa0c20ba9b40c2664 (patch)
treefc3d72014f2ba3f40891c2628f03ca83b09f986c
parent8b15d97a314060a864cbd458f25e8faea2577144 (diff)
downloadphp-git-cae817a5200d54fde7237a6fa0c20ba9b40c2664.tar.gz
move some constants to a more appropriate place
-rw-r--r--ext/standard/filestat.c20
-rw-r--r--ext/standard/php_filestat.h17
2 files changed, 17 insertions, 20 deletions
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index 2eb07d8f20..3141d871f0 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -72,7 +72,6 @@
#endif
#include "basic_functions.h"
-
#include "php_filestat.h"
#ifndef S_ISDIR
@@ -85,25 +84,6 @@
#define S_ISLNK(mode) (((mode)&S_IFMT) == S_IFLNK)
#endif
-#ifdef PHP_WIN32
-#define S_IRUSR S_IREAD
-#define S_IWUSR S_IWRITE
-#define S_IXUSR S_IEXEC
-
-#define S_IRGRP S_IREAD
-#define S_IWGRP S_IWRITE
-#define S_IXGRP S_IEXEC
-
-#define S_IROTH S_IREAD
-#define S_IWOTH S_IWRITE
-#define S_IXOTH S_IEXEC
-
-#undef getgid
-#define getgroups(a,b) 0
-#define getgid() 1
-#define getuid() 1
-#endif
-
#define S_IXROOT ( S_IXUSR | S_IXGRP | S_IXOTH )
PHP_RINIT_FUNCTION(filestat)
diff --git a/ext/standard/php_filestat.h b/ext/standard/php_filestat.h
index 348324163f..56f6e1bf52 100644
--- a/ext/standard/php_filestat.h
+++ b/ext/standard/php_filestat.h
@@ -56,4 +56,21 @@ PHP_FUNCTION(clearstatcache);
ZVAL_LONG(name,val); \
name->refcount++;
+#ifdef PHP_WIN32
+#define S_IRUSR S_IREAD
+#define S_IWUSR S_IWRITE
+#define S_IXUSR S_IEXEC
+#define S_IRGRP S_IREAD
+#define S_IWGRP S_IWRITE
+#define S_IXGRP S_IEXEC
+#define S_IROTH S_IREAD
+#define S_IWOTH S_IWRITE
+#define S_IXOTH S_IEXEC
+
+#undef getgid
+#define getgroups(a,b) 0
+#define getgid() 1
+#define getuid() 1
+#endif
+
#endif /* PHP_FILESTAT_H */