1
0
mirror of https://github.com/golang/go synced 2024-11-17 12:54:47 -07:00
go/src
Yuval Pavel Zholkover dc6eb200dd syscall: FreeBSD 12 ino64 support
This is similar to CL 136816 for x/sys/unix, changing the FreeBSD ABI to use 64-bit inodes in
Stat_t, Statfs_t, and Dirent types.

The changes are forward compatible, that is FreeBSD 10.x, 11.x continue to use their current sysnum numbers.
The affected types are converted to the new layout (with some overhead).
Thus the same statically linked binary should work using the native sysnums (without any conversion) on FreeBSD 12.

Breaking API changes in package syscall are:
Mknod takes a uint64 (C dev_t) instead of int.
Stat_t: Dev, Ino, Nlink, Rdev, Gen became uint64.
  Atimespec, Mtimespec, Ctimespec, Birthtimespec renamed to Atim, Mtim, Ctim, Birthtim respectively.

Statfs_t: Mntonname and Mntfromname changed from [88]int8 to [1024]int8 arrays.

Dirent: Fileno became uint64, Namlen uint16 and an additional field Off int64 (currently unused) was added.

The following commands were run to generate ztypes_* and zsyscall_* on FreeBSD-12.0-ALPHA6 systems (GOARCH=386 were run on the same amd64 host):
GOOS=freebsd GOARCH=amd64 ./mksyscall.pl -tags freebsd,amd64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go |gofmt >zsyscall_freebsd_amd64.go
GOOS=freebsd GOARCH=amd64 go tool cgo -godefs types_freebsd.go | GOOS=freebsd GOARCH=amd64 go run mkpost.go >ztypes_freebsd_amd64.go

GOOS=freebsd GOARCH=386 ./mksyscall.pl -l32 -tags freebsd,386 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go |gofmt >zsyscall_freebsd_386.go
GOOS=freebsd GOARCH=386 go tool cgo -godefs types_freebsd.go | GOOS=freebsd GOARCH=386 go run mkpost.go >ztypes_freebsd_386.go

GOOS=freebsd GOARCH=arm ./mksyscall.pl -l32 -arm -tags freebsd,arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go |gofmt >zsyscall_freebsd_arm.go
GOOS=freebsd GOARCH=arm go tool cgo -godefs -- -fsigned-char types_freebsd.go | GOOS=freebsd GOARCH=arm go run mkpost.go >ztypes_freebsd_arm.go

The Kevent struct was changed to use the FREEBSD_COMPAT11 version always (requiring the COMPAT_FREEBSD11 kernel option FreeBSD-12, this is the default).

The definitions of ifData were not updated, their functionality in has have been replaced by vendored golang.org/x/net/route.

freebsdVersion initialization was dropped from init() in favor of a sync.Once based wrapper - supportsABI().

Updates #22448.

Change-Id: I359b756e2849c036d7ed7f75dbd6ec836e0b90b4
Reviewed-on: https://go-review.googlesource.com/c/138595
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-10-05 21:38:13 +00:00
..
archive syscall: FreeBSD 12 ino64 support 2018-10-05 21:38:13 +00:00
bufio
builtin
bytes
cmd cmd/api: explicit tagKey with GOOS and GOARCH 2018-10-05 17:53:43 +00:00
compress
container
context context: avoid duplicate removeChild 2018-10-03 15:26:10 +00:00
crypto crypto/x509: fix getting user home dir on darwin 2018-10-04 02:31:59 +00:00
database/sql database/sql: improve unimplemented LastInsertId error message 2018-10-03 17:28:45 +00:00
debug debug/pe: fix TestDWARF to work with relocations 2018-10-05 20:30:11 +00:00
encoding
errors
expvar expvar: add Map.Delete 2018-10-04 01:16:52 +00:00
flag
fmt io: export StringWriter 2018-10-03 20:13:35 +00:00
go go/types: remove a TODO, enable a test 2018-10-05 17:56:34 +00:00
hash
html
image
index/suffixarray
internal internal/syscall: add AIX operating system 2018-10-03 21:28:26 +00:00
io io: export StringWriter 2018-10-03 20:13:35 +00:00
log
math math: use Abs in Pow rather than if x < 0 { x = -x } 2018-10-04 17:33:04 +00:00
mime
net io: export StringWriter 2018-10-03 20:13:35 +00:00
os syscall: FreeBSD 12 ino64 support 2018-10-05 21:38:13 +00:00
path
plugin
reflect reflect: add an example for Kind 2018-10-03 22:38:53 +00:00
regexp
runtime syscall: FreeBSD 12 ino64 support 2018-10-05 21:38:13 +00:00
sort
strconv
strings strings: correctly handle invalid utf8 sequences in Map 2018-10-03 21:27:10 +00:00
sync
syscall syscall: FreeBSD 12 ino64 support 2018-10-05 21:38:13 +00:00
testdata
testing
text
time time: return first error in unsuccessful calls to LoadLocation 2018-10-03 17:40:17 +00:00
unicode
unsafe
vendor/golang_org/x vendor: update golang_org/x/net/route from upstream 2018-10-04 21:36:59 +00:00
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
iostest.bash
make.bash
make.bat
Make.dist
make.rc
naclmake.bash
nacltest.bash
race.bash
race.bat
run.bash
run.bat
run.rc