unix: update Darwin ztype files
The main effect is to change some fields of Statfs_t from arrays of int8
to arrays of byte. This makes the types of those fields correspond to the
types used on most other BSD systems.
Change-Id: If7e80fd53d6369a0f7c979c0bf36ffe530dc5d8d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259903
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
diff --git a/unix/ztypes_darwin_386.go b/unix/ztypes_darwin_386.go
index 6103f21..dd56ab8 100644
--- a/unix/ztypes_darwin_386.go
+++ b/unix/ztypes_darwin_386.go
@@ -92,9 +92,9 @@
Type uint32
Flags uint32
Fssubtype uint32
- Fstypename [16]int8
- Mntonname [1024]int8
- Mntfromname [1024]int8
+ Fstypename [16]byte
+ Mntonname [1024]byte
+ Mntfromname [1024]byte
Reserved [8]uint32
}
@@ -305,7 +305,6 @@
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Data IfData
}
@@ -348,7 +347,6 @@
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Metric int32
}
@@ -369,7 +367,6 @@
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Refcount int32
}
@@ -378,7 +375,6 @@
Version uint8
Type uint8
Index uint16
- _ [2]byte
Flags int32
Addrs int32
Pid int32
@@ -400,7 +396,8 @@
Rtt uint32
Rttvar uint32
Pksent uint32
- Filler [4]uint32
+ State uint32
+ Filler [3]uint32
}
const (
diff --git a/unix/ztypes_darwin_amd64.go b/unix/ztypes_darwin_amd64.go
index e6576d1..1f82f2b 100644
--- a/unix/ztypes_darwin_amd64.go
+++ b/unix/ztypes_darwin_amd64.go
@@ -70,7 +70,6 @@
Uid uint32
Gid uint32
Rdev int32
- _ [4]byte
Atim Timespec
Mtim Timespec
Ctim Timespec
@@ -97,10 +96,11 @@
Type uint32
Flags uint32
Fssubtype uint32
- Fstypename [16]int8
- Mntonname [1024]int8
- Mntfromname [1024]int8
- Reserved [8]uint32
+ Fstypename [16]byte
+ Mntonname [1024]byte
+ Mntfromname [1024]byte
+ Flags_ext uint32
+ Reserved [7]uint32
}
type Flock_t struct {
@@ -133,8 +133,7 @@
type Log2phys_t struct {
Flags uint32
- _ [8]byte
- _ [8]byte
+ _ [16]byte
}
type Fsid struct {
@@ -225,10 +224,8 @@
type Msghdr struct {
Name *byte
Namelen uint32
- _ [4]byte
Iov *Iovec
Iovlen int32
- _ [4]byte
Control *byte
Controllen uint32
Flags int32
@@ -313,7 +310,6 @@
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Data IfData
}
@@ -356,7 +352,6 @@
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Metric int32
}
@@ -377,7 +372,6 @@
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Refcount int32
}
@@ -386,7 +380,6 @@
Version uint8
Type uint8
Index uint16
- _ [2]byte
Flags int32
Addrs int32
Pid int32
@@ -408,7 +401,8 @@
Rtt uint32
Rttvar uint32
Pksent uint32
- Filler [4]uint32
+ State uint32
+ Filler [3]uint32
}
const (
@@ -431,7 +425,6 @@
type BpfProgram struct {
Len uint32
- _ [4]byte
Insns *BpfInsn
}
@@ -456,7 +449,6 @@
Cflag uint64
Lflag uint64
Cc [20]uint8
- _ [4]byte
Ispeed uint64
Ospeed uint64
}
diff --git a/unix/ztypes_darwin_arm.go b/unix/ztypes_darwin_arm.go
index af9560f..3af01a4 100644
--- a/unix/ztypes_darwin_arm.go
+++ b/unix/ztypes_darwin_arm.go
@@ -1,6 +1,5 @@
-// NOTE: cgo can't generate struct Stat_t and struct Statfs_t yet
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_darwin.go
+// cgo -godefs types_darwin.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
// +build arm,darwin
@@ -31,7 +30,7 @@
Usec int32
}
-type Timeval32 [0]byte
+type Timeval32 struct{}
type Rusage struct {
Utime Timeval
@@ -93,9 +92,9 @@
Type uint32
Flags uint32
Fssubtype uint32
- Fstypename [16]int8
- Mntonname [1024]int8
- Mntfromname [1024]int8
+ Fstypename [16]byte
+ Mntonname [1024]byte
+ Mntfromname [1024]byte
Reserved [8]uint32
}
@@ -306,7 +305,6 @@
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Data IfData
}
@@ -349,7 +347,6 @@
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Metric int32
}
@@ -370,7 +367,6 @@
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Refcount int32
}
@@ -379,7 +375,6 @@
Version uint8
Type uint8
Index uint16
- _ [2]byte
Flags int32
Addrs int32
Pid int32
@@ -401,7 +396,8 @@
Rtt uint32
Rttvar uint32
Pksent uint32
- Filler [4]uint32
+ State uint32
+ Filler [3]uint32
}
const (
diff --git a/unix/ztypes_darwin_arm64.go b/unix/ztypes_darwin_arm64.go
index a09c0f9..ff43738 100644
--- a/unix/ztypes_darwin_arm64.go
+++ b/unix/ztypes_darwin_arm64.go
@@ -70,7 +70,6 @@
Uid uint32
Gid uint32
Rdev int32
- _ [4]byte
Atim Timespec
Mtim Timespec
Ctim Timespec
@@ -97,10 +96,11 @@
Type uint32
Flags uint32
Fssubtype uint32
- Fstypename [16]int8
- Mntonname [1024]int8
- Mntfromname [1024]int8
- Reserved [8]uint32
+ Fstypename [16]byte
+ Mntonname [1024]byte
+ Mntfromname [1024]byte
+ Flags_ext uint32
+ Reserved [7]uint32
}
type Flock_t struct {
@@ -133,8 +133,7 @@
type Log2phys_t struct {
Flags uint32
- _ [8]byte
- _ [8]byte
+ _ [16]byte
}
type Fsid struct {
@@ -225,10 +224,8 @@
type Msghdr struct {
Name *byte
Namelen uint32
- _ [4]byte
Iov *Iovec
Iovlen int32
- _ [4]byte
Control *byte
Controllen uint32
Flags int32
@@ -313,7 +310,6 @@
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Data IfData
}
@@ -356,7 +352,6 @@
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Metric int32
}
@@ -377,7 +372,6 @@
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Refcount int32
}
@@ -386,7 +380,6 @@
Version uint8
Type uint8
Index uint16
- _ [2]byte
Flags int32
Addrs int32
Pid int32
@@ -408,7 +401,8 @@
Rtt uint32
Rttvar uint32
Pksent uint32
- Filler [4]uint32
+ State uint32
+ Filler [3]uint32
}
const (
@@ -431,7 +425,6 @@
type BpfProgram struct {
Len uint32
- _ [4]byte
Insns *BpfInsn
}
@@ -456,7 +449,6 @@
Cflag uint64
Lflag uint64
Cc [20]uint8
- _ [4]byte
Ispeed uint64
Ospeed uint64
}