Commit 9f10d3fb authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

unix/main: Get rid of perror() which uses stdio.

parent 4120f322
...@@ -515,8 +515,7 @@ int main(int argc, char **argv) { ...@@ -515,8 +515,7 @@ int main(int argc, char **argv) {
char *pathbuf = malloc(PATH_MAX); char *pathbuf = malloc(PATH_MAX);
char *basedir = realpath(argv[a], pathbuf); char *basedir = realpath(argv[a], pathbuf);
if (basedir == NULL) { if (basedir == NULL) {
mp_printf(&mp_stderr_print, "%s: can't open file '%s': [Errno %d] ", argv[0], argv[a], errno); mp_printf(&mp_stderr_print, "%s: can't open file '%s': [Errno %d] %s\n", argv[0], argv[a], errno, strerror(errno));
perror("");
// CPython exits with 2 in such case // CPython exits with 2 in such case
ret = 2; ret = 2;
break; break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment