]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: add TCIOFLUSH family of constants
authorDave Cheney <dave@cheney.net>
Fri, 13 Sep 2013 05:01:22 +0000 (15:01 +1000)
committerDave Cheney <dave@cheney.net>
Fri, 13 Sep 2013 05:01:22 +0000 (15:01 +1000)
Fixes #6355.

zerrors_linux_{386,amd64,arm}.go were regenerated using mkerrors.sh but I opted to add the three TC.*FLUSH lines by hand to keep the diff smaller and avoid problems with the API checker.

I'll check freebsd and darwin, could I ask for help with net/open bsd.

R=mikioh.mikioh, jsing, minux.ma, bradfitz
CC=golang-dev
https://golang.org/cl/13660043

src/pkg/syscall/consistency_unix_test.go
src/pkg/syscall/mkerrors.sh
src/pkg/syscall/zerrors_linux_386.go
src/pkg/syscall/zerrors_linux_amd64.go
src/pkg/syscall/zerrors_linux_arm.go

index b4664d7c710dd3a2e9543e93782eca4ddf718f6f..73630bc61499fd59457bde13e2cac6d7924af8db 100644 (file)
@@ -23,3 +23,12 @@ func _() {
                _ int = syscall.PRIO_PGRP
        )
 }
+
+// termios functions and constants
+func _() {
+       const (
+               _ int = syscall.TCIFLUSH
+               _ int = syscall.TCIOFLUSH
+               _ int = syscall.TCOFLUSH
+       )
+}
index 44ec781cb6d30ac136d96f37379765b16dfae3ac..20b2b987575c4191543b44278f4034510765ea0e 100755 (executable)
@@ -107,6 +107,7 @@ includes_Linux='
 #include <net/if_arp.h>
 #include <net/route.h>
 #include <netpacket/packet.h>
+#include <termios.h>
 
 #ifndef MSG_FASTOPEN
 #define MSG_FASTOPEN    0x20000000
index 3d1a07a99ba4ea4c65319ec8018f0f0302d68f32..7aa8ff07a7c10d66545d6b58cc4c579487db2345 100644 (file)
@@ -1084,6 +1084,9 @@ const (
        S_IXGRP                          = 0x8
        S_IXOTH                          = 0x1
        S_IXUSR                          = 0x40
+       TCIFLUSH                         = 0x0
+       TCIOFLUSH                        = 0x2
+       TCOFLUSH                         = 0x1
        TCP_CONGESTION                   = 0xd
        TCP_CORK                         = 0x3
        TCP_DEFER_ACCEPT                 = 0x9
index ed175b73c481953804a47dab7ea48bc83f6508de..94d051d8aa6c816a0e0a52b975c2c029f683ff5f 100644 (file)
@@ -1085,6 +1085,9 @@ const (
        S_IXGRP                          = 0x8
        S_IXOTH                          = 0x1
        S_IXUSR                          = 0x40
+       TCIFLUSH                         = 0x0
+       TCIOFLUSH                        = 0x2
+       TCOFLUSH                         = 0x1
        TCP_CONGESTION                   = 0xd
        TCP_CORK                         = 0x3
        TCP_DEFER_ACCEPT                 = 0x9
index f740f04516c6e243f6ae1d7296f2ccbe7a5d2ddc..dcaaef742321b8216962a807d51996648e73b22d 100644 (file)
@@ -1095,6 +1095,9 @@ const (
        S_IXGRP                          = 0x8
        S_IXOTH                          = 0x1
        S_IXUSR                          = 0x40
+       TCIFLUSH                         = 0x0
+       TCIOFLUSH                        = 0x2
+       TCOFLUSH                         = 0x1
        TCP_CONGESTION                   = 0xd
        TCP_CORK                         = 0x3
        TCP_DEFER_ACCEPT                 = 0x9