aboutsummaryrefslogtreecommitdiff
path: root/libbb/read_key.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-03-05 12:33:01 +0000
committerRon Yorston <rmy@pobox.com>2023-03-05 12:33:01 +0000
commit9aef4d4d298987437e33bf25bcddd16175148d45 (patch)
tree172ada18bda876ec9041c74a3199d8a475e0fb3b /libbb/read_key.c
parent4020c7689c3f640e8a56edd1a1491403112857ec (diff)
downloadbusybox-w32-9aef4d4d298987437e33bf25bcddd16175148d45.tar.gz
busybox-w32-9aef4d4d298987437e33bf25bcddd16175148d45.tar.bz2
busybox-w32-9aef4d4d298987437e33bf25bcddd16175148d45.zip
win32: enable Unix read_key() for virtual terminal
Until now busybox-w32 has used a native Windows implementation of read_key(). Build the upstream Unix implementation and use it instead of the native version when virtual terminal input mode is enabled.
Diffstat (limited to 'libbb/read_key.c')
-rw-r--r--libbb/read_key.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libbb/read_key.c b/libbb/read_key.c
index cf8ed411e..c34770028 100644
--- a/libbb/read_key.c
+++ b/libbb/read_key.c
@@ -9,7 +9,11 @@
9 */ 9 */
10#include "libbb.h" 10#include "libbb.h"
11 11
12#if ENABLE_PLATFORM_MINGW32
13int64_t FAST_FUNC unix_read_key(int fd, char *buffer, int timeout)
14#else
12int64_t FAST_FUNC read_key(int fd, char *buffer, int timeout) 15int64_t FAST_FUNC read_key(int fd, char *buffer, int timeout)
16#endif
13{ 17{
14 struct pollfd pfd; 18 struct pollfd pfd;
15 const char *seq; 19 const char *seq;