summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/SystemUtils.cpp
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2004-04-02 21:26:04 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2004-04-02 21:26:04 +0000
commit5ade501501dad76982f543d7d5560ebf7cbf97e0 (patch)
tree2a23a8e84e1e758604ac89c1fb8b87fe11640e07 /llvm/lib/Support/SystemUtils.cpp
parent0d372ee6967f713c49272ca9a41db9c6a70f4aa7 (diff)
downloadbcm5719-llvm-5ade501501dad76982f543d7d5560ebf7cbf97e0.tar.gz
bcm5719-llvm-5ade501501dad76982f543d7d5560ebf7cbf97e0.zip
Add autoconf support for isStandardOutAConsole ().
llvm-svn: 12638
Diffstat (limited to 'llvm/lib/Support/SystemUtils.cpp')
-rw-r--r--llvm/lib/Support/SystemUtils.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Support/SystemUtils.cpp b/llvm/lib/Support/SystemUtils.cpp
index 07811d891c5..dafbf98da83 100644
--- a/llvm/lib/Support/SystemUtils.cpp
+++ b/llvm/lib/Support/SystemUtils.cpp
@@ -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;
}
OpenPOWER on IntegriCloud