mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
- expose php_sys_(l)stat, doing will prevent me to have to provide pecl's builds for <5.3.3 and another set for 5.3.4+. Trunk remains the same, A(B/P)I can be broken there
This commit is contained in:
parent
e61005f712
commit
8efec79ffe
@ -277,6 +277,18 @@ CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len){
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API int php_sys_stat(const char *path, struct stat *buf) /* {{{ */
|
||||
{
|
||||
return php_sys_stat_ex(path, buf, 0);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API int php_sys_lstat(const char *path, struct stat *buf) /* {{{ */
|
||||
{
|
||||
return php_sys_stat_ex(path, buf, 1);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat) /* {{{ */
|
||||
{
|
||||
WIN32_FILE_ATTRIBUTE_DATA data;
|
||||
|
@ -131,8 +131,8 @@ typedef unsigned short mode_t;
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat);
|
||||
# define php_sys_stat(path, buf) php_sys_stat_ex(path, buf, 0)
|
||||
# define php_sys_lstat(path, buf) php_sys_stat_ex(path, buf, 1)
|
||||
CWD_API int php_sys_stat(const char *path, struct stat *buf);
|
||||
CWD_API int php_sys_lstat(const char *path, struct stat *buf);
|
||||
CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len);
|
||||
#else
|
||||
# define php_sys_stat stat
|
||||
|
Loading…
Reference in New Issue
Block a user