From e0b4daf3ad240ecf70af73c13b6ca9b1062a507f Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 14 Sep 2014 16:21:04 +0200 Subject: input: use libwaio for pipe input on Windows Use libwaio to read from pipes (stdin or named pipes) on Windows. This liberates us from nasty issues, such as pipes (as created by most programs) not being possible to read in a non-blocking or event-driven way. Although it would be possible to do that in a somewhat sane way on Vista+, it's still not easy, and on XP it's especially hard. libwaio handles these things for us. Move pipe.c to pipe-unix.c, and remove Windows specific things. Also adjust the input.c code to make this work cleanly. --- wscript | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'wscript') diff --git a/wscript b/wscript index 586f2cddf0..ccf594e32f 100644 --- a/wscript +++ b/wscript @@ -103,6 +103,11 @@ main_dependencies = [ 'name': 'sys-mman-h', 'desc': 'mman.h', 'func': check_statement('sys/mman.h', 'mmap(0, 0, 0, 0, 0, 0)') + }, { + 'name': 'mingw', + 'desc': 'MinGW', + 'deps': [ 'os-win32' ], + 'func': check_statement('stddef.h', 'int x = __MINGW32__') }, { 'name': 'pthreads', 'desc': 'POSIX threads', @@ -159,6 +164,12 @@ iconv support use --disable-iconv.", 'desc': 'w32 priority API', 'deps_any': [ 'os-win32', 'os-cygwin'], 'func': check_true + }, { + 'name': '--waio', + 'desc': 'libwaio for win32', + 'deps': [ 'os-win32', 'mingw' ], + 'func': check_libs(['waio'], + check_statement('waio/waio.h', 'waio_alloc(0, 0, 0, 0)')), }, { 'name': 'videoio', 'desc': 'videoio.h', -- cgit v1.2.3