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: linux/*: missing termios constants #6355

gopherbot opened this issue Sep 10, 2013 · 5 comments

syscall: linux/*: missing termios constants #6355

gopherbot opened this issue Sep 10, 2013 · 5 comments


Copy link

by Drago.Ivanov:

syscall package for Linux, does not include defines for:
it is included in the following go files:
syscall/zerrors_netbsd_amd64.go:1250:   TCIOFLUSH                         = 0x3
syscall/zerrors_freebsd_amd64.go:1297:  TCIOFLUSH                         = 0x3
syscall/zerrors_netbsd_386.go:1260:     TCIOFLUSH                         = 0x3
syscall/zerrors_darwin_amd64.go:1008:   TCIOFLUSH                         = 0x3
syscall/zerrors_netbsd_arm.go:1249:     TCIOFLUSH                         = 0x3
syscall/zerrors_freebsd_arm.go:1303:    TCIOFLUSH                         = 0x3
syscall/zerrors_freebsd_386.go:1297:    TCIOFLUSH                         = 0x3
syscall/zerrors_openbsd_amd64.go:1166:  TCIOFLUSH                         = 0x3
syscall/zerrors_darwin_386.go:1008:     TCIOFLUSH                         = 0x3
syscall/zerrors_openbsd_386.go:1160:    TCIOFLUSH                         = 0x3

But not on my target plaftorm: syscall/zerrors_linux_amd64.go

TCIOFLUSH is defined in:
/usr/include/asm-generic/termbits.h:192:#define      TCIOFLUSH       2                  
/usr/include/bits/termios.h:210:#define      TCIOFLUSH       2                          
/usr/include/term.h:123:#define TCIOFLUSH 2

tcflush() glibc function uses syscall named TCFLSH, which is defined in:
/usr/include/asm-generic/ioctls.h:29:#define TCFLSH          0x540B
I think it is supposed to be defined in syscall pkg too.

Which compiler are you using (5g, 6g, 8g, gccgo)?

Which operating system are you using?

Which version are you using?  (run 'go version')
go version devel +bea6199b09ea Tue Apr 30 17:47:39 2013 -0700 linux/amd64

I think there is bug somewhere(probably in termios) that prevents generating the
definitions above.
Copy link

Comment 1:

Link to discussion:
Marking as Go1.2Maybe, others may adjust the priority or tags at a later point.
If someone chooses to work on this I would as that a short test is added to pkg/syscall
that checks the constants are defined. This test would constitute the minimum set of
values expected to be present.

Labels changed: added priority-later, go1.2maybe, removed priority-triage.

Status changed to Accepted.

Copy link

Comment 2:

The place for a test would be pkg/syscall/consistency_unix_test.go.

Copy link

Comment 3:

Owner changed to @davecheney.

Status changed to Started.

Copy link

Comment 4:

Labels changed: added os-linux.

Copy link

Comment 5:

This issue was closed by revision bd9cd6e.

Status changed to Fixed.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2maybe label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

4 participants