unix windows: mingw32 doesn't have realpath(), use _fullpath() instead.

This commit is contained in:
Paul Sokolovsky 2014-04-20 22:19:14 +03:00
parent 1f2ca1c1f9
commit a196d08dfc
1 changed files with 4 additions and 0 deletions

View File

@ -394,7 +394,11 @@ 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("");