diff options
-rw-r--r-- | auto.def | 5 | ||||
-rw-r--r-- | jim-file.c | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -247,11 +247,14 @@ if {[cc-check-function-in-lib socket socket]} { } cc-check-functions ualarm lstat fork system select execvpe -cc-check-functions geteuid mkstemp realpath isatty +cc-check-functions geteuid mkstemp isatty cc-check-functions regcomp waitpid sigaction sys_signame sys_siglist isascii cc-check-functions syslog opendir readlink sleep usleep pipe getaddrinfo utimes cc-check-functions shutdown socketpair link symlink fsync dup umask cc-check-functions localtime gmtime strptime clock_gettime +if {![cc-check-functions realpath]} { + cc-check-functions _fullpath +} cc-with {-includes math.h} { cc-check-decls isinf isnan @@ -77,6 +77,8 @@ #if defined(__MINGW32__) || defined(__MSYS__) || defined(_MSC_VER) #define ISWINDOWS 1 +/* Even if we have symlink it isn't compatible enought to use */ +#undef HAVE_SYMLINK #else #define ISWINDOWS 0 #endif @@ -376,7 +378,7 @@ static int file_cmd_tail(Jim_Interp *interp, int argc, Jim_Obj *const *argv) static char *JimRealPath(const char *restrict path, char *restrict resolved_path, size_t len) { -#if ISWINDOWS +#if defined(HAVE__FULLPATH) return _fullpath(resolved_path, path, len); #elif defined(HAVE_REALPATH) return realpath(path, resolved_path); |