mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Context
- Eliminated fileno() by using unistd.h STDOUT_FILENO. This is because fileno() is not visible with '--std=c++11'.
This commit is contained in:
parent
231e8ca913
commit
99ebf82c3a
1 changed files with 2 additions and 3 deletions
|
@ -30,7 +30,6 @@
|
|||
#include <sstream>
|
||||
#include <algorithm>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue