From 4cd21deebca0e75b77d62d8d748aa66453532d9b Mon Sep 17 00:00:00 2001 From: stijn Date: Sat, 3 May 2014 10:26:04 +0200 Subject: mingw: Add implementation of realpath() The mingw port used _fullpath() until now, but the behaviour is not exactly the same as realpath()'s on unix; major difference being that it doesn't return an error for non-existing files, which would bypass main's error checking and bail out without any error message. Also realpath() will return forward slashes only since main() relies on that. --- unix/main.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'unix') diff --git a/unix/main.c b/unix/main.c index e677ff65d..c001bc810 100644 --- a/unix/main.c +++ b/unix/main.c @@ -394,11 +394,7 @@ int main(int argc, char **argv) { return usage(argv); } } else { -#ifdef __MINGW32__ - char *basedir = _fullpath(NULL, argv[a], _MAX_PATH); -#else char *basedir = realpath(argv[a], NULL); -#endif if (basedir == NULL) { fprintf(stderr, "%s: can't open file '%s': [Errno %d] ", argv[0], argv[1], errno); perror(""); -- cgit v1.2.3