Dmitri Shuralyov
1bfbee0e20
all: update go directive to 1.18
...
Done with:
go get go@1.18
go mod tidy
go fix ./...
Using go1.21.3.
Also update code generators to use only the new go:build lines,
not the old +build ones.
For golang/go#60268 .
Change-Id: I6aabc42efb6ab3329981100e1db2263aac5e92a6
Reviewed-on: https://go-review.googlesource.com/c/sys/+/534222
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2023-10-11 21:54:30 +00:00
Tobias Klauser
2964e1e4b1
unix: remove unused readlen and writelen
...
These were originally added when copying over files from package
syscall. However, their use was removed in CL 129500043. New ports kept
adding these wrappers without using them. They are still unused, so
remove them.
Change-Id: I2ffffe98a5c999d23b63d1f04ee4ad8f807ee736
Reviewed-on: https://go-review.googlesource.com/c/sys/+/531356
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Than McIntosh <thanm@google.com >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
2023-09-28 17:55:56 +00:00
Tobias Klauser
3fead03e7d
unix: add Mremap for netbsd
...
Fixes golang/go#60409
Change-Id: I2d872a1a6fb63c27ab3753deff370e1c2f752bdd
Reviewed-on: https://go-review.googlesource.com/c/sys/+/508397
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
2023-07-13 05:43:33 +00:00
Ian Lance Taylor
ff18efa0a3
unix: change Setrlimit/Prlimit to always call syscall functions
...
As of Go 1.21 syscall.Setrlimit and syscall.prlimit can affect
starting a new process, by restoring the original NOFILE rlimit.
That is recorded locally in the syscall package, so just always
call the syscall functions.
For golang/go#46279
Change-Id: I2f3dafe5562a7dde1297bad6f5d34a80af5d620b
Reviewed-on: https://go-review.googlesource.com/c/sys/+/476695
Run-TryBot: Ian Lance Taylor <iant@golang.org >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Bryan Mills <bcmills@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
2023-03-15 21:12:13 +00:00
Dmitri Goutnik
b13f40e221
unix: add ioctlPtr with unsafe.Pointer arg on other unices
...
This is a followup for CL 340915 that adds ioctlPtr for all other
UNIX-like platforms.
For golang/go#44834
Change-Id: I0ecf84e53f13e5a8da736b3ba7f643262596d23c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/469315
Reviewed-by: Matthew Dempsky <mdempsky@google.com >
Run-TryBot: Dmitri Goutnik <dgoutnik@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Bryan Mills <bcmills@google.com >
2023-02-21 11:26:31 +00:00
Tobias Klauser
cffae8ece4
unix: add ClockGettime on *bsd and solaris
...
The same wrapper is already implemented on linux and darwin.
Change-Id: Ia986fdfc28767356451d157e53f11e8d9ca86f2c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/456795
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Than McIntosh <thanm@google.com >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
2022-12-13 14:01:47 +00:00
Tobias Klauser
039c03cc5b
unix: add race annotations to Pread and Pwrite
...
Follow CL 391954 which changed Pread/Pwrite in package syscall.
For golang/go#51618
Change-Id: Icc587c61f083886bb66ca96717f686f56b398e34
Reviewed-on: https://go-review.googlesource.com/c/sys/+/392794
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2022-03-15 19:43:20 +00:00
Tobias Klauser
af8b642124
unix: use pipe2 syscall in Pipe on NetBSD
...
The pipe2 syscall is part of NetBSD since version 6.0 and thus exists in
all officially supported versions (6.0 through 6.1 and 7.0+).
Follows CL 94035 which did the same for package syscall.
Change-Id: Icfa7dfb13788c9a7425c641d0233b109e8c79e7f
Reviewed-on: https://go-review.googlesource.com/c/sys/+/370794
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
Trust: Benny Siegert <bsiegert@gmail.com >
2021-12-10 11:16:14 +00:00
Russ Cox
9a76102bfb
all: go fmt ./...
...
Make all our package sources use Go 1.17 gofmt format
(adding //go:build lines).
Not strictly necessary but will avoid spurious changes
as files are edited.
Part of //go:build change (#41184 ).
See https://golang.org/design/draft-gobuild
Change-Id: I01667f826428426a39c84717d02efa25fa44553c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/294490
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Keith Randall <khr@golang.org >
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
Trust: Josh Bleecher Snyder <josharian@gmail.com >
Trust: Russ Cox <rsc@golang.org >
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com >
Run-TryBot: Russ Cox <rsc@golang.org >
2021-02-20 05:07:31 +00:00
Tobias Klauser
9555bcde0c
unix: add Pipe2 on netbsd
...
Re-submit after CL 283593 broke the dragonfly builders.
Change-Id: Ifdeb7642be32f5d3d3862aacdff90a0da4886365
Reviewed-on: https://go-review.googlesource.com/c/sys/+/283599
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2021-02-18 08:51:08 +00:00
Tobias Klauser
4bcb84eeeb
Revert "unix: add Pipe2 on netbsd"
...
This reverts CL 283593.
Reason for revert: breaks DragonflyBSD builders and was submitted during code freeze.
Change-Id: I784f58ae56f7259d5176921d7a61070e0ac7cb52
Reviewed-on: https://go-review.googlesource.com/c/sys/+/283597
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
2021-01-13 18:17:07 +00:00
Tobias Klauser
3196cb8d8e
unix: add Pipe2 on netbsd
...
Also move TestPipe2 into a separate file, enabling it for all platforms
where Pipe2 is available.
Change-Id: I1a31e9563f5f60ef0e994abc1db57b7f1c58fe88
Reviewed-on: https://go-review.googlesource.com/c/sys/+/283593
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Trust: Benny Siegert <bsiegert@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
2021-01-13 11:20:37 +00:00
Tobias Klauser
a1369afcda
unix: add flags argument in //sys comments for Fstatvfs1 and Statvfs1 on netbsd
...
Otherwise, these functions would not be generated correctly. Follow-up
for CL 209637.
Also regenerate the zsyscall_netbsd_*.go files, causing the definition
of sysctl to move.
Change-Id: I829e8c94a69b6aeb251b46bc4762f2a7bbc45a8e
Reviewed-on: https://go-review.googlesource.com/c/sys/+/212460
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
2020-01-03 14:33:44 +00:00
Tobias Klauser
c96a22e43c
unix: add Dup3 on netbsd and openbsd
...
Change-Id: Id871d3d211d6d5896e41b673c7bfe3a1d8e756a6
Reviewed-on: https://go-review.googlesource.com/c/sys/+/212461
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2020-01-02 14:19:24 +00:00
Tobias Klauser
abf886d6f5
unix: unify definition of func fcntl
...
For linux and *bsd, implement func fcntl in fcntl.go instead of
generating it. Implement it using fcntl64Syscall, so SYS_FCNTL64 is used
on 32-bit linux.
For aix, darwin and solaris continue generate func fcntl as before.
Change-Id: I3750b88d1ee5573daaee2b75c369f723fde8834a
Reviewed-on: https://go-review.googlesource.com/c/sys/+/212337
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2019-12-23 22:40:30 +00:00
Tobias Klauser
ce4227a45e
unix: add Statvfs and Fstatvfs on NetBSD
...
NetBSD replaced statfs with statvfs in NetBSD 3.0. statfs is derived
from BSD4.4, while NetBSD (and Solaris) implement statvfs from POSIX
instead.
Generated and tested on NetBSD 8.0 (amd64). Also tested on NetBSD 7.0 (amd64).
Change-Id: I53738b77815d04c7774a6455b4a31cd4e9571f7b
Reviewed-on: https://go-review.googlesource.com/c/sys/+/209637
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
2019-12-04 07:23:24 +00:00
Tobias Klauser
2aa67d56cd
unix: fix Select to return number of ready fds on Darwin and *BSD
...
Make Select's signature on Darwin and the BSDs match the one on Linux
and return the number of ready file descriptors.
Fixes golang/go#34458
Change-Id: Ia618ce34ff754f2b731d7f913cab840d7948579c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/196802
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2019-09-24 06:27:00 +00:00
Yuval Pavel Zholkover
15dcb6c006
unix: fix Getdirentries emulation using Getdents on netbsd, openbsd
...
Call Seek if basep is not nil to read the current dir offset.
Return EIO error if the offset doesn't fit into a 32-bit uintptr.
Make Getdents public.
Update golang/go#32498
Change-Id: Idfbc48d3fc3a6cc8a979242681e8882d39998285
Reviewed-on: https://go-review.googlesource.com/c/sys/+/182319
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2019-06-16 12:48:12 +00:00
Maya Rashish
770c60269b
unix: add netbsd/arm64 files.
...
This isn't a real generation, it's mostly a copy of the amd64
files, due to difficulties in generation.
There should be little to no differences between netbsd 64bit
archs.
Change-Id: I1c7b25cfef87220c827018e73695e5ca08987156
GitHub-Last-Rev: 043207b2c25fbfe959e66bddc238d5b2f053a04f
GitHub-Pull-Request: golang/sys#27
Reviewed-on: https://go-review.googlesource.com/c/155738
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2019-01-21 09:02:51 +00:00