Add new function, autoconf support required tho
authorChris Lattner <sabre@nondot.org>
Fri, 2 Apr 2004 05:04:03 +0000 (05:04 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 2 Apr 2004 05:04:03 +0000 (05:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12600 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/SystemUtils.cpp

index 4ca3e990de477831cc8a88d61aadf212bf947efa..07811d891c512eb063fd152a0b35af868fe5a2ea 100644 (file)
@@ -44,6 +44,14 @@ bool llvm::isExecutableFile(const std::string &ExeFileName) {
     return Buf.st_mode & S_IXOTH;
 }
 
+/// 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.
+  return isatty(1);
+}
+
+
 /// FindExecutable - Find a named executable, giving the argv[0] of program
 /// being executed. This allows us to find another LLVM tool if it is built
 /// into the same directory, but that directory is neither the current