aboutsummaryrefslogtreecommitdiffstats
path: root/common/iobuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/iobuf.c')
-rw-r--r--common/iobuf.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/common/iobuf.c b/common/iobuf.c
index 441c69467..7360febdb 100644
--- a/common/iobuf.c
+++ b/common/iobuf.c
@@ -52,8 +52,13 @@
#ifdef HAVE_W32_SYSTEM
-# define FD_FOR_STDIN (GetStdHandle (STD_INPUT_HANDLE))
-# define FD_FOR_STDOUT (GetStdHandle (STD_OUTPUT_HANDLE))
+# ifdef HAVE_W32CE_SYSTEM
+# define FD_FOR_STDIN (es_fileno (es_stdin))
+# define FD_FOR_STDOUT (es_fileno (es_stdout))
+# else
+# define FD_FOR_STDIN (GetStdHandle (STD_INPUT_HANDLE))
+# define FD_FOR_STDOUT (GetStdHandle (STD_OUTPUT_HANDLE))
+# endif
#else /*!HAVE_W32_SYSTEM*/
# define FD_FOR_STDIN (0)
# define FD_FOR_STDOUT (1)
@@ -2361,7 +2366,7 @@ iobuf_read_line (iobuf_t a, byte ** addr_of_buffer,
static int
translate_file_handle (int fd, int for_write)
{
-#ifdef HAVE_W32_SYSTEM
+#if defined(HAVE_W32_SYSTEM) && !defined (HAVE_W32CE_SYSTEM)
{
int x;