From 15dcd671be2ea2c21bfdd27f031d5b40debdc73e Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Wed, 22 Jan 2014 10:39:10 -0800 Subject: [PATCH] syscall: add syscall.Termios on dragonfly, openbsd R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/55720043 --- src/pkg/syscall/types_dragonfly.go | 5 +++++ src/pkg/syscall/types_openbsd.go | 5 +++++ src/pkg/syscall/ztypes_dragonfly_386.go | 10 ++++++++++ src/pkg/syscall/ztypes_dragonfly_amd64.go | 10 ++++++++++ src/pkg/syscall/ztypes_openbsd_386.go | 10 ++++++++++ src/pkg/syscall/ztypes_openbsd_amd64.go | 10 ++++++++++ 6 files changed, 50 insertions(+) diff --git a/src/pkg/syscall/types_dragonfly.go b/src/pkg/syscall/types_dragonfly.go index 009b8f045b..baed2911fc 100644 --- a/src/pkg/syscall/types_dragonfly.go +++ b/src/pkg/syscall/types_dragonfly.go @@ -18,6 +18,7 @@ package syscall #include #include #include +#include #include #include #include @@ -239,3 +240,7 @@ type BpfProgram C.struct_bpf_program type BpfInsn C.struct_bpf_insn type BpfHdr C.struct_bpf_hdr + +// Terminal handling + +type Termios C.struct_termios diff --git a/src/pkg/syscall/types_openbsd.go b/src/pkg/syscall/types_openbsd.go index 6fe2af6e0a..e6d1ea7044 100644 --- a/src/pkg/syscall/types_openbsd.go +++ b/src/pkg/syscall/types_openbsd.go @@ -18,6 +18,7 @@ package syscall #include #include #include +#include #include #include #include @@ -237,3 +238,7 @@ type BpfInsn C.struct_bpf_insn type BpfHdr C.struct_bpf_hdr type BpfTimeval C.struct_bpf_timeval + +// Terminal handling + +type Termios C.struct_termios diff --git a/src/pkg/syscall/ztypes_dragonfly_386.go b/src/pkg/syscall/ztypes_dragonfly_386.go index c467d85933..590d88328d 100644 --- a/src/pkg/syscall/ztypes_dragonfly_386.go +++ b/src/pkg/syscall/ztypes_dragonfly_386.go @@ -427,3 +427,13 @@ type BpfHdr struct { Hdrlen uint16 Pad_cgo_0 [2]byte } + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/src/pkg/syscall/ztypes_dragonfly_amd64.go b/src/pkg/syscall/ztypes_dragonfly_amd64.go index b71bf29f4c..a543b7c99a 100644 --- a/src/pkg/syscall/ztypes_dragonfly_amd64.go +++ b/src/pkg/syscall/ztypes_dragonfly_amd64.go @@ -433,3 +433,13 @@ type BpfHdr struct { Hdrlen uint16 Pad_cgo_0 [6]byte } + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/src/pkg/syscall/ztypes_openbsd_386.go b/src/pkg/syscall/ztypes_openbsd_386.go index 5812391a60..2e4d9dd174 100644 --- a/src/pkg/syscall/ztypes_openbsd_386.go +++ b/src/pkg/syscall/ztypes_openbsd_386.go @@ -427,3 +427,13 @@ type BpfTimeval struct { Sec uint32 Usec uint32 } + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed int32 + Ospeed int32 +} diff --git a/src/pkg/syscall/ztypes_openbsd_amd64.go b/src/pkg/syscall/ztypes_openbsd_amd64.go index 611b8ff3cd..f07bc714e9 100644 --- a/src/pkg/syscall/ztypes_openbsd_amd64.go +++ b/src/pkg/syscall/ztypes_openbsd_amd64.go @@ -434,3 +434,13 @@ type BpfTimeval struct { Sec uint32 Usec uint32 } + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed int32 + Ospeed int32 +} -- 2.48.1