From c678b6562de511daffbc3efd235894bc5a9af27d Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Mon, 17 Sep 2018 12:58:38 +0900 Subject: [PATCH] Fix up some libs to work better under linux --- lib/rline.c | 3 +++ lib/rline_exp.c | 1 + 2 files changed, 4 insertions(+) diff --git a/lib/rline.c b/lib/rline.c index 048c3798..02ffb288 100644 --- a/lib/rline.c +++ b/lib/rline.c @@ -9,9 +9,12 @@ * complex line editing than what the raw tty interface supplies. */ +#define _POSIX_C_SOURCE 1 +#define _XOPEN_SOURCE 500 #include #include +#include #include #include diff --git a/lib/rline_exp.c b/lib/rline_exp.c index cefa00b0..8c5c5bfc 100644 --- a/lib/rline_exp.c +++ b/lib/rline_exp.c @@ -1279,6 +1279,7 @@ static void get_initial_termios(void) { static void set_unbuffered(void) { struct termios new = old; new.c_lflag &= (~ICANON & ~ECHO); + new.c_cc[VINTR] = 0; tcsetattr(STDOUT_FILENO, TCSAFLUSH, &new); }