From: Anatol Belski Date: Mon, 25 May 2015 11:17:35 +0000 (+0200) Subject: move some stat declarations into zend_virtual_cwd.h X-Git-Tag: PRE_PHP7_NSAPI_REMOVAL~32^2~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d1731b2fb5a2ed96fffddd9d3d5c3d1ae502eba;p=php move some stat declarations into zend_virtual_cwd.h more cleanup to go --- diff --git a/Zend/zend_virtual_cwd.h b/Zend/zend_virtual_cwd.h index d7d1067828..7e066f0016 100644 --- a/Zend/zend_virtual_cwd.h +++ b/Zend/zend_virtual_cwd.h @@ -337,4 +337,18 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(void); #endif +#ifndef S_ISDIR +#define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR) +#endif + +#ifndef S_ISREG +#define S_ISREG(mode) (((mode)&S_IFMT) == S_IFREG) +#endif + +#ifndef S_ISLNK +#define S_ISLNK(mode) (((mode)&S_IFMT) == S_IFLNK) +#endif + +#define S_IXROOT ( S_IXUSR | S_IXGRP | S_IXOTH ) + #endif /* VIRTUAL_CWD_H */ diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index ffcba3598d..764b490b9a 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -85,18 +85,6 @@ #include "basic_functions.h" #include "php_filestat.h" -#ifndef S_ISDIR -#define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR) -#endif -#ifndef S_ISREG -#define S_ISREG(mode) (((mode)&S_IFMT) == S_IFREG) -#endif -#ifndef S_ISLNK -#define S_ISLNK(mode) (((mode)&S_IFMT) == S_IFLNK) -#endif - -#define S_IXROOT ( S_IXUSR | S_IXGRP | S_IXOTH ) - PHP_RINIT_FUNCTION(filestat) /* {{{ */ { BG(CurrentStatFile)=NULL;