mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
further cleanups with S_IF* macros generalized declarations
This commit is contained in:
parent
cfadcfc734
commit
c444c4172f
8 changed files with 11 additions and 31 deletions
|
@ -89,14 +89,6 @@ cwd_state main_cwd_state; /* True global */
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef S_ISDIR
|
|
||||||
#define S_ISDIR(mode) ((mode) & _S_IFDIR)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef S_ISREG
|
|
||||||
#define S_ISREG(mode) ((mode) & _S_IFREG)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef TSRM_WIN32
|
#ifdef TSRM_WIN32
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
#define tsrm_strtok_r(a,b,c) _tcstok((a),(b))
|
#define tsrm_strtok_r(a,b,c) _tcstok((a),(b))
|
||||||
|
|
|
@ -337,6 +337,15 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Global stat declarations */
|
||||||
|
#ifndef _S_IFDIR
|
||||||
|
#define _S_IFDIR S_IFDIR
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _S_IFREG
|
||||||
|
#define _S_IFREG S_IFREG
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef S_ISDIR
|
#ifndef S_ISDIR
|
||||||
#define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR)
|
#define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR)
|
||||||
#endif
|
#endif
|
||||||
|
@ -349,6 +358,8 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(void);
|
||||||
#define S_ISLNK(mode) (((mode)&S_IFMT) == S_IFLNK)
|
#define S_ISLNK(mode) (((mode)&S_IFMT) == S_IFLNK)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef S_IXROOT
|
||||||
#define S_IXROOT ( S_IXUSR | S_IXGRP | S_IXOTH )
|
#define S_IXROOT ( S_IXUSR | S_IXGRP | S_IXOTH )
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* VIRTUAL_CWD_H */
|
#endif /* VIRTUAL_CWD_H */
|
||||||
|
|
|
@ -39,10 +39,6 @@
|
||||||
#include "fopen_wrappers.h" /* needed for is_url */
|
#include "fopen_wrappers.h" /* needed for is_url */
|
||||||
#include "Zend/zend_exceptions.h"
|
#include "Zend/zend_exceptions.h"
|
||||||
|
|
||||||
#ifndef _S_IFDIR
|
|
||||||
# define _S_IFDIR S_IFDIR
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* {{{ macros and type definitions */
|
/* {{{ macros and type definitions */
|
||||||
typedef struct _php_fileinfo {
|
typedef struct _php_fileinfo {
|
||||||
zend_long options;
|
zend_long options;
|
||||||
|
|
|
@ -53,10 +53,6 @@
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef S_ISREG
|
|
||||||
#define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#elif defined(NETWARE) && defined(USE_WINSOCK)
|
#elif defined(NETWARE) && defined(USE_WINSOCK)
|
||||||
|
|
|
@ -114,10 +114,6 @@
|
||||||
#endif
|
#endif
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
#ifndef S_ISREG
|
|
||||||
#define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
PHPAPI int (*php_register_internal_extensions_func)(void) = php_register_internal_extensions;
|
PHPAPI int (*php_register_internal_extensions_func)(void) = php_register_internal_extensions;
|
||||||
|
|
||||||
#ifndef ZTS
|
#ifndef ZTS
|
||||||
|
|
|
@ -37,10 +37,6 @@
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef S_ISREG
|
|
||||||
#define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
#define TRANSLATE_SLASHES_LOWER(path) \
|
#define TRANSLATE_SLASHES_LOWER(path) \
|
||||||
{ \
|
{ \
|
||||||
|
|
|
@ -55,10 +55,6 @@
|
||||||
# define EWOULDBLOCK WSAEWOULDBLOCK
|
# define EWOULDBLOCK WSAEWOULDBLOCK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef S_ISREG
|
|
||||||
#define S_ISREG(mode) (((mode)&S_IFMT) == S_IFREG)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* This functions transforms the first char to 'w' if it's not 'r', 'a' or 'w'
|
/* This functions transforms the first char to 'w' if it's not 'r', 'a' or 'w'
|
||||||
* and strips any subsequent chars except '+' and 'b'.
|
* and strips any subsequent chars except '+' and 'b'.
|
||||||
* Use this to sanitize stream->mode if you call e.g. fdopen, fopencookie or
|
* Use this to sanitize stream->mode if you call e.g. fdopen, fopencookie or
|
||||||
|
|
|
@ -40,9 +40,6 @@ typedef char * caddr_t;
|
||||||
#define S_IFIFO _IFIFO
|
#define S_IFIFO _IFIFO
|
||||||
#define S_IFBLK _IFBLK
|
#define S_IFBLK _IFBLK
|
||||||
#define S_IFLNK _IFLNK
|
#define S_IFLNK _IFLNK
|
||||||
#ifndef S_ISREG
|
|
||||||
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
|
|
||||||
#endif
|
|
||||||
#define chdir(path) _chdir(path)
|
#define chdir(path) _chdir(path)
|
||||||
#define mkdir(a, b) _mkdir(a)
|
#define mkdir(a, b) _mkdir(a)
|
||||||
#define rmdir(a) _rmdir(a)
|
#define rmdir(a) _rmdir(a)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue