Use the TCGETS/TCSETS and TIOCGETA/TIOCSETA definitions from x/sys/unix
instead of manually declaring them or using the corresponding
definitions from syscall.
Change-Id: I37c2c8124d251eb47467b4184a7cc39781775f11
Reviewed-on: https://go-review.googlesource.com/51690
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Currently the ssh/terminal package cannot be compiled under gccgo. Even though gccgo may be running on linux, its syscall package is slightly different and does not contain these constants.
This proposal resolves the issue by declaring the two constants locally, as we've done for the *BSDs.
LGTM=hanwen, iant
R=hanwen, iant, gobot
CC=golang-codereviews
https://golang.org/cl/101670043
terminal contains a number of utility functions that are currently only
implemented for Linux. Darwin uses different named constants for
getting and setting the terminal state so this change splits them off
as constants and defines them for each arch.
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/7286043