From c1532556b2ce8a5b340230cb700538b453705535 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 --- term/{term_cgo.go => tc_linux_cgo.go} | 2 +- term/{term_nocgo.go => tc_other.go} | 3 ++- term/termios_darwin.go | 2 -- term/termios_freebsd.go | 2 -- 4 files changed, 3 insertions(+), 6 deletions(-) rename term/{term_cgo.go => tc_linux_cgo.go} (97%) rename term/{term_nocgo.go => tc_other.go} (90%) diff --git a/term/term_cgo.go b/term/tc_linux_cgo.go similarity index 97% rename from term/term_cgo.go rename to term/tc_linux_cgo.go index ddf080c..ae9516c 100644 --- a/term/term_cgo.go +++ b/term/tc_linux_cgo.go @@ -1,4 +1,4 @@ -// +build !windows,cgo +// +build linux,cgo package term diff --git a/term/term_nocgo.go b/term/tc_other.go similarity index 90% rename from term/term_nocgo.go rename to term/tc_other.go index c211c39..266039b 100644 --- a/term/term_nocgo.go +++ b/term/tc_other.go @@ -1,4 +1,5 @@ -// +build !windows,!cgo +// +build !windows +// +build !linux !cgo package term diff --git a/term/termios_darwin.go b/term/termios_darwin.go index 2640e8b..11cd70d 100644 --- a/term/termios_darwin.go +++ b/term/termios_darwin.go @@ -1,5 +1,3 @@ -// +build !cgo - package term import ( diff --git a/term/termios_freebsd.go b/term/termios_freebsd.go index 969beda..ed36595 100644 --- a/term/termios_freebsd.go +++ b/term/termios_freebsd.go @@ -1,5 +1,3 @@ -// +build !cgo - package term import (