From: Antony Dovgal Date: Tue, 5 Jun 2007 12:02:38 +0000 (+0000) Subject: no readlink() on windows X-Git-Tag: BEFORE_IMPORT_OF_MYSQLND~521 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d7f7c97e43483dd4504e59e2b09f7bffd89bbf7e;p=php no readlink() on windows --- diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index f7e33b869d..9711fb35f0 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -981,7 +981,11 @@ SPL_METHOD(SplFileInfo, getLinkTarget) link = intern->file_name.s; } - ret = readlink(link, buff, MAXPATHLEN-1); +#ifdef HAVE_SYMLINK + ret = readlink(intern->file_name, buff, MAXPATHLEN-1); +#else + ret = -1; /* always fail if not implemented */ +#endif if (ret == -1) { zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Unable to read link %R, error: %s", intern->file_name_type, intern->file_name, strerror(errno));