From fb15ffbdaa1ecb2a45bae9b27137d070cab4f819 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 Upstream-commit: dfcf05a5d070823ade84ffba0e9784cdfe6d54b0 Component: engine --- components/engine/pkg/term/{term_cgo.go => tc_linux_cgo.go} | 2 +- components/engine/pkg/term/{term_nocgo.go => tc_other.go} | 3 ++- components/engine/pkg/term/termios_darwin.go | 2 -- components/engine/pkg/term/termios_freebsd.go | 2 -- 4 files changed, 3 insertions(+), 6 deletions(-) rename components/engine/pkg/term/{term_cgo.go => tc_linux_cgo.go} (97%) rename components/engine/pkg/term/{term_nocgo.go => tc_other.go} (90%) diff --git a/components/engine/pkg/term/term_cgo.go b/components/engine/pkg/term/tc_linux_cgo.go similarity index 97% rename from components/engine/pkg/term/term_cgo.go rename to components/engine/pkg/term/tc_linux_cgo.go index ddf080cf93..ae9516c99c 100644 --- a/components/engine/pkg/term/term_cgo.go +++ b/components/engine/pkg/term/tc_linux_cgo.go @@ -1,4 +1,4 @@ -// +build !windows,cgo +// +build linux,cgo package term diff --git a/components/engine/pkg/term/term_nocgo.go b/components/engine/pkg/term/tc_other.go similarity index 90% rename from components/engine/pkg/term/term_nocgo.go rename to components/engine/pkg/term/tc_other.go index c211c3992d..266039bac3 100644 --- a/components/engine/pkg/term/term_nocgo.go +++ b/components/engine/pkg/term/tc_other.go @@ -1,4 +1,5 @@ -// +build !windows,!cgo +// +build !windows +// +build !linux !cgo package term diff --git a/components/engine/pkg/term/termios_darwin.go b/components/engine/pkg/term/termios_darwin.go index 2640e8b935..11cd70d10b 100644 --- a/components/engine/pkg/term/termios_darwin.go +++ b/components/engine/pkg/term/termios_darwin.go @@ -1,5 +1,3 @@ -// +build !cgo - package term import ( diff --git a/components/engine/pkg/term/termios_freebsd.go b/components/engine/pkg/term/termios_freebsd.go index 969beda239..ed3659572c 100644 --- a/components/engine/pkg/term/termios_freebsd.go +++ b/components/engine/pkg/term/termios_freebsd.go @@ -1,5 +1,3 @@ -// +build !cgo - package term import (