From 4d11ca17d0f73f5bd783f45900118295fdfed46b Mon Sep 17 00:00:00 2001 From: Tomofumi Hayashi Date: Sat, 27 Apr 2019 20:38:39 +0900 Subject: barometer: update DMA's vendoring packages Change-Id: I0578b094f1ecdaed20c906be2ba29d51b8089d7c Signed-off-by: Tomofumi Hayashi --- .../vendor/github.com/mattn/go-isatty/.travis.yml | 4 ++++ src/dma/vendor/github.com/mattn/go-isatty/go.mod | 3 +++ src/dma/vendor/github.com/mattn/go-isatty/go.sum | 2 ++ .../github.com/mattn/go-isatty/isatty_android.go | 23 ++++++++++++++++++++++ .../github.com/mattn/go-isatty/isatty_appengine.go | 15 -------------- .../github.com/mattn/go-isatty/isatty_bsd.go | 6 ++++++ .../github.com/mattn/go-isatty/isatty_linux.go | 21 ++++++++++---------- .../mattn/go-isatty/isatty_linux_ppc64x.go | 19 ------------------ .../github.com/mattn/go-isatty/isatty_others.go | 9 +++++++-- .../github.com/mattn/go-isatty/isatty_solaris.go | 6 ++++++ 10 files changed, 62 insertions(+), 46 deletions(-) create mode 100644 src/dma/vendor/github.com/mattn/go-isatty/go.mod create mode 100644 src/dma/vendor/github.com/mattn/go-isatty/go.sum create mode 100644 src/dma/vendor/github.com/mattn/go-isatty/isatty_android.go delete mode 100644 src/dma/vendor/github.com/mattn/go-isatty/isatty_appengine.go delete mode 100644 src/dma/vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go (limited to 'src/dma/vendor/github.com/mattn/go-isatty') diff --git a/src/dma/vendor/github.com/mattn/go-isatty/.travis.yml b/src/dma/vendor/github.com/mattn/go-isatty/.travis.yml index b9f8b239..5597e026 100644 --- a/src/dma/vendor/github.com/mattn/go-isatty/.travis.yml +++ b/src/dma/vendor/github.com/mattn/go-isatty/.travis.yml @@ -2,6 +2,10 @@ language: go go: - tip +os: + - linux + - osx + before_install: - go get github.com/mattn/goveralls - go get golang.org/x/tools/cmd/cover diff --git a/src/dma/vendor/github.com/mattn/go-isatty/go.mod b/src/dma/vendor/github.com/mattn/go-isatty/go.mod new file mode 100644 index 00000000..f310320c --- /dev/null +++ b/src/dma/vendor/github.com/mattn/go-isatty/go.mod @@ -0,0 +1,3 @@ +module github.com/mattn/go-isatty + +require golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 diff --git a/src/dma/vendor/github.com/mattn/go-isatty/go.sum b/src/dma/vendor/github.com/mattn/go-isatty/go.sum new file mode 100644 index 00000000..426c8973 --- /dev/null +++ b/src/dma/vendor/github.com/mattn/go-isatty/go.sum @@ -0,0 +1,2 @@ +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/src/dma/vendor/github.com/mattn/go-isatty/isatty_android.go b/src/dma/vendor/github.com/mattn/go-isatty/isatty_android.go new file mode 100644 index 00000000..d3567cb5 --- /dev/null +++ b/src/dma/vendor/github.com/mattn/go-isatty/isatty_android.go @@ -0,0 +1,23 @@ +// +build android + +package isatty + +import ( + "syscall" + "unsafe" +) + +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/src/dma/vendor/github.com/mattn/go-isatty/isatty_appengine.go b/src/dma/vendor/github.com/mattn/go-isatty/isatty_appengine.go deleted file mode 100644 index 9584a988..00000000 --- a/src/dma/vendor/github.com/mattn/go-isatty/isatty_appengine.go +++ /dev/null @@ -1,15 +0,0 @@ -// +build appengine - -package isatty - -// IsTerminal returns true if the file descriptor is terminal which -// is always false on on 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 -} diff --git a/src/dma/vendor/github.com/mattn/go-isatty/isatty_bsd.go b/src/dma/vendor/github.com/mattn/go-isatty/isatty_bsd.go index 42f2514d..07e93039 100644 --- a/src/dma/vendor/github.com/mattn/go-isatty/isatty_bsd.go +++ b/src/dma/vendor/github.com/mattn/go-isatty/isatty_bsd.go @@ -16,3 +16,9 @@ func IsTerminal(fd uintptr) bool { _, _, 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/src/dma/vendor/github.com/mattn/go-isatty/isatty_linux.go b/src/dma/vendor/github.com/mattn/go-isatty/isatty_linux.go index 7384cf99..4f8af465 100644 --- a/src/dma/vendor/github.com/mattn/go-isatty/isatty_linux.go +++ b/src/dma/vendor/github.com/mattn/go-isatty/isatty_linux.go @@ -1,18 +1,19 @@ // +build linux -// +build !appengine,!ppc64,!ppc64le +// +build !appengine +// +build !android 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 } diff --git a/src/dma/vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go b/src/dma/vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go deleted file mode 100644 index 44e5d213..00000000 --- a/src/dma/vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go +++ /dev/null @@ -1,19 +0,0 @@ -// +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 -} diff --git a/src/dma/vendor/github.com/mattn/go-isatty/isatty_others.go b/src/dma/vendor/github.com/mattn/go-isatty/isatty_others.go index ff4de3d9..f02849c5 100644 --- a/src/dma/vendor/github.com/mattn/go-isatty/isatty_others.go +++ b/src/dma/vendor/github.com/mattn/go-isatty/isatty_others.go @@ -1,8 +1,13 @@ -// +build !windows -// +build !appengine +// +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 { diff --git a/src/dma/vendor/github.com/mattn/go-isatty/isatty_solaris.go b/src/dma/vendor/github.com/mattn/go-isatty/isatty_solaris.go index 1f0c6bf5..bdd5c79a 100644 --- a/src/dma/vendor/github.com/mattn/go-isatty/isatty_solaris.go +++ b/src/dma/vendor/github.com/mattn/go-isatty/isatty_solaris.go @@ -14,3 +14,9 @@ func IsTerminal(fd uintptr) bool { err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio) 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 +} -- cgit 1.2.3-korg