From cae817a5200d54fde7237a6fa0c20ba9b40c2664 Mon Sep 17 00:00:00 2001 From: Daniel Beulshausen Date: Mon, 11 Jun 2001 14:46:44 +0000 Subject: move some constants to a more appropriate place --- ext/standard/filestat.c | 20 -------------------- ext/standard/php_filestat.h | 17 +++++++++++++++++ 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 */ -- cgit v1.2.1