1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 17:08:14 +02:00

- use php_sys_readlink

This commit is contained in:
Pierre Joye
2010-09-13 09:30:07 +00:00
parent ba5b4afc32
commit d5ca12b03e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1006,7 +1006,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
memcpy(tmp, path, len+1);
if (save && S_ISLNK(st.st_mode)) {
if (++(*ll) > LINK_MAX || (j = readlink(tmp, path, MAXPATHLEN)) < 0) {
if (++(*ll) > LINK_MAX || (j = php_sys_readlink(tmp, path, MAXPATHLEN)) < 0) {
/* too many links or broken symlinks */
tsrm_free_alloca(tmp, use_heap);
return -1;
+1 -1
View File
@@ -67,7 +67,7 @@ PHP_FUNCTION(readlink)
RETURN_FALSE;
}
ret = readlink(link, buff, MAXPATHLEN-1);
ret = php_sys_readlink(link, buff, MAXPATHLEN-1);
if (ret == -1) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno));