# HG changeset patch # User John W. Eaton # Date 1325871589 18000 # Node ID ebcb0f83698f976ef91de40e1cc09cb1c29bf451 # Parent bb5790c5e713056b3da3241129a0543cd4a21ec5 use gnulib::isatty * bootstrap.conf (gnulib_modules): Include isatty in the list. * sysdep.cc (raw_mode): Use gnulib::isatty. * octave.cc (octave_main): Likewise. * lex.ll: Define isatty to use gnulib namespace. diff -r bb5790c5e713 -r ebcb0f83698f build-aux/bootstrap.conf --- a/build-aux/bootstrap.conf Fri Jan 06 12:09:02 2012 -0500 +++ b/build-aux/bootstrap.conf Fri Jan 06 12:39:49 2012 -0500 @@ -36,6 +36,7 @@ getopt-gnu gettimeofday glob + isatty link lstat mkdir diff -r bb5790c5e713 -r ebcb0f83698f src/octave.cc --- a/src/octave.cc Fri Jan 06 12:09:02 2012 -0500 +++ b/src/octave.cc Fri Jan 06 12:39:49 2012 -0500 @@ -834,9 +834,10 @@ // If stdin is not a tty, then we are reading commands from a pipe or // a redirected file. - stdin_is_tty = isatty (fileno (stdin)); + stdin_is_tty = gnulib::isatty (fileno (stdin)); - interactive = (! embedded && stdin_is_tty && isatty (fileno (stdout))); + interactive = (! embedded && stdin_is_tty + && gnulib::isatty (fileno (stdout))); if (! interactive && ! forced_line_editing) line_editing = false; diff -r bb5790c5e713 -r ebcb0f83698f src/sysdep.cc --- a/src/sysdep.cc Fri Jan 06 12:09:02 2012 -0500 +++ b/src/sysdep.cc Fri Jan 06 12:39:49 2012 -0500 @@ -288,7 +288,7 @@ static bool curr_on = false; int tty_fd = STDIN_FILENO; - if (! isatty (tty_fd)) + if (! gnulib::isatty (tty_fd)) { if (interactive) error ("stdin is not a tty!");