From 99ebf82c3aa8fe2ee807b4f64c526a4ea316cde1 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 4 Jan 2015 20:25:25 -0500 Subject: [PATCH] Context - Eliminated fileno() by using unistd.h STDOUT_FILENO. This is because fileno() is not visible with '--std=c++11'. --- src/Context.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Context.cpp b/src/Context.cpp index 0126a0801..7e70fb0c6 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -505,7 +504,7 @@ bool Context::color () use_color = config.getBoolean ("color"); // Only tty's support color. - if (! isatty (fileno (stdout))) + if (! isatty (STDOUT_FILENO)) { // No ioctl. config.set ("detection", "off"); @@ -771,7 +770,7 @@ void Context::clear () // this output?'. void Context::updateXtermTitle () { - if (config.getBoolean ("xterm.title") && isatty (fileno (stdout))) + if (config.getBoolean ("xterm.title") && isatty (STDOUT_FILENO)) { std::string command = cli.getCommand (); std::string title;