summaryrefslogtreecommitdiff
path: root/tests/testlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testlib.c')
-rw-r--r--tests/testlib.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/tests/testlib.c b/tests/testlib.c
index aa38cf1..95c9c0a 100644
--- a/tests/testlib.c
+++ b/tests/testlib.c
@@ -23,17 +23,11 @@
#include <stdarg.h>
#include <string.h>
#include <errno.h>
-#if !defined(_WIN32_WCE)
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#endif
-#if defined(_WIN32_WCE)
-// No support for selective redirection of STDOUT on WinCE.
-#define DISABLE_STDOUT_REDIRECTION
-#define STDOUT_FILENO 1
-#elif defined(_WIN32)
+#if defined(_WIN32)
#include <io.h>
#define dup _dup
#define dup2 _dup2
@@ -79,7 +73,6 @@ static void print_usage(int argc, char ** argv)
static void cleanup_test_output(libusb_testlib_ctx * ctx)
{
-#ifndef DISABLE_STDOUT_REDIRECTION
if (!ctx->verbose) {
if (ctx->old_stdout != INVALID_FD) {
IGNORE_RETVAL(dup2(ctx->old_stdout, STDOUT_FILENO));
@@ -98,7 +91,6 @@ static void cleanup_test_output(libusb_testlib_ctx * ctx)
ctx->output_file = stdout;
}
}
-#endif
}
/**
@@ -107,7 +99,6 @@ static void cleanup_test_output(libusb_testlib_ctx * ctx)
*/
static int setup_test_output(libusb_testlib_ctx * ctx)
{
-#ifndef DISABLE_STDOUT_REDIRECTION
/* Stop output to stdout and stderr from being displayed if using non-verbose output */
if (!ctx->verbose) {
/* Keep a copy of STDOUT and STDERR */
@@ -145,7 +136,6 @@ static int setup_test_output(libusb_testlib_ctx * ctx)
return 1;
}
}
-#endif
return 0;
}