Skip to content

x/sys/unix: termios.h CRTSCTS flag missing from UNIX syscall package #8760

@gopherbot

Description

@gopherbot

by smith.winston.101:

Go version 1.3.1.

The syscall package includes a number of constants from termios.h to allow for terminal
handling without needing to use cgo.  For example, see the definitions syscall.CLOCAL
et. al. from types_linux.go (interestingly, some of these definitions for other UNIXes
can be found in zerrors_*_*.go files).

However, the CRTSCTS flag is missing.  It's definition (from linux/termios.h) is a
follows:

# define CRTSCTS  020000000000

This flag is used in the struct termios.c_cflag to indicate that RTS/CTS flow control
should be used.  While it's not part of POSIX, it's present on Linux, Mac OS X, BSD.

Without this definition in the syscall package, hardware flow control can only be enable
via CGO which prohibits cross compilation (unless the constant is hardcoded!).

NOTE: There are a number of other termios related functions such as cfmakeraw() and
isatty() that are also missing from the syscall package.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions