Fix up some libs to work better under linux
This commit is contained in:
parent
d1dcc03760
commit
c678b6562d
@ -9,9 +9,12 @@
|
|||||||
* complex line editing than what the raw tty interface supplies.
|
* complex line editing than what the raw tty interface supplies.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define _POSIX_C_SOURCE 1
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
|
||||||
|
@ -1279,6 +1279,7 @@ static void get_initial_termios(void) {
|
|||||||
static void set_unbuffered(void) {
|
static void set_unbuffered(void) {
|
||||||
struct termios new = old;
|
struct termios new = old;
|
||||||
new.c_lflag &= (~ICANON & ~ECHO);
|
new.c_lflag &= (~ICANON & ~ECHO);
|
||||||
|
new.c_cc[VINTR] = 0;
|
||||||
tcsetattr(STDOUT_FILENO, TCSAFLUSH, &new);
|
tcsetattr(STDOUT_FILENO, TCSAFLUSH, &new);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user