diff --git a/builtin.c b/builtin.c index 5a73752be..37e21f369 100644 --- a/builtin.c +++ b/builtin.c @@ -2317,7 +2317,7 @@ static void make_first( job_t *j ) static int builtin_fg( wchar_t **argv ) { job_t *j; - + if( argv[1] == 0 ) { /* diff --git a/common.c b/common.c index a8b51fc53..0b48e3aac 100644 --- a/common.c +++ b/common.c @@ -45,8 +45,11 @@ parts of fish. #include #endif +#if HAVE_TERM_H #include - +#elif HAVE_NCURSES_TERM_H +#include +#endif #include "util.h" #include "wutil.h" diff --git a/env.c b/env.c index e00c7b5a8..926759b75 100644 --- a/env.c +++ b/env.c @@ -25,7 +25,12 @@ #include #endif +#if HAVE_TERM_H #include +#elif HAVE_NCURSES_TERM_H +#include +#endif + #include #include "util.h" diff --git a/env_universal.c b/env_universal.c index bee57dc23..5344ad733 100644 --- a/env_universal.c +++ b/env_universal.c @@ -11,12 +11,19 @@ #include #include #include + #if HAVE_NCURSES_H #include #else #include #endif + +#if HAVE_TERM_H #include +#elif HAVE_NCURSES_TERM_H +#include +#endif + #include #include "util.h" diff --git a/fish_pager.c b/fish_pager.c index 6669a04e0..75a23ac9e 100644 --- a/fish_pager.c +++ b/fish_pager.c @@ -27,7 +27,12 @@ #include #endif +#if HAVE_TERM_H #include +#elif HAVE_NCURSES_TERM_H +#include +#endif + #include #include "util.h" diff --git a/input.c b/input.c index 8da2fa626..e522dc76a 100644 --- a/input.c +++ b/input.c @@ -32,7 +32,12 @@ implementation in fish is as of yet incomplete. #include #endif +#if HAVE_TERM_H #include +#elif HAVE_NCURSES_TERM_H +#include +#endif + #include #include #include diff --git a/input_common.c b/input_common.c index 48deb97c5..1ad692237 100644 --- a/input_common.c +++ b/input_common.c @@ -12,6 +12,7 @@ Implementation file for the low level input library #include #include + #include "util.h" #include "common.h" #include "wutil.h" diff --git a/io.c b/io.c index 65b4112fb..661f424f6 100644 --- a/io.c +++ b/io.c @@ -25,7 +25,11 @@ Utilities for io redirection. #include #endif +#if HAVE_TERM_H #include +#elif HAVE_NCURSES_TERM_H +#include +#endif #include "util.h" #include "wutil.h" diff --git a/output.c b/output.c index 4578acb58..a148e9263 100644 --- a/output.c +++ b/output.c @@ -26,7 +26,12 @@ #include #endif +#if HAVE_TERM_H #include +#elif HAVE_NCURSES_TERM_H +#include +#endif + #include #include #include diff --git a/proc.c b/proc.c index 3536d56d8..4bc234bdf 100644 --- a/proc.c +++ b/proc.c @@ -36,7 +36,11 @@ Some of the code in this file is based on code from the Glibc manual. #include #endif +#if HAVE_TERM_H #include +#elif HAVE_NCURSES_TERM_H +#include +#endif #include "util.h" #include "wutil.h" diff --git a/reader.c b/reader.c index 04ac371c2..8f51280dc 100644 --- a/reader.c +++ b/reader.c @@ -45,7 +45,12 @@ commence. #include #endif +#if HAVE_TERM_H #include +#elif HAVE_NCURSES_TERM_H +#include +#endif + #include #include #include diff --git a/set_color.c b/set_color.c index 1a5c0b49d..0e723a027 100644 --- a/set_color.c +++ b/set_color.c @@ -14,12 +14,16 @@ #include #endif - #if HAVE_TERMIO_H #include #endif +#if HAVE_TERM_H #include +#elif HAVE_NCURSES_TERM_H +#include +#endif + #include #ifdef HAVE_GETOPT_H