Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
llgoi is a Go REPL based on llgo irgen and the LLVM JIT. It supports expressions, statements, most declarations and imports, including binary imports from the standard library and source imports from $GOPATH. Differential Revision: http://reviews.llvm.org/D6957 llvm-svn: 226097
- Loading branch information
Showing
15 changed files
with
701 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//===- isatty_posix.go - isatty implementation for POSIX ------------------===// | ||
// | ||
// The LLVM Compiler Infrastructure | ||
// | ||
// This file is distributed under the University of Illinois Open Source | ||
// License. See LICENSE.TXT for details. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// Implements isatty for POSIX systems. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
package main | ||
|
||
// +build !windows | ||
|
||
/* | ||
#include <unistd.h> | ||
*/ | ||
import "C" | ||
|
||
import ( | ||
"os" | ||
) | ||
|
||
func isatty(file *os.File) bool { | ||
return C.isatty(C.int(file.Fd())) != 0 | ||
} |
Oops, something went wrong.