Add autoconf support for isStandardOutAConsole ().
authorBrian Gaeke <gaeke@uiuc.edu>
Fri, 2 Apr 2004 21:26:04 +0000 (21:26 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Fri, 2 Apr 2004 21:26:04 +0000 (21:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12638 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/SystemUtils.cpp

index 07811d891c512eb063fd152a0b35af868fe5a2ea..dafbf98da8392d3d73232dee507373f10f5e3ce5 100644 (file)
@@ -18,6 +18,7 @@
 #include "Config/fcntl.h"
 #include "Config/sys/wait.h"
 #include "Config/unistd.h"
+#include "Config/config.h"
 #include <algorithm>
 #include <fstream>
 #include <iostream>
@@ -47,8 +48,11 @@ bool llvm::isExecutableFile(const std::string &ExeFileName) {
 /// isStandardOutAConsole - Return true if we can tell that the standard output
 /// stream goes to a terminal window or console.
 bool llvm::isStandardOutAConsole() {
-  // FIXME: if we don't have isatty, just return false.
+#if HAVE_ISATTY
   return isatty(1);
+#endif
+  // If we don't have isatty, just return false.
+  return false;
 }