From dfcf05a5d070823ade84ffba0e9784cdfe6d54b0 Mon Sep 17 00:00:00 2001 From: Yohei Ueda Date: Tue, 25 Nov 2014 20:49:01 +0900 Subject: [PATCH] Use termios via CGO only on Linux Signed-off-by: Yohei Ueda --- pkg/term/{term_cgo.go => tc_linux_cgo.go} | 2 +- pkg/term/{term_nocgo.go => tc_other.go} | 3 ++- pkg/term/termios_darwin.go | 2 -- pkg/term/termios_freebsd.go | 2 -- 4 files changed, 3 insertions(+), 6 deletions(-) rename pkg/term/{term_cgo.go => tc_linux_cgo.go} (97%) rename pkg/term/{term_nocgo.go => tc_other.go} (90%) diff --git a/pkg/term/term_cgo.go b/pkg/term/tc_linux_cgo.go similarity index 97% rename from pkg/term/term_cgo.go rename to pkg/term/tc_linux_cgo.go index ddf080cf9..ae9516c99 100644 --- a/pkg/term/term_cgo.go +++ b/pkg/term/tc_linux_cgo.go @@ -1,4 +1,4 @@ -// +build !windows,cgo +// +build linux,cgo package term diff --git a/pkg/term/term_nocgo.go b/pkg/term/tc_other.go similarity index 90% rename from pkg/term/term_nocgo.go rename to pkg/term/tc_other.go index c211c3992..266039bac 100644 --- a/pkg/term/term_nocgo.go +++ b/pkg/term/tc_other.go @@ -1,4 +1,5 @@ -// +build !windows,!cgo +// +build !windows +// +build !linux !cgo package term diff --git a/pkg/term/termios_darwin.go b/pkg/term/termios_darwin.go index 2640e8b93..11cd70d10 100644 --- a/pkg/term/termios_darwin.go +++ b/pkg/term/termios_darwin.go @@ -1,5 +1,3 @@ -// +build !cgo - package term import ( diff --git a/pkg/term/termios_freebsd.go b/pkg/term/termios_freebsd.go index 969beda23..ed3659572 100644 --- a/pkg/term/termios_freebsd.go +++ b/pkg/term/termios_freebsd.go @@ -1,5 +1,3 @@ -// +build !cgo - package term import (