diff libinterp/corefcn/sysdep.cc @ 21910:4d723ba06b4a

provide wrappers for some unistd.h functions * liboctave/wrappers/unistd-wrappers.c, liboctave/wrappers/unistd-wrappers.h: New files. * liboctave/wrappers/module.mk: Update. * gl2ps-print.cc, oct-hist.cc, oct-procbuf.cc, oct-tex-lexer.in.ll, sysdep.cc, octave.cc, parse-tree/lex.ll, file-ops.cc, lo-sysdep.cc, oct-env.cc, oct-syscalls.cc, cmd-edit.cc, kpse.cc: Use wrappers instead of calling unistd.h functions directly.
author John W. Eaton <jwe@octave.org>
date Tue, 14 Jun 2016 18:10:04 -0400
parents 00f1249f2483
children baeffde5c87d
line wrap: on
line diff
--- a/libinterp/corefcn/sysdep.cc	Tue Jun 14 16:31:34 2016 -0400
+++ b/libinterp/corefcn/sysdep.cc	Tue Jun 14 18:10:04 2016 -0400
@@ -33,9 +33,6 @@
 #include <iostream>
 #include <string>
 
-#include <sys/types.h>
-#include <unistd.h>
-
 #if defined (HAVE_TERMIOS_H)
 #  include <termios.h>
 #elif defined (HAVE_TERMIO_H)
@@ -71,6 +68,7 @@
 #include "mach-info.h"
 #include "oct-env.h"
 #include "quit.h"
+#include "unistd-wrappers.h"
 #include "unsetenv-wrapper.h"
 
 #include "Cell.h"
@@ -354,7 +352,7 @@
   static bool curr_on = false;
 
   int tty_fd = STDIN_FILENO;
-  if (! gnulib::isatty (tty_fd))
+  if (! octave_isatty_wrapper (tty_fd))
     {
       if (interactive && ! forced_interactive)
         error ("stdin is not a tty!");