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

syscall: missing syscall.Winsize for both linux and darwin #3316

Closed
nsf opened this issue Mar 14, 2012 · 12 comments
Closed

syscall: missing syscall.Winsize for both linux and darwin #3316

nsf opened this issue Mar 14, 2012 · 12 comments

Comments

@nsf
Copy link

nsf commented Mar 14, 2012

Just a simple complaint. Since linux's syscall package has Termios struct, is there a
reason why it doesn't exist on darwin as well (or other OSes with similar terminal
mechanics)?

Another issue is ioctl's TIOCGWINSZ which uses 'struct winsize', I was thinking if
Termios struct is defined, why can't we define Winsize as well?
@dsymonds
Copy link
Contributor

Comment 1:

syscall is inherently system-dependent. If a particular piece isn't there for a
platform, chances are someone motivated just hasn't done it yet.

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@alberts
Copy link
Contributor

alberts commented Mar 14, 2012

Comment 2:

In the mean time, maintaining your own syscall-type package is quite easy with a script
like this:
#!/bin/bash
set -xe
GOARCH=386 go tool cgo -godefs types_linux.go |gofmt -s >ztypes_linux_386.go
GOARCH=amd64 go tool cgo -godefs types_linux.go |gofmt -s >ztypes_linux_amd64.go
See types_linux.go in the current syscall package for the rest of the idea.

@fsouza
Copy link
Contributor

fsouza commented Mar 14, 2012

Comment 3:

I have a CL for Termios support on Mac OS and FreeBSD, but I'm waiting for Go 1 to send
the CL.

@gopherbot
Copy link

Comment 4 by issac.trotts:

franciscossouza, did you ever send your CL? Any chance you could post the patch here?

@fsouza
Copy link
Contributor

fsouza commented Apr 28, 2012

Comment 5:

https://golang.org/cl/6063053/

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 6:

Labels changed: added go1.1maybe.

@davecheney
Copy link
Contributor

Comment 7:

http://code.google.com/p/go/source/detail?r=b0f36fc20ab2 added Termios for darwin.

@robpike
Copy link
Contributor

robpike commented Mar 7, 2013

Comment 8:

Labels changed: removed go1.1maybe.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 9:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 10:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 11:

Labels changed: added repo-main.

@tklauser
Copy link
Member

The syscall package is locked down, but the Winsize type and the Ioctl{Get,Set}Winsize functions have been added to the x/sys/unix package, thus closing.

@golang golang locked and limited conversation to collaborators Nov 22, 2018
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

9 participants