aboutsummaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/libbb.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 4197a5e83..c1d4d11c1 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1976,11 +1976,10 @@ enum {
1976 */ 1976 */
1977int64_t read_key(int fd, char *buffer, int timeout) FAST_FUNC; 1977int64_t read_key(int fd, char *buffer, int timeout) FAST_FUNC;
1978#if ENABLE_PLATFORM_MINGW32 1978#if ENABLE_PLATFORM_MINGW32
1979#define safe_read_key(f, b, t) read_key(f, b, t) 1979int64_t unix_read_key(int fd, char *buffer, int timeout) FAST_FUNC;
1980#else 1980#endif
1981/* This version loops on EINTR: */ 1981/* This version loops on EINTR: */
1982int64_t safe_read_key(int fd, char *buffer, int timeout) FAST_FUNC; 1982int64_t safe_read_key(int fd, char *buffer, int timeout) FAST_FUNC;
1983#endif
1984void read_key_ungets(char *buffer, const char *str, unsigned len) FAST_FUNC; 1983void read_key_ungets(char *buffer, const char *str, unsigned len) FAST_FUNC;
1985 1984
1986 1985