Skip to content

Commit 8efec79

Browse files
committed
- 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
1 parent e61005f commit 8efec79

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

TSRM/tsrm_virtual_cwd.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,18 @@ CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len){
277277
}
278278
/* }}} */
279279

280+
CWD_API int php_sys_stat(const char *path, struct stat *buf) /* {{{ */
281+
{
282+
return php_sys_stat_ex(path, buf, 0);
283+
}
284+
/* }}} */
285+
286+
CWD_API int php_sys_lstat(const char *path, struct stat *buf) /* {{{ */
287+
{
288+
return php_sys_stat_ex(path, buf, 1);
289+
}
290+
/* }}} */
291+
280292
CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat) /* {{{ */
281293
{
282294
WIN32_FILE_ATTRIBUTE_DATA data;

TSRM/tsrm_virtual_cwd.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ typedef unsigned short mode_t;
131131

132132
#ifdef TSRM_WIN32
133133
CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat);
134-
# define php_sys_stat(path, buf) php_sys_stat_ex(path, buf, 0)
135-
# define php_sys_lstat(path, buf) php_sys_stat_ex(path, buf, 1)
134+
CWD_API int php_sys_stat(const char *path, struct stat *buf);
135+
CWD_API int php_sys_lstat(const char *path, struct stat *buf);
136136
CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len);
137137
#else
138138
# define php_sys_stat stat

0 commit comments

Comments
 (0)