From: Eli Zaretskii Date: Sat, 4 Jul 2009 11:33:33 +0000 (+0000) Subject: (func_realpath) [!HAVE_REALPATH]: Require the file to exist, as X-Git-Tag: 3.82~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8fd23cc83ecfe4b8b0cce884bb3573fa5e9f0e0;p=thirdparty%2Fmake.git (func_realpath) [!HAVE_REALPATH]: Require the file to exist, as realpath(3) does where it's supported. --- diff --git a/function.c b/function.c index bb2f116f..c7e1d4fe 100644 --- a/function.c +++ b/function.c @@ -1998,6 +1998,9 @@ func_realpath (char *o, char **argv, const char *funcname UNUSED) const char *path = 0; int doneany = 0; unsigned int len = 0; +#ifndef HAVE_REALPATH + struct stat st; +#endif PATH_VAR (in); PATH_VAR (out); @@ -2012,7 +2015,7 @@ func_realpath (char *o, char **argv, const char *funcname UNUSED) #ifdef HAVE_REALPATH realpath (in, out) #else - abspath (in, out) + abspath (in, out) && stat (out, &st) == 0 #endif ) {