Skip to content

Commit

Permalink
syscall: regenerate z-files for openbsd
Browse files Browse the repository at this point in the history
This CL restores dropped constants not supported in OpenBSD 5.5
and tris to keep the promise of API compatibility.

Update golang#7049

LGTM=jsing, bradfitz, rsc
R=rsc, jsing, robert.hencke, minux.ma, bradfitz, iant
CC=golang-codereviews
https://golang.org/cl/96970043
  • Loading branch information
cixtor committed May 15, 2014
1 parent b2d1a2b commit 40e7f64
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/pkg/syscall/mkerrors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,26 @@ includes_OpenBSD='
#include <net/bpf.h>
#include <net/if.h>
#include <net/if_types.h>
#include <net/if_var.h>
#include <net/route.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/ip_mroute.h>
#include <netinet/if_ether.h>
#include <net/if_bridge.h>
// We keep some constants not supported in OpenBSD 5.5 and beyond for
// the promise of compatibility.
#define EMUL_ENABLED 0x1
#define EMUL_NATIVE 0x2
#define IPV6_FAITH 0x1d
#define IPV6_OPTIONS 0x1
#define IPV6_RTHDR_STRICT 0x1
#define IPV6_SOCKOPT_RESERVED1 0x3
#define SIOCGIFGENERIC 0xc020693a
#define SIOCSIFGENERIC 0x80206939
#define WALTSIG 0x4
'

includes_SunOS='
Expand Down
9 changes: 9 additions & 0 deletions src/pkg/syscall/zerrors_openbsd_386.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ const (
ECHONL = 0x10
ECHOPRT = 0x20
EMT_TAGOVF = 0x1
EMUL_ENABLED = 0x1
EMUL_NATIVE = 0x2
ENDRUNDISC = 0x9
ETHERMIN = 0x2e
ETHERMTU = 0x5dc
Expand Down Expand Up @@ -442,6 +444,7 @@ const (
IEXTEN = 0x400
IFAN_ARRIVAL = 0x0
IFAN_DEPARTURE = 0x1
IFA_ROUTE = 0x1
IFF_ALLMULTI = 0x200
IFF_BROADCAST = 0x2
IFF_CANTCHANGE = 0x8e52
Expand Down Expand Up @@ -756,6 +759,7 @@ const (
IPV6_DSTOPTS = 0x32
IPV6_ESP_NETWORK_LEVEL = 0x37
IPV6_ESP_TRANS_LEVEL = 0x36
IPV6_FAITH = 0x1d
IPV6_FLOWINFO_MASK = 0xffffff0f
IPV6_FLOWLABEL_MASK = 0xffff0f00
IPV6_FRAGTTL = 0x78
Expand All @@ -772,6 +776,7 @@ const (
IPV6_MULTICAST_IF = 0x9
IPV6_MULTICAST_LOOP = 0xb
IPV6_NEXTHOP = 0x30
IPV6_OPTIONS = 0x1
IPV6_PATHMTU = 0x2c
IPV6_PIPEX = 0x3f
IPV6_PKTINFO = 0x2e
Expand All @@ -791,7 +796,9 @@ const (
IPV6_RTHDR = 0x33
IPV6_RTHDRDSTOPTS = 0x23
IPV6_RTHDR_LOOSE = 0x0
IPV6_RTHDR_STRICT = 0x1
IPV6_RTHDR_TYPE_0 = 0x0
IPV6_SOCKOPT_RESERVED1 = 0x3
IPV6_TCLASS = 0x3d
IPV6_UNICAST_HOPS = 0x4
IPV6_USE_MIN_MTU = 0x2a
Expand Down Expand Up @@ -1108,6 +1115,7 @@ const (
SIOCGIFDSTADDR = 0xc0206922
SIOCGIFFLAGS = 0xc0206911
SIOCGIFGATTR = 0xc024698b
SIOCGIFGENERIC = 0xc020693a
SIOCGIFGMEMB = 0xc024698a
SIOCGIFGROUP = 0xc0246988
SIOCGIFHARDMTU = 0xc02069a5
Expand Down Expand Up @@ -1147,6 +1155,7 @@ const (
SIOCSIFDSTADDR = 0x8020690e
SIOCSIFFLAGS = 0x80206910
SIOCSIFGATTR = 0x8024698c
SIOCSIFGENERIC = 0x80206939
SIOCSIFLLADDR = 0x8020691f
SIOCSIFMEDIA = 0xc0206935
SIOCSIFMETRIC = 0x80206918
Expand Down
9 changes: 9 additions & 0 deletions src/pkg/syscall/zerrors_openbsd_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ const (
ECHONL = 0x10
ECHOPRT = 0x20
EMT_TAGOVF = 0x1
EMUL_ENABLED = 0x1
EMUL_NATIVE = 0x2
ENDRUNDISC = 0x9
ETHERMIN = 0x2e
ETHERMTU = 0x5dc
Expand Down Expand Up @@ -442,6 +444,7 @@ const (
IEXTEN = 0x400
IFAN_ARRIVAL = 0x0
IFAN_DEPARTURE = 0x1
IFA_ROUTE = 0x1
IFF_ALLMULTI = 0x200
IFF_BROADCAST = 0x2
IFF_CANTCHANGE = 0x8e52
Expand Down Expand Up @@ -756,6 +759,7 @@ const (
IPV6_DSTOPTS = 0x32
IPV6_ESP_NETWORK_LEVEL = 0x37
IPV6_ESP_TRANS_LEVEL = 0x36
IPV6_FAITH = 0x1d
IPV6_FLOWINFO_MASK = 0xffffff0f
IPV6_FLOWLABEL_MASK = 0xffff0f00
IPV6_FRAGTTL = 0x78
Expand All @@ -772,6 +776,7 @@ const (
IPV6_MULTICAST_IF = 0x9
IPV6_MULTICAST_LOOP = 0xb
IPV6_NEXTHOP = 0x30
IPV6_OPTIONS = 0x1
IPV6_PATHMTU = 0x2c
IPV6_PIPEX = 0x3f
IPV6_PKTINFO = 0x2e
Expand All @@ -791,7 +796,9 @@ const (
IPV6_RTHDR = 0x33
IPV6_RTHDRDSTOPTS = 0x23
IPV6_RTHDR_LOOSE = 0x0
IPV6_RTHDR_STRICT = 0x1
IPV6_RTHDR_TYPE_0 = 0x0
IPV6_SOCKOPT_RESERVED1 = 0x3
IPV6_TCLASS = 0x3d
IPV6_UNICAST_HOPS = 0x4
IPV6_USE_MIN_MTU = 0x2a
Expand Down Expand Up @@ -1107,6 +1114,7 @@ const (
SIOCGIFDSTADDR = 0xc0206922
SIOCGIFFLAGS = 0xc0206911
SIOCGIFGATTR = 0xc028698b
SIOCGIFGENERIC = 0xc020693a
SIOCGIFGMEMB = 0xc028698a
SIOCGIFGROUP = 0xc0286988
SIOCGIFHARDMTU = 0xc02069a5
Expand Down Expand Up @@ -1146,6 +1154,7 @@ const (
SIOCSIFDSTADDR = 0x8020690e
SIOCSIFFLAGS = 0x80206910
SIOCSIFGATTR = 0x8028698c
SIOCSIFGENERIC = 0x80206939
SIOCSIFLLADDR = 0x8020691f
SIOCSIFMEDIA = 0xc0206935
SIOCSIFMETRIC = 0x80206918
Expand Down

0 comments on commit 40e7f64

Please sign in to comment.