diff options
author | HackyMiner <hackyminer@gmail.com> | 2019-01-03 20:31:20 +0800 |
---|---|---|
committer | Guillaume Ballet <gballet@gmail.com> | 2019-01-03 20:31:20 +0800 |
commit | 1ea5279d5d7cd44ab18d72a2d26f1ad03b8d2b5e (patch) | |
tree | 2c3782496140edc2d5ec8b9bee4deab2d9879dfa | |
parent | 27913dd226e391b5260ab3b66ce7b75610a07ab7 (diff) | |
download | dexon-1ea5279d5d7cd44ab18d72a2d26f1ad03b8d2b5e.tar.gz dexon-1ea5279d5d7cd44ab18d72a2d26f1ad03b8d2b5e.tar.zst dexon-1ea5279d5d7cd44ab18d72a2d26f1ad03b8d2b5e.zip |
vendor: vendor/github.com/mattn/go-isatty - add missing files (reported by mksully22) (#18376)
-rw-r--r-- | vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go | 25 | ||||
-rw-r--r-- | vendor/github.com/mattn/go-isatty/isatty_others.go | 15 |
2 files changed, 40 insertions, 0 deletions
diff --git a/vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go b/vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go new file mode 100644 index 000000000..bb7d3c422 --- /dev/null +++ b/vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go @@ -0,0 +1,25 @@ +// +build linux +// +build ppc64 ppc64le + +package isatty + +import ( + "unsafe" + + syscall "golang.org/x/sys/unix" +) + +const ioctlReadTermios = syscall.TCGETS + +// IsTerminal return true if the file descriptor is terminal. +func IsTerminal(fd uintptr) bool { + var termios syscall.Termios + _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) + return err == 0 +} + +// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 +// terminal. This is also always false on this environment. +func IsCygwinTerminal(fd uintptr) bool { + return false +} diff --git a/vendor/github.com/mattn/go-isatty/isatty_others.go b/vendor/github.com/mattn/go-isatty/isatty_others.go new file mode 100644 index 000000000..f02849c56 --- /dev/null +++ b/vendor/github.com/mattn/go-isatty/isatty_others.go @@ -0,0 +1,15 @@ +// +build appengine js + +package isatty + +// IsTerminal returns true if the file descriptor is terminal which +// is always false on js and appengine classic which is a sandboxed PaaS. +func IsTerminal(fd uintptr) bool { + return false +} + +// IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 +// terminal. This is also always false on this environment. +func IsCygwinTerminal(fd uintptr) bool { + return false +} |