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
Milestone

Comments

@nsf
Copy link

@nsf 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
Member

@dsymonds dsymonds commented Mar 14, 2012

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 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 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

@gopherbot gopherbot commented Apr 28, 2012

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 fsouza commented Apr 28, 2012

@rsc
Copy link
Contributor

@rsc rsc commented Sep 12, 2012

Comment 6:

Labels changed: added go1.1maybe.

@davecheney
Copy link
Contributor

@davecheney davecheney commented Oct 12, 2012

Comment 7:

http://code.google.com/p/go/source/detail?r=b0f36fc20ab2 added Termios for darwin.
@robpike
Copy link
Contributor

@robpike robpike commented Mar 7, 2013

Comment 8:

Labels changed: removed go1.1maybe.

@rsc
Copy link
Contributor

@rsc rsc commented Nov 27, 2013

Comment 9:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

@rsc rsc commented Dec 4, 2013

Comment 10:

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

@rsc
Copy link
Contributor

@rsc rsc commented Dec 4, 2013

Comment 11:

Labels changed: added repo-main.

@tklauser
Copy link
Member

@tklauser tklauser commented Nov 22, 2017

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.

@tklauser tklauser closed this Nov 22, 2017
@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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
9 participants
You can’t perform that action at this time.