summaryrefslogtreecommitdiff
path: root/tests/libtest/first.c
diff options
context:
space:
mode:
authorAlessandro Ghedini <alessandro@ghedini.me>2014-03-26 10:35:02 +0100
committerAlessandro Ghedini <alessandro@ghedini.me>2014-03-26 10:35:02 +0100
commit406f619a33e3b0e01cc04e8e77a90ee93b229602 (patch)
treeeac2653e6f8ffa6f1e495ef087ca3fb341fb9cce /tests/libtest/first.c
parentc930db776b4046d2977e64c52779ea2402ac2d24 (diff)
Imported Upstream version 7.36.0
Diffstat (limited to 'tests/libtest/first.c')
-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 253acb21..9ab7dc75 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();
/*