diff options
Diffstat (limited to 'src/serdi.c')
-rw-r--r-- | src/serdi.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/serdi.c b/src/serdi.c index ac4d3178..bc68e591 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -1,6 +1,8 @@ // Copyright 2011-2023 David Robillard <d@drobilla.net> // SPDX-License-Identifier: ISC +#include "console.h" + #include "serd/env.h" #include "serd/error.h" #include "serd/input_stream.h" @@ -15,14 +17,6 @@ #include "serd/world.h" #include "serd/writer.h" -#ifdef _WIN32 -# ifdef _MSC_VER -# define WIN32_LEAN_AND_MEAN -# endif -# include <fcntl.h> -# include <io.h> -#endif - #include <limits.h> #include <stdbool.h> #include <stdio.h> @@ -221,10 +215,8 @@ main(int argc, char** argv) return print_usage(prog, true); } -#ifdef _WIN32 - _setmode(_fileno(stdin), _O_BINARY); - _setmode(_fileno(stdout), _O_BINARY); -#endif + serd_set_stream_utf8_mode(stdin); + serd_set_stream_utf8_mode(stdout); const char* input = argv[a++]; |