Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
gopherbot opened this issue Sep 17, 2014 · 4 comments
Closed

Comments

@gopherbot
Copy link

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.
@ianlancetaylor
Copy link
Contributor

Comment 1:

New additions to the syscall package are now being done in the go.sys package instead
(https://docs.google.com/a/golang.org/document/d/1QXzI9I1pOfZPujQzxhyRy6EeHYTQitKKjHfpq0zpxZs/edit).
 Redirecting this issue accordingly.

Labels changed: added repo-sys, release-none.

@bradfitz bradfitz removed the new label Dec 18, 2014
@mikioh mikioh changed the title go.sys: termios.h CRTSCTS flag missing from UNIX syscall package unix: termios.h CRTSCTS flag missing from UNIX syscall package Jan 7, 2015
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc removed the release-none label Apr 10, 2015
@rsc rsc changed the title unix: termios.h CRTSCTS flag missing from UNIX syscall package x/sys/unix: termios.h CRTSCTS flag missing from UNIX syscall package Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the repo-sys label Apr 14, 2015
@safetydank
Copy link

This constant appears to be in package "unix"

@ianlancetaylor
Copy link
Contributor

Looks like it's currently there for GNU/Linux, but not yet for any other OS.

@gopherbot
Copy link
Author

Change https://golang.org/cl/103355 mentions this issue: unix: add CRTSCTS on netbsd and openbsd

@golang golang locked and limited conversation to collaborators Mar 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants