summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2010-11-04 01:16:20 +0000
committerPierre Joye <pajoye@php.net>2010-11-04 01:16:20 +0000
commit8efec79ffe98deb39abbe9b6806eb9a17d69f86f (patch)
tree77cea567beeb82bcc38bcd4d17d4d782560a8c62
parente61005f7127191cc5b8a503cf6b54383f33a4b7b (diff)
downloadphp-git-8efec79ffe98deb39abbe9b6806eb9a17d69f86f.tar.gz
- 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
-rw-r--r--TSRM/tsrm_virtual_cwd.c12
-rw-r--r--TSRM/tsrm_virtual_cwd.h4
2 files changed, 14 insertions, 2 deletions
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c
index f93639e69c..a48333c3e2 100644
--- a/TSRM/tsrm_virtual_cwd.c
+++ b/TSRM/tsrm_virtual_cwd.c
@@ -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;
diff --git a/TSRM/tsrm_virtual_cwd.h b/TSRM/tsrm_virtual_cwd.h
index d75e2394a9..cfa8a88142 100644
--- a/TSRM/tsrm_virtual_cwd.h
+++ b/TSRM/tsrm_virtual_cwd.h
@@ -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