aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libtest')
-rw-r--r--tests/libtest/first.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/libtest/first.c b/tests/libtest/first.c
index 253acb21d..9ab7dc758 100644
--- a/tests/libtest/first.c
+++ b/tests/libtest/first.c
@@ -22,7 +22,15 @@
#include "test.h"
#ifdef HAVE_LOCALE_H
-#include <locale.h> /* for setlocale() */
+# include <locale.h> /* for setlocale() */
+#endif
+
+#ifdef HAVE_IO_H
+# include <io.h> /* for setmode() */
+#endif
+
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h> /* for setmode() */
#endif
#ifdef CURLDEBUG
@@ -98,6 +106,14 @@ int main(int argc, char **argv)
{
char *URL;
+#ifdef O_BINARY
+# ifdef __HIGHC__
+ _setmode(stdout, O_BINARY);
+# else
+ setmode(fileno(stdout), O_BINARY);
+# endif
+#endif
+
memory_tracking_init();
/*