cvs: /php4/ext/standard filestat.c
| From: | Sam Ruby | Date: | Wed, 15 Mar 2000 11:52:37 +0000 |
| Subject: | cvs: /php4/ext/standard filestat.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-12159@lists.php.net to get a copy of this message | ||
rubys Wed Mar 15 03:52:37 2000 EDT
Modified files:
/php4/ext/standard filestat.c
Log:
Emulate user/group/other on Windows
Index: php4/ext/standard/filestat.c
diff -u php4/ext/standard/filestat.c:1.27 php4/ext/standard/filestat.c:1.28
--- php4/ext/standard/filestat.c:1.27 Tue Mar 14 12:20:43 2000
+++ php4/ext/standard/filestat.c Wed Mar 15 03:52:07 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filestat.c,v 1.27 2000/03/14 20:20:43 hholzgra Exp $ */
+/* $Id: filestat.c,v 1.28 2000/03/15 11:52:07 rubys Exp $ */
#include "php.h"
#include "safe_mode.h"
@@ -83,6 +83,24 @@
#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
PHP_RINIT_FUNCTION(filestat)
{