summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattn/go-isatty/isatty_linux.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2019-03-02 13:04:28 +0100
committerGitHub <noreply@github.com>2019-03-02 13:04:28 +0100
commitdf3fdc26a01a20c3568b824f4f15f9b56a2f3db3 (patch)
tree053e3caf197063f94af386e60c67e4bef69a7863 /vendor/github.com/mattn/go-isatty/isatty_linux.go
parentaf00c34aaccb3521b8dbf0bd8876a5b38d5d42f4 (diff)
downloadmatterbridge-msglm-df3fdc26a01a20c3568b824f4f15f9b56a2f3db3.tar.gz
matterbridge-msglm-df3fdc26a01a20c3568b824f4f15f9b56a2f3db3.tar.bz2
matterbridge-msglm-df3fdc26a01a20c3568b824f4f15f9b56a2f3db3.zip
Use whatsapp forks (#750)
Diffstat (limited to 'vendor/github.com/mattn/go-isatty/isatty_linux.go')
-rw-r--r--vendor/github.com/mattn/go-isatty/isatty_linux.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/vendor/github.com/mattn/go-isatty/isatty_linux.go b/vendor/github.com/mattn/go-isatty/isatty_linux.go
index 7384cf99..e004038e 100644
--- a/vendor/github.com/mattn/go-isatty/isatty_linux.go
+++ b/vendor/github.com/mattn/go-isatty/isatty_linux.go
@@ -1,18 +1,18 @@
// +build linux
-// +build !appengine,!ppc64,!ppc64le
+// +build !appengine
package isatty
-import (
- "syscall"
- "unsafe"
-)
-
-const ioctlReadTermios = syscall.TCGETS
+import "golang.org/x/sys/unix"
// 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
+ _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS)
+ return err == nil
+}
+
+// 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
}