Commit 2a47e044 authored by Joel Sing's avatar Joel Sing Committed by Rob Pike

syscall: regenerate z* files for netbsd

Fix mkerrors.sh so that it works on NetBSD.

Remove directory mode bits from types - this already appears in errors.

Regenerate the z* files now that cgo is working.

R=golang-dev, m4dh4tt3r, r
CC=golang-dev
https://golang.org/cl/6201077
parent 99142f55
...@@ -104,6 +104,9 @@ includes_NetBSD=' ...@@ -104,6 +104,9 @@ includes_NetBSD='
#include <netinet/ip.h> #include <netinet/ip.h>
#include <netinet/ip_mroute.h> #include <netinet/ip_mroute.h>
#include <netinet/if_ether.h> #include <netinet/if_ether.h>
// Needed since <sys/param.h> refers to it...
const int schedppq = 1;
' '
includes_OpenBSD=' includes_OpenBSD='
......
...@@ -97,23 +97,6 @@ type _Gid_t C.gid_t ...@@ -97,23 +97,6 @@ type _Gid_t C.gid_t
// Files // Files
const ( // Directory mode bits
S_IFMT = C.S_IFMT
S_IFIFO = C.S_IFIFO
S_IFCHR = C.S_IFCHR
S_IFDIR = C.S_IFDIR
S_IFBLK = C.S_IFBLK
S_IFREG = C.S_IFREG
S_IFLNK = C.S_IFLNK
S_IFSOCK = C.S_IFSOCK
S_ISUID = C.S_ISUID
S_ISGID = C.S_ISGID
S_ISVTX = C.S_ISVTX
S_IRUSR = C.S_IRUSR
S_IWUSR = C.S_IWUSR
S_IXUSR = C.S_IXUSR
)
type Stat_t C.struct_stat type Stat_t C.struct_stat
type Statfs_t C.struct_statfs type Statfs_t C.struct_statfs
......
This diff is collapsed.
This diff is collapsed.
...@@ -19,12 +19,12 @@ type ( ...@@ -19,12 +19,12 @@ type (
) )
type Timespec struct { type Timespec struct {
Sec int32 Sec int64
Nsec int32 Nsec int32
} }
type Timeval struct { type Timeval struct {
Sec int32 Sec int64
Usec int32 Usec int32
} }
...@@ -54,69 +54,27 @@ type Rlimit struct { ...@@ -54,69 +54,27 @@ type Rlimit struct {
type _Gid_t uint32 type _Gid_t uint32
const (
S_IFMT = 0xf000
S_IFIFO = 0x1000
S_IFCHR = 0x2000
S_IFDIR = 0x4000
S_IFBLK = 0x6000
S_IFREG = 0x8000
S_IFLNK = 0xa000
S_IFSOCK = 0xc000
S_ISUID = 0x800
S_ISGID = 0x400
S_ISVTX = 0x200
S_IRUSR = 0x100
S_IWUSR = 0x80
S_IXUSR = 0x40
)
type Stat_t struct { type Stat_t struct {
Dev int32 Dev uint64
Ino uint32 Mode uint32
Mode uint32 Ino uint64
Nlink uint32 Nlink uint32
Uid uint32 Uid uint32
Gid uint32 Gid uint32
Rdev int32 Rdev uint64
Lspare0 int32 Atimespec Timespec
Atim Timespec Mtimespec Timespec
Mtim Timespec Ctimespec Timespec
Ctim Timespec Birthtimespec Timespec
Size int64 Size int64
Blocks int64 Blocks int64
Blksize uint32 Blksize uint32
Flags uint32 Flags uint32
Gen uint32 Gen uint32
Lspare1 int32 Spare [2]uint32
X__st_birthtim Timespec }
Qspare [2]int64
} type Statfs_t [0]byte
type Statfs_t struct {
F_flags uint32
F_bsize uint32
F_iosize uint32
F_blocks uint64
F_bfree uint64
F_bavail int64
F_files uint64
F_ffree uint64
F_favail int64
F_syncwrites uint64
F_syncreads uint64
F_asyncwrites uint64
F_asyncreads uint64
F_fsid Fsid
F_namemax uint32
F_owner uint32
F_ctime uint32
F_spare [3]uint32
F_fstypename [16]int8
F_mntonname [90]int8
F_mntfromname [90]int8
Mount_info [160]byte
}
type Flock_t struct { type Flock_t struct {
Start int64 Start int64
...@@ -127,15 +85,16 @@ type Flock_t struct { ...@@ -127,15 +85,16 @@ type Flock_t struct {
} }
type Dirent struct { type Dirent struct {
Fileno uint64 Fileno uint64
Reclen uint16 Reclen uint16
Namlen uint16 Namlen uint16
Type uint8 Type uint8
Name [512]int8 Name [512]int8
Pad_cgo_0 [3]byte
} }
type Fsid struct { type Fsid struct {
Val [2]int32 X__fsid_val [2]int32
} }
type RawSockaddrInet4 struct { type RawSockaddrInet4 struct {
...@@ -169,7 +128,7 @@ type RawSockaddrDatalink struct { ...@@ -169,7 +128,7 @@ type RawSockaddrDatalink struct {
Nlen uint8 Nlen uint8
Alen uint8 Alen uint8
Slen uint8 Slen uint8
Data [24]int8 Data [12]int8
} }
type RawSockaddr struct { type RawSockaddr struct {
...@@ -209,7 +168,7 @@ type Msghdr struct { ...@@ -209,7 +168,7 @@ type Msghdr struct {
Name *byte Name *byte
Namelen uint32 Namelen uint32
Iov *Iovec Iov *Iovec
Iovlen uint32 Iovlen int32
Control *byte Control *byte
Controllen uint32 Controllen uint32
Flags int32 Flags int32
...@@ -231,7 +190,7 @@ const ( ...@@ -231,7 +190,7 @@ const (
SizeofSockaddrInet6 = 0x1c SizeofSockaddrInet6 = 0x1c
SizeofSockaddrAny = 0x6c SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x20 SizeofSockaddrDatalink = 0x14
SizeofLinger = 0x8 SizeofLinger = 0x8
SizeofIPMreq = 0x8 SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14 SizeofIPv6Mreq = 0x14
...@@ -248,123 +207,106 @@ const ( ...@@ -248,123 +207,106 @@ const (
type Kevent_t struct { type Kevent_t struct {
Ident uint32 Ident uint32
Filter int16 Filter uint32
Flags uint16 Flags uint32
Fflags uint32 Fflags uint32
Data int32 Data int64
Udata *byte Udata int32
} }
type FdSet struct { type FdSet struct {
Bits [32]int32 Bits [8]uint32
} }
const ( const (
SizeofIfMsghdr = 0xe8 SizeofIfMsghdr = 0x98
SizeofIfData = 0xd0 SizeofIfData = 0x84
SizeofIfaMsghdr = 0x18 SizeofIfaMsghdr = 0x18
SizeofRtMsghdr = 0x58 SizeofRtMsghdr = 0x78
SizeofRtMetrics = 0x30 SizeofRtMetrics = 0x50
) )
type IfMsghdr struct { type IfMsghdr struct {
Msglen uint16 Msglen uint16
Version uint8 Version uint8
Type uint8 Type uint8
Hdrlen uint16 Addrs int32
Index uint16 Flags int32
Tableid uint16 Index uint16
Pad1 uint8 Pad_cgo_0 [2]byte
Pad2 uint8 Data IfData
Addrs int32 Pad_cgo_1 [4]byte
Flags int32
Xflags int32
Data IfData
} }
type IfData struct { type IfData struct {
Type uint8 Type uint8
Addrlen uint8 Addrlen uint8
Hdrlen uint8 Hdrlen uint8
Link_state uint8 Pad_cgo_0 [1]byte
Mtu uint32 Link_state int32
Metric uint32 Mtu uint64
Pad uint32 Metric uint64
Baudrate uint64 Baudrate uint64
Ipackets uint64 Ipackets uint64
Ierrors uint64 Ierrors uint64
Opackets uint64 Opackets uint64
Oerrors uint64 Oerrors uint64
Collisions uint64 Collisions uint64
Ibytes uint64 Ibytes uint64
Obytes uint64 Obytes uint64
Imcasts uint64 Imcasts uint64
Omcasts uint64 Omcasts uint64
Iqdrops uint64 Iqdrops uint64
Noproto uint64 Noproto uint64
Capabilities uint32 Lastchange Timespec
Lastchange Timeval
Mclpool [7]Mclpool
} }
type IfaMsghdr struct { type IfaMsghdr struct {
Msglen uint16 Msglen uint16
Version uint8 Version uint8
Type uint8 Type uint8
Hdrlen uint16 Addrs int32
Index uint16 Flags int32
Tableid uint16 Metric int32
Pad1 uint8 Index uint16
Pad2 uint8 Pad_cgo_0 [6]byte
Addrs int32
Flags int32
Metric int32
} }
type RtMsghdr struct { type RtMsghdr struct {
Msglen uint16 Msglen uint16
Version uint8 Version uint8
Type uint8 Type uint8
Hdrlen uint16 Index uint16
Index uint16 Pad_cgo_0 [2]byte
Tableid uint16 Flags int32
Priority uint8 Addrs int32
Mpls uint8 Pid int32
Addrs int32 Seq int32
Flags int32 Errno int32
Fmask int32 Use int32
Pid int32 Inits int32
Seq int32 Pad_cgo_1 [4]byte
Errno int32 Rmx RtMetrics
Inits uint32
Rmx RtMetrics
} }
type RtMetrics struct { type RtMetrics struct {
Pksent uint64 Locks uint64
Locks uint32 Mtu uint64
Mtu uint32 Hopcount uint64
Expire uint32 Recvpipe uint64
Refcnt uint32 Sendpipe uint64
Hopcount uint32 Ssthresh uint64
Recvpipe uint32 Rtt uint64
Sendpipe uint32 Rttvar uint64
Ssthresh uint32 Expire int64
Rtt uint32 Pksent int64
Rttvar uint32
}
type Mclpool struct {
Grown uint32
Alive uint16
Hwm uint16
Cwm uint16
Lwm uint16
} }
type Mclpool [0]byte
const ( const (
SizeofBpfVersion = 0x4 SizeofBpfVersion = 0x4
SizeofBpfStat = 0x8 SizeofBpfStat = 0x80
SizeofBpfProgram = 0x8 SizeofBpfProgram = 0x8
SizeofBpfInsn = 0x8 SizeofBpfInsn = 0x8
SizeofBpfHdr = 0x14 SizeofBpfHdr = 0x14
...@@ -376,8 +318,10 @@ type BpfVersion struct { ...@@ -376,8 +318,10 @@ type BpfVersion struct {
} }
type BpfStat struct { type BpfStat struct {
Recv uint32 Recv uint64
Drop uint32 Drop uint64
Capt uint64
Padding [13]uint64
} }
type BpfProgram struct { type BpfProgram struct {
...@@ -401,6 +345,6 @@ type BpfHdr struct { ...@@ -401,6 +345,6 @@ type BpfHdr struct {
} }
type BpfTimeval struct { type BpfTimeval struct {
Sec uint32 Sec int32
Usec uint32 Usec int32
} }
...@@ -19,14 +19,14 @@ type ( ...@@ -19,14 +19,14 @@ type (
) )
type Timespec struct { type Timespec struct {
Sec int32 Sec int64
Pad_cgo_0 [4]byte Nsec int64
Nsec int64
} }
type Timeval struct { type Timeval struct {
Sec int64 Sec int64
Usec int64 Usec int32
Pad_cgo_0 [4]byte
} }
type Rusage struct { type Rusage struct {
...@@ -55,71 +55,30 @@ type Rlimit struct { ...@@ -55,71 +55,30 @@ type Rlimit struct {
type _Gid_t uint32 type _Gid_t uint32
const (
S_IFMT = 0xf000
S_IFIFO = 0x1000
S_IFCHR = 0x2000
S_IFDIR = 0x4000
S_IFBLK = 0x6000
S_IFREG = 0x8000
S_IFLNK = 0xa000
S_IFSOCK = 0xc000
S_ISUID = 0x800
S_ISGID = 0x400
S_ISVTX = 0x200
S_IRUSR = 0x100
S_IWUSR = 0x80
S_IXUSR = 0x40
)
type Stat_t struct { type Stat_t struct {
Dev int32 Dev uint64
Ino uint32 Mode uint32
Mode uint32
Nlink uint32
Uid uint32
Gid uint32
Rdev int32
Lspare0 int32
Atim Timespec
Mtim Timespec
Ctim Timespec
Size int64
Blocks int64
Blksize uint32
Flags uint32
Gen uint32
Lspare1 int32
X__st_birthtim Timespec
Qspare [2]int64
}
type Statfs_t struct {
F_flags uint32
F_bsize uint32
F_iosize uint32
Pad_cgo_0 [4]byte Pad_cgo_0 [4]byte
F_blocks uint64 Ino uint64
F_bfree uint64 Nlink uint32
F_bavail int64 Uid uint32
F_files uint64 Gid uint32
F_ffree uint64
F_favail int64
F_syncwrites uint64
F_syncreads uint64
F_asyncwrites uint64
F_asyncreads uint64
F_fsid Fsid
F_namemax uint32
F_owner uint32
F_ctime uint32
F_spare [3]uint32
F_fstypename [16]int8
F_mntonname [90]int8
F_mntfromname [90]int8
Pad_cgo_1 [4]byte Pad_cgo_1 [4]byte
Mount_info [160]byte Rdev uint64
} Atimespec Timespec
Mtimespec Timespec
Ctimespec Timespec
Birthtimespec Timespec
Size int64
Blocks int64
Blksize uint32
Flags uint32
Gen uint32
Spare [2]uint32
Pad_cgo_2 [4]byte
}
type Statfs_t [0]byte
type Flock_t struct { type Flock_t struct {
Start int64 Start int64
...@@ -130,15 +89,16 @@ type Flock_t struct { ...@@ -130,15 +89,16 @@ type Flock_t struct {
} }
type Dirent struct { type Dirent struct {
Fileno uint64 Fileno uint64
Reclen uint16 Reclen uint16
Namlen uint16 Namlen uint16
Type uint8 Type uint8
Name [512]int8 Name [512]int8
Pad_cgo_0 [3]byte
} }
type Fsid struct { type Fsid struct {
Val [2]int32 X__fsid_val [2]int32
} }
type RawSockaddrInet4 struct { type RawSockaddrInet4 struct {
...@@ -172,7 +132,7 @@ type RawSockaddrDatalink struct { ...@@ -172,7 +132,7 @@ type RawSockaddrDatalink struct {
Nlen uint8 Nlen uint8
Alen uint8 Alen uint8
Slen uint8 Slen uint8
Data [24]int8 Data [12]int8
} }
type RawSockaddr struct { type RawSockaddr struct {
...@@ -213,7 +173,7 @@ type Msghdr struct { ...@@ -213,7 +173,7 @@ type Msghdr struct {
Namelen uint32 Namelen uint32
Pad_cgo_0 [4]byte Pad_cgo_0 [4]byte
Iov *Iovec Iov *Iovec
Iovlen uint32 Iovlen int32
Pad_cgo_1 [4]byte Pad_cgo_1 [4]byte
Control *byte Control *byte
Controllen uint32 Controllen uint32
...@@ -236,7 +196,7 @@ const ( ...@@ -236,7 +196,7 @@ const (
SizeofSockaddrInet6 = 0x1c SizeofSockaddrInet6 = 0x1c
SizeofSockaddrAny = 0x6c SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x20 SizeofSockaddrDatalink = 0x14
SizeofLinger = 0x8 SizeofLinger = 0x8
SizeofIPMreq = 0x8 SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14 SizeofIPv6Mreq = 0x14
...@@ -252,49 +212,46 @@ const ( ...@@ -252,49 +212,46 @@ const (
) )
type Kevent_t struct { type Kevent_t struct {
Ident uint64 Ident uint64
Filter int16 Filter uint32
Flags uint16 Flags uint32
Fflags uint32 Fflags uint32
Data int32 Pad_cgo_0 [4]byte
Udata *byte Data int64
Udata int64
} }
type FdSet struct { type FdSet struct {
Bits [32]int32 Bits [8]uint32
} }
const ( const (
SizeofIfMsghdr = 0xf0 SizeofIfMsghdr = 0x98
SizeofIfData = 0xd8 SizeofIfData = 0x88
SizeofIfaMsghdr = 0x18 SizeofIfaMsghdr = 0x18
SizeofRtMsghdr = 0x58 SizeofRtMsghdr = 0x78
SizeofRtMetrics = 0x30 SizeofRtMetrics = 0x50
) )
type IfMsghdr struct { type IfMsghdr struct {
Msglen uint16 Msglen uint16
Version uint8 Version uint8
Type uint8 Type uint8
Hdrlen uint16 Addrs int32
Index uint16 Flags int32
Tableid uint16 Index uint16
Pad1 uint8 Pad_cgo_0 [2]byte
Pad2 uint8 Data IfData
Addrs int32
Flags int32
Xflags int32
Data IfData
} }
type IfData struct { type IfData struct {
Type uint8 Type uint8
Addrlen uint8 Addrlen uint8
Hdrlen uint8 Hdrlen uint8
Link_state uint8 Pad_cgo_0 [1]byte
Mtu uint32 Link_state int32
Metric uint32 Mtu uint64
Pad uint32 Metric uint64
Baudrate uint64 Baudrate uint64
Ipackets uint64 Ipackets uint64
Ierrors uint64 Ierrors uint64
...@@ -307,72 +264,58 @@ type IfData struct { ...@@ -307,72 +264,58 @@ type IfData struct {
Omcasts uint64 Omcasts uint64
Iqdrops uint64 Iqdrops uint64
Noproto uint64 Noproto uint64
Lastchange Timeval Lastchange Timespec
Mclpool [7]Mclpool
Pad_cgo_0 [4]byte
} }
type IfaMsghdr struct { type IfaMsghdr struct {
Msglen uint16 Msglen uint16
Version uint8 Version uint8
Type uint8 Type uint8
Hdrlen uint16 Addrs int32
Index uint16 Flags int32
Tableid uint16 Metric int32
Pad1 uint8 Index uint16
Pad2 uint8 Pad_cgo_0 [6]byte
Addrs int32
Flags int32
Metric int32
} }
type RtMsghdr struct { type RtMsghdr struct {
Msglen uint16 Msglen uint16
Version uint8 Version uint8
Type uint8 Type uint8
Hdrlen uint16 Index uint16
Index uint16 Pad_cgo_0 [2]byte
Tableid uint16 Flags int32
Priority uint8 Addrs int32
Mpls uint8 Pid int32
Addrs int32 Seq int32
Flags int32 Errno int32
Fmask int32 Use int32
Pid int32 Inits int32
Seq int32 Pad_cgo_1 [4]byte
Errno int32 Rmx RtMetrics
Inits uint32
Rmx RtMetrics
} }
type RtMetrics struct { type RtMetrics struct {
Pksent uint64 Locks uint64
Locks uint32 Mtu uint64
Mtu uint32 Hopcount uint64
Expire uint32 Recvpipe uint64
Refcnt uint32 Sendpipe uint64
Hopcount uint32 Ssthresh uint64
Recvpipe uint32 Rtt uint64
Sendpipe uint32 Rttvar uint64
Ssthresh uint32 Expire int64
Rtt uint32 Pksent int64
Rttvar uint32
}
type Mclpool struct {
Grown uint32
Alive uint16
Hwm uint16
Cwm uint16
Lwm uint16
} }
type Mclpool [0]byte
const ( const (
SizeofBpfVersion = 0x4 SizeofBpfVersion = 0x4
SizeofBpfStat = 0x8 SizeofBpfStat = 0x80
SizeofBpfProgram = 0x10 SizeofBpfProgram = 0x10
SizeofBpfInsn = 0x8 SizeofBpfInsn = 0x8
SizeofBpfHdr = 0x14 SizeofBpfHdr = 0x20
) )
type BpfVersion struct { type BpfVersion struct {
...@@ -381,8 +324,10 @@ type BpfVersion struct { ...@@ -381,8 +324,10 @@ type BpfVersion struct {
} }
type BpfStat struct { type BpfStat struct {
Recv uint32 Recv uint64
Drop uint32 Drop uint64
Capt uint64
Padding [13]uint64
} }
type BpfProgram struct { type BpfProgram struct {
...@@ -403,10 +348,10 @@ type BpfHdr struct { ...@@ -403,10 +348,10 @@ type BpfHdr struct {
Caplen uint32 Caplen uint32
Datalen uint32 Datalen uint32
Hdrlen uint16 Hdrlen uint16
Pad_cgo_0 [2]byte Pad_cgo_0 [6]byte
} }
type BpfTimeval struct { type BpfTimeval struct {
Sec uint32 Sec int64
Usec uint32 Usec int64
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment