And make vtls_scache use HAVE_REALPATH
Fixes #16209
Reported-by: Andrew Kirillov
Closes #16225
check_function_exists("setrlimit" HAVE_SETRLIMIT)
if(NOT WIN32)
+ check_function_exists("realpath" HAVE_REALPATH)
check_function_exists("sched_yield" HAVE_SCHED_YIELD)
check_symbol_exists("strcasecmp" "string.h" HAVE_STRCASECMP)
check_symbol_exists("stricmp" "string.h" HAVE_STRICMP)
])
if test "$curl_cv_native_windows" != 'yes'; then
- AC_CHECK_FUNCS([sched_yield])
+ AC_CHECK_FUNCS([\
+ sched_yield \
+ realpath \
+ ])
CURL_CHECK_FUNC_STRCASECMP
CURL_CHECK_FUNC_STRCMPI
CURL_CHECK_FUNC_STRICMP
/* If you have poll */
#cmakedefine HAVE_POLL 1
+/* If you have realpath */
+#cmakedefine HAVE_REALPATH 1
+
/* Define to 1 if you have the <poll.h> header file. */
#cmakedefine HAVE_POLL_H 1
char abspath[_MAX_PATH];
if(_fullpath(abspath, path, _MAX_PATH))
return Curl_dyn_addf(buf, ":%s-%s", name, abspath);
-#else
+#elif defined(HAVE_REALPATH)
if(path[0] != '/') {
char *abspath = realpath(path, NULL);
if(abspath) {