diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-04-20 22:19:14 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-04-20 22:24:44 +0300 |
commit | a196d08dfc600615e7b3ce3f774ec4de3f0c0b19 (patch) | |
tree | 384af75b439fefddba7851c702c24d0a392e91cb /unix/main.c | |
parent | 1f2ca1c1f9946fa28269526b4f1e16a316cf4b07 (diff) | |
download | micropython-a196d08dfc600615e7b3ce3f774ec4de3f0c0b19.tar.gz micropython-a196d08dfc600615e7b3ce3f774ec4de3f0c0b19.zip |
unix windows: mingw32 doesn't have realpath(), use _fullpath() instead.
Diffstat (limited to 'unix/main.c')
-rw-r--r-- | unix/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/unix/main.c b/unix/main.c index e4536f381c..4c86edeae5 100644 --- a/unix/main.c +++ b/unix/main.c @@ -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(""); |