From e60103766a3c328d0cb89339e7ff2bf1aa3baf51 Mon Sep 17 00:00:00 2001 From: nick black Date: Sat, 31 Jul 2021 07:46:33 -0400 Subject: [PATCH] define block_on_input() on windows --- src/lib/input.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib/input.c b/src/lib/input.c index b64a07334..288fe5c8e 100644 --- a/src/lib/input.c +++ b/src/lib/input.c @@ -390,7 +390,6 @@ handle_getc(ncinputlayer* nc, int kpress, ncinput* ni, int leftmargin, int topma // blocks up through ts (infinite with NULL ts), returning number of events // (0 on timeout) or -1 on error/interruption. -#ifndef __MINGW64__ static int block_on_input(int fd, const struct timespec* ts){ struct pollfd pfd = { @@ -411,6 +410,7 @@ block_on_input(int fd, const struct timespec* ts){ while((events = poll(&pfd, 1, timeoutms)) < 0){ // FIXME smask? #else #ifdef __MINGW64__ + // FIXME i doubt this even works while((events = WSAPoll(&pfd, 1, 0)) < 0){ #else while((events = ppoll(&pfd, 1, ts, &smask)) < 0){ @@ -428,9 +428,6 @@ block_on_input(int fd, const struct timespec* ts){ } return events; } -#else -// FIXME windows block_on_input() -#endif static inline size_t input_queue_space(const ncinputlayer* nc){