changeset 14160:ebcb0f83698f stable

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.
author John W. Eaton <jwe@octave.org>
date Fri, 06 Jan 2012 12:39:49 -0500
parents bb5790c5e713
children f4b5a2f899d3
files build-aux/bootstrap.conf src/octave.cc src/sysdep.cc
diffstat 3 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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;
--- 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!");