diff --git a/configure b/configure index 3cfb941d..ac0af0f4 100755 --- a/configure +++ b/configure @@ -2477,6 +2477,7 @@ as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" +as_fn_append ac_header_c_list " sys/termios.h sys_termios_h HAVE_SYS_TERMIOS_H" as_fn_append ac_header_c_list " readline/readline.h readline_readline_h HAVE_READLINE_READLINE_H" as_fn_append ac_header_c_list " readline/history.h readline_history_h HAVE_READLINE_HISTORY_H" @@ -4028,6 +4029,7 @@ fi + # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. diff --git a/configure.ac b/configure.ac index 97e0d9e3..4dbe445f 100644 --- a/configure.ac +++ b/configure.ac @@ -31,7 +31,7 @@ AC_PATH_PROG([PERL], [perl]) dnl Checks for libraries. AC_CHECK_LIB(m, sqrt) AC_CHECK_LIB(readline, readline) -AC_CHECK_HEADERS_ONCE([sys/time.h stdint.h readline/readline.h readline/history.h]) +AC_CHECK_HEADERS_ONCE([sys/time.h sys/termios.h stdint.h readline/readline.h readline/history.h]) dnl Integer sizes AC_CHECK_SIZEOF(unsigned int) diff --git a/src/config.h.in b/src/config.h.in index d1905b27..15dd2c10 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -66,6 +66,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_INOTIFY_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TERMIOS_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H diff --git a/src/funcs.c b/src/funcs.c index 39939a59..fbb0f445 100644 --- a/src/funcs.c +++ b/src/funcs.c @@ -28,6 +28,10 @@ #include #endif +#ifdef HAVE_SYS_TERMIOS_H +#include +#endif + #include #include #include diff --git a/src/init.c b/src/init.c index 5e268ecf..c1719133 100644 --- a/src/init.c +++ b/src/init.c @@ -35,6 +35,11 @@ #include #endif +#ifdef HAVE_SYS_TERMIOS_H +#include +#endif + + #include "types.h" #include "globals.h" #include "protos.h"