From 6ee6208a59482f91266522cae4a06c1c468b104a Mon Sep 17 00:00:00 2001 From: database64128 Date: Sat, 2 Sep 2023 15:17:37 +0000 Subject: [PATCH 1/9] windows: add missing TCP and UDP socket options and control message types Source: ws2ipdef.h Change-Id: Ie9c6e2cec839a09b7e59239f1d5b50664a310f1d GitHub-Last-Rev: 14b916938b870927d9594d0327f642cab10b024c GitHub-Pull-Request: golang/sys#173 Reviewed-on: https://go-review.googlesource.com/c/sys/+/525256 Reviewed-by: Alex Brainman Reviewed-by: Ian Lance Taylor TryBot-Result: Gopher Robot Run-TryBot: Alex Brainman Reviewed-by: Michael Pratt --- windows/types_windows.go | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/windows/types_windows.go b/windows/types_windows.go index b88dc7c85e..359780f6ac 100644 --- a/windows/types_windows.go +++ b/windows/types_windows.go @@ -1094,7 +1094,33 @@ const ( SOMAXCONN = 0x7fffffff - TCP_NODELAY = 1 + TCP_NODELAY = 1 + TCP_EXPEDITED_1122 = 2 + TCP_KEEPALIVE = 3 + TCP_MAXSEG = 4 + TCP_MAXRT = 5 + TCP_STDURG = 6 + TCP_NOURG = 7 + TCP_ATMARK = 8 + TCP_NOSYNRETRIES = 9 + TCP_TIMESTAMPS = 10 + TCP_OFFLOAD_PREFERENCE = 11 + TCP_CONGESTION_ALGORITHM = 12 + TCP_DELAY_FIN_ACK = 13 + TCP_MAXRTMS = 14 + TCP_FASTOPEN = 15 + TCP_KEEPCNT = 16 + TCP_KEEPIDLE = TCP_KEEPALIVE + TCP_KEEPINTVL = 17 + TCP_FAIL_CONNECT_ON_ICMP_ERROR = 18 + TCP_ICMP_ERROR_INFO = 19 + + UDP_NOCHECKSUM = 1 + UDP_SEND_MSG_SIZE = 2 + UDP_RECV_MAX_COALESCED_SIZE = 3 + UDP_CHECKSUM_COVERAGE = 20 + + UDP_COALESCED_INFO = 3 SHUT_RD = 0 SHUT_WR = 1 From 8ccaaf02a41dd9c49f12cab4025ecb99bd49364f Mon Sep 17 00:00:00 2001 From: AN Long Date: Wed, 13 Sep 2023 14:24:41 +0000 Subject: [PATCH 2/9] windows: add GetFileTime Add a simple Windows API GetFileTime. The document is https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfiletime Fixes golang/go#21541 Change-Id: Ia7b8385d27348b2abc0ee560c5bd7e66cb6d13f2 GitHub-Last-Rev: 6700dccbad089ec2a772245d8f1f262db6f7a707 GitHub-Pull-Request: golang/sys#174 Reviewed-on: https://go-review.googlesource.com/c/sys/+/528015 Reviewed-by: Michael Pratt Reviewed-by: Alex Brainman TryBot-Result: Gopher Robot Run-TryBot: Alex Brainman Auto-Submit: Michael Pratt Reviewed-by: Ian Lance Taylor --- windows/syscall_windows.go | 1 + windows/zsyscall_windows.go | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/windows/syscall_windows.go b/windows/syscall_windows.go index 35cfc57ca8..dcaa40977f 100644 --- a/windows/syscall_windows.go +++ b/windows/syscall_windows.go @@ -233,6 +233,7 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) = userenv.CreateEnvironmentBlock //sys DestroyEnvironmentBlock(block *uint16) (err error) = userenv.DestroyEnvironmentBlock //sys getTickCount64() (ms uint64) = kernel32.GetTickCount64 +//sys GetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) //sys SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) //sys GetFileAttributes(name *uint16) (attrs uint32, err error) [failretval==INVALID_FILE_ATTRIBUTES] = kernel32.GetFileAttributesW //sys SetFileAttributes(name *uint16, attrs uint32) (err error) = kernel32.SetFileAttributesW diff --git a/windows/zsyscall_windows.go b/windows/zsyscall_windows.go index 8b1688de4c..db6282e00a 100644 --- a/windows/zsyscall_windows.go +++ b/windows/zsyscall_windows.go @@ -253,6 +253,7 @@ var ( procGetFileAttributesW = modkernel32.NewProc("GetFileAttributesW") procGetFileInformationByHandle = modkernel32.NewProc("GetFileInformationByHandle") procGetFileInformationByHandleEx = modkernel32.NewProc("GetFileInformationByHandleEx") + procGetFileTime = modkernel32.NewProc("GetFileTime") procGetFileType = modkernel32.NewProc("GetFileType") procGetFinalPathNameByHandleW = modkernel32.NewProc("GetFinalPathNameByHandleW") procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW") @@ -2185,6 +2186,14 @@ func GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte, return } +func GetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) { + r1, _, e1 := syscall.Syscall6(procGetFileTime.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)), 0, 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func GetFileType(filehandle Handle) (n uint32, err error) { r0, _, e1 := syscall.Syscall(procGetFileType.Addr(), 1, uintptr(filehandle), 0, 0) n = uint32(r0) From 1d9f0b6d889086ed54c549c152320780d967e5b0 Mon Sep 17 00:00:00 2001 From: Mauri de Souza Meneguzzo Date: Sun, 8 Oct 2023 19:31:36 +0000 Subject: [PATCH 3/9] unix: add linux cachestat system call The cachestat system call is an alternative to mincore that offers more extensive page cache statistics, aiming to enhance scalability. It was added on Linux 6.5. Fixes golang/go#61917 Change-Id: If1b6b96f859dd6bf09f1a0c048abfa743a42c540 GitHub-Last-Rev: d18fbb9c48348e5f1f663395647a9ca89a578f60 GitHub-Pull-Request: golang/sys#176 Reviewed-on: https://go-review.googlesource.com/c/sys/+/533242 Reviewed-by: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov Auto-Submit: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI --- unix/linux/types.go | 17 +++++++++++++++++ unix/syscall_linux.go | 2 ++ unix/zsyscall_linux.go | 10 ++++++++++ unix/ztypes_linux.go | 12 ++++++++++++ 4 files changed, 41 insertions(+) diff --git a/unix/linux/types.go b/unix/linux/types.go index 389eed4bd5..f5a6ae9e7b 100644 --- a/unix/linux/types.go +++ b/unix/linux/types.go @@ -461,6 +461,20 @@ struct my_can_bittiming_const { struct riscv_hwprobe {}; #endif + +// copied from /usr/include/uapi/linux/mman.h +struct cachestat_range { + __u64 off; + __u64 len; +}; + +struct cachestat { + __u64 nr_cache; + __u64 nr_dirty; + __u64 nr_writeback; + __u64 nr_evicted; + __u64 nr_recently_evicted; +}; */ import "C" @@ -5813,3 +5827,6 @@ const ( type SchedAttr C.struct_sched_attr const SizeofSchedAttr = C.sizeof_struct_sched_attr + +type Cachestat_t C.struct_cachestat +type CachestatRange C.struct_cachestat_range diff --git a/unix/syscall_linux.go b/unix/syscall_linux.go index fb4e50224c..6b8a4ad69c 100644 --- a/unix/syscall_linux.go +++ b/unix/syscall_linux.go @@ -2482,3 +2482,5 @@ func SchedGetAttr(pid int, flags uint) (*SchedAttr, error) { } return attr, nil } + +//sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error) diff --git a/unix/zsyscall_linux.go b/unix/zsyscall_linux.go index 1ff3aec74c..863d7dde20 100644 --- a/unix/zsyscall_linux.go +++ b/unix/zsyscall_linux.go @@ -2195,3 +2195,13 @@ func schedGetattr(pid int, attr *SchedAttr, size uint, flags uint) (err error) { } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error) { + _, _, e1 := Syscall6(SYS_CACHESTAT, uintptr(fd), uintptr(unsafe.Pointer(crange)), uintptr(unsafe.Pointer(cstat)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/unix/ztypes_linux.go b/unix/ztypes_linux.go index 18aa70b426..cdba4c77df 100644 --- a/unix/ztypes_linux.go +++ b/unix/ztypes_linux.go @@ -5883,3 +5883,15 @@ type SchedAttr struct { } const SizeofSchedAttr = 0x38 + +type Cachestat_t struct { + Cache uint64 + Dirty uint64 + Writeback uint64 + Evicted uint64 + Recently_evicted uint64 +} +type CachestatRange struct { + Off uint64 + Len uint64 +} From 1bfbee0e20e3039533666df89a91c1876e67605d Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Wed, 11 Oct 2023 10:25:48 -0400 Subject: [PATCH 4/9] 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 Reviewed-by: Dmitri Shuralyov Auto-Submit: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI --- cpu/asm_aix_ppc64.s | 1 - cpu/cpu_aix.go | 1 - cpu/cpu_arm64.s | 1 - cpu/cpu_gc_arm64.go | 1 - cpu/cpu_gc_s390x.go | 1 - cpu/cpu_gc_x86.go | 2 -- cpu/cpu_gccgo_arm64.go | 1 - cpu/cpu_gccgo_s390x.go | 1 - cpu/cpu_gccgo_x86.c | 2 -- cpu/cpu_gccgo_x86.go | 2 -- cpu/cpu_linux.go | 1 - cpu/cpu_linux_mips64x.go | 2 -- cpu/cpu_linux_noinit.go | 1 - cpu/cpu_linux_ppc64x.go | 2 -- cpu/cpu_loong64.go | 1 - cpu/cpu_mips64x.go | 1 - cpu/cpu_mipsx.go | 1 - cpu/cpu_other_arm.go | 1 - cpu/cpu_other_arm64.go | 1 - cpu/cpu_other_mips64x.go | 2 -- cpu/cpu_other_ppc64x.go | 3 --- cpu/cpu_other_riscv64.go | 1 - cpu/cpu_ppc64x.go | 1 - cpu/cpu_riscv64.go | 1 - cpu/cpu_s390x.s | 1 - cpu/cpu_wasm.go | 1 - cpu/cpu_x86.go | 1 - cpu/cpu_x86.s | 2 -- cpu/endian_big.go | 1 - cpu/endian_little.go | 1 - cpu/proc_cpuinfo_linux.go | 1 - cpu/runtime_auxv_go121.go | 1 - cpu/runtime_auxv_go121_test.go | 1 - cpu/syscall_aix_gccgo.go | 1 - cpu/syscall_aix_ppc64_gc.go | 1 - execabs/execabs_go118.go | 1 - execabs/execabs_go119.go | 1 - go.mod | 2 +- plan9/mksyscall.go | 11 ++--------- plan9/pwd_go15_plan9.go | 1 - plan9/pwd_plan9.go | 1 - plan9/race.go | 1 - plan9/race0.go | 1 - plan9/str.go | 1 - plan9/syscall.go | 1 - plan9/syscall_test.go | 1 - plan9/zsyscall_plan9_386.go | 1 - plan9/zsyscall_plan9_amd64.go | 1 - plan9/zsyscall_plan9_arm.go | 1 - unix/aliases.go | 2 -- unix/asm_aix_ppc64.s | 1 - unix/asm_bsd_386.s | 2 -- unix/asm_bsd_amd64.s | 2 -- unix/asm_bsd_arm.s | 2 -- unix/asm_bsd_arm64.s | 2 -- unix/asm_bsd_ppc64.s | 2 -- unix/asm_bsd_riscv64.s | 2 -- unix/asm_linux_386.s | 1 - unix/asm_linux_amd64.s | 1 - unix/asm_linux_arm.s | 1 - unix/asm_linux_arm64.s | 3 --- unix/asm_linux_loong64.s | 3 --- unix/asm_linux_mips64x.s | 3 --- unix/asm_linux_mipsx.s | 3 --- unix/asm_linux_ppc64x.s | 3 --- unix/asm_linux_riscv64.s | 2 -- unix/asm_linux_s390x.s | 3 --- unix/asm_openbsd_mips64.s | 1 - unix/asm_solaris_amd64.s | 1 - unix/asm_zos_s390x.s | 3 --- unix/cap_freebsd.go | 1 - unix/constants.go | 1 - unix/creds_test.go | 1 - unix/darwin_amd64_test.go | 1 - unix/darwin_arm64_test.go | 1 - unix/darwin_test.go | 1 - unix/dev_aix_ppc.go | 1 - unix/dev_aix_ppc64.go | 1 - unix/dev_linux_test.go | 1 - unix/dev_zos.go | 1 - unix/dev_zos_test.go | 1 - unix/dirent.go | 1 - unix/dirent_test.go | 1 - unix/dup3_test.go | 1 - unix/endian_big.go | 1 - unix/endian_little.go | 1 - unix/env_unix.go | 1 - unix/epoll_zos.go | 1 - unix/epoll_zos_test.go | 1 - unix/example_exec_test.go | 1 - unix/example_flock_test.go | 1 - unix/example_sysvshm_test.go | 1 - unix/export_mremap_test.go | 1 - unix/fcntl.go | 1 - unix/fcntl_linux_32bit.go | 1 - unix/fdset.go | 1 - unix/fdset_test.go | 1 - unix/fstatfs_zos.go | 1 - unix/fstatfs_zos_test.go | 1 - unix/gccgo.go | 1 - unix/gccgo_c.c | 1 - unix/gccgo_linux_amd64.go | 1 - unix/getdirentries_test.go | 1 - unix/getfsstat_test.go | 1 - unix/ifreq_linux.go | 1 - unix/ifreq_linux_test.go | 1 - unix/internal/mkmerge/mkmerge.go | 11 +++++++++-- unix/internal/mkmerge/mkmerge_test.go | 4 +--- unix/ioctl_signed.go | 1 - unix/ioctl_unsigned.go | 1 - unix/ioctl_zos.go | 1 - unix/linux/mkall.go | 9 +-------- unix/linux/mksysnum.go | 9 +-------- unix/linux/types.go | 1 - unix/mkasm.go | 2 -- unix/mkerrors.sh | 1 - unix/mkpost.go | 4 +--- unix/mksyscall.go | 9 +-------- unix/mksyscall_aix_ppc.go | 9 +-------- unix/mksyscall_aix_ppc64.go | 15 +++------------ unix/mksyscall_solaris.go | 9 +-------- unix/mksysctl_openbsd.go | 9 +-------- unix/mksysnum.go | 9 +-------- unix/mmap_nomremap.go | 1 - unix/mmap_unix_test.go | 1 - unix/mmap_zos_test.go | 1 - unix/mremap.go | 1 - unix/mremap_test.go | 1 - unix/openbsd_test.go | 1 - unix/pagesize_unix.go | 1 - unix/pipe2_test.go | 1 - unix/ptrace_darwin.go | 1 - unix/ptrace_ios.go | 1 - unix/race.go | 1 - unix/race0.go | 1 - unix/readdirent_getdents.go | 1 - unix/readdirent_getdirentries.go | 1 - unix/sendfile_test.go | 1 - unix/sockcmsg_unix.go | 1 - unix/sockcmsg_unix_other.go | 1 - unix/syscall.go | 1 - unix/syscall_aix.go | 1 - unix/syscall_aix_ppc.go | 1 - unix/syscall_aix_ppc64.go | 1 - unix/syscall_aix_test.go | 1 - unix/syscall_bsd.go | 1 - unix/syscall_bsd_test.go | 1 - unix/syscall_darwin_amd64.go | 1 - unix/syscall_darwin_arm64.go | 1 - unix/syscall_darwin_libSystem.go | 1 - unix/syscall_dragonfly_amd64.go | 1 - unix/syscall_freebsd_386.go | 1 - unix/syscall_freebsd_amd64.go | 1 - unix/syscall_freebsd_arm.go | 1 - unix/syscall_freebsd_arm64.go | 1 - unix/syscall_freebsd_riscv64.go | 1 - unix/syscall_freebsd_test.go | 1 - unix/syscall_hurd.go | 1 - unix/syscall_hurd_386.go | 1 - unix/syscall_illumos.go | 1 - unix/syscall_internal_bsd_test.go | 1 - unix/syscall_internal_linux_test.go | 1 - unix/syscall_internal_solaris_test.go | 1 - unix/syscall_linux_386.go | 1 - unix/syscall_linux_alarm.go | 2 -- unix/syscall_linux_amd64.go | 1 - unix/syscall_linux_amd64_gc.go | 1 - unix/syscall_linux_arm.go | 1 - unix/syscall_linux_arm64.go | 1 - unix/syscall_linux_gc.go | 1 - unix/syscall_linux_gc_386.go | 1 - unix/syscall_linux_gc_arm.go | 1 - unix/syscall_linux_gccgo_386.go | 1 - unix/syscall_linux_gccgo_arm.go | 1 - unix/syscall_linux_loong64.go | 1 - unix/syscall_linux_mips64x.go | 2 -- unix/syscall_linux_mipsx.go | 2 -- unix/syscall_linux_ppc.go | 1 - unix/syscall_linux_ppc64x.go | 2 -- unix/syscall_linux_riscv64.go | 1 - unix/syscall_linux_s390x.go | 1 - unix/syscall_linux_sparc64.go | 1 - unix/syscall_linux_test.go | 1 - unix/syscall_netbsd_386.go | 1 - unix/syscall_netbsd_amd64.go | 1 - unix/syscall_netbsd_arm.go | 1 - unix/syscall_netbsd_arm64.go | 1 - unix/syscall_openbsd_386.go | 1 - unix/syscall_openbsd_amd64.go | 1 - unix/syscall_openbsd_arm.go | 1 - unix/syscall_openbsd_arm64.go | 1 - unix/syscall_openbsd_libc.go | 1 - unix/syscall_openbsd_ppc64.go | 1 - unix/syscall_openbsd_riscv64.go | 1 - unix/syscall_solaris_amd64.go | 1 - unix/syscall_solaris_test.go | 1 - unix/syscall_test.go | 1 - unix/syscall_unix.go | 1 - unix/syscall_unix_gc.go | 2 -- unix/syscall_unix_gc_ppc64x.go | 3 --- unix/syscall_unix_test.go | 1 - unix/syscall_zos_s390x.go | 1 - unix/syscall_zos_test.go | 1 - unix/sysvshm_linux.go | 1 - unix/sysvshm_unix.go | 1 - unix/sysvshm_unix_other.go | 1 - unix/sysvshm_unix_test.go | 1 - unix/timestruct.go | 1 - unix/timestruct_test.go | 1 - unix/types_aix.go | 1 - unix/types_darwin.go | 1 - unix/types_dragonfly.go | 1 - unix/types_freebsd.go | 1 - unix/types_netbsd.go | 1 - unix/types_openbsd.go | 1 - unix/types_solaris.go | 1 - unix/xattr_bsd.go | 1 - unix/xattr_test.go | 1 - unix/zerrors_aix_ppc.go | 1 - unix/zerrors_aix_ppc64.go | 1 - unix/zerrors_darwin_amd64.go | 1 - unix/zerrors_darwin_arm64.go | 1 - unix/zerrors_dragonfly_amd64.go | 1 - unix/zerrors_freebsd_386.go | 1 - unix/zerrors_freebsd_amd64.go | 1 - unix/zerrors_freebsd_arm.go | 1 - unix/zerrors_freebsd_arm64.go | 1 - unix/zerrors_freebsd_riscv64.go | 1 - unix/zerrors_linux.go | 1 - unix/zerrors_linux_386.go | 1 - unix/zerrors_linux_amd64.go | 1 - unix/zerrors_linux_arm.go | 1 - unix/zerrors_linux_arm64.go | 1 - unix/zerrors_linux_loong64.go | 1 - unix/zerrors_linux_mips.go | 1 - unix/zerrors_linux_mips64.go | 1 - unix/zerrors_linux_mips64le.go | 1 - unix/zerrors_linux_mipsle.go | 1 - unix/zerrors_linux_ppc.go | 1 - unix/zerrors_linux_ppc64.go | 1 - unix/zerrors_linux_ppc64le.go | 1 - unix/zerrors_linux_riscv64.go | 1 - unix/zerrors_linux_s390x.go | 1 - unix/zerrors_linux_sparc64.go | 1 - unix/zerrors_netbsd_386.go | 1 - unix/zerrors_netbsd_amd64.go | 1 - unix/zerrors_netbsd_arm.go | 1 - unix/zerrors_netbsd_arm64.go | 1 - unix/zerrors_openbsd_386.go | 1 - unix/zerrors_openbsd_amd64.go | 1 - unix/zerrors_openbsd_arm.go | 1 - unix/zerrors_openbsd_arm64.go | 1 - unix/zerrors_openbsd_mips64.go | 1 - unix/zerrors_openbsd_ppc64.go | 1 - unix/zerrors_openbsd_riscv64.go | 1 - unix/zerrors_solaris_amd64.go | 1 - unix/zerrors_zos_s390x.go | 1 - unix/zptrace_armnn_linux.go | 2 -- unix/zptrace_mipsnn_linux.go | 2 -- unix/zptrace_mipsnnle_linux.go | 2 -- unix/zptrace_x86_linux.go | 2 -- unix/zsyscall_aix_ppc.go | 1 - unix/zsyscall_aix_ppc64.go | 1 - unix/zsyscall_aix_ppc64_gc.go | 1 - unix/zsyscall_aix_ppc64_gccgo.go | 1 - unix/zsyscall_darwin_amd64.go | 1 - unix/zsyscall_darwin_arm64.go | 1 - unix/zsyscall_dragonfly_amd64.go | 1 - unix/zsyscall_freebsd_386.go | 1 - unix/zsyscall_freebsd_amd64.go | 1 - unix/zsyscall_freebsd_arm.go | 1 - unix/zsyscall_freebsd_arm64.go | 1 - unix/zsyscall_freebsd_riscv64.go | 1 - unix/zsyscall_illumos_amd64.go | 1 - unix/zsyscall_linux.go | 1 - unix/zsyscall_linux_386.go | 1 - unix/zsyscall_linux_amd64.go | 1 - unix/zsyscall_linux_arm.go | 1 - unix/zsyscall_linux_arm64.go | 1 - unix/zsyscall_linux_loong64.go | 1 - unix/zsyscall_linux_mips.go | 1 - unix/zsyscall_linux_mips64.go | 1 - unix/zsyscall_linux_mips64le.go | 1 - unix/zsyscall_linux_mipsle.go | 1 - unix/zsyscall_linux_ppc.go | 1 - unix/zsyscall_linux_ppc64.go | 1 - unix/zsyscall_linux_ppc64le.go | 1 - unix/zsyscall_linux_riscv64.go | 1 - unix/zsyscall_linux_s390x.go | 1 - unix/zsyscall_linux_sparc64.go | 1 - unix/zsyscall_netbsd_386.go | 1 - unix/zsyscall_netbsd_amd64.go | 1 - unix/zsyscall_netbsd_arm.go | 1 - unix/zsyscall_netbsd_arm64.go | 1 - unix/zsyscall_openbsd_386.go | 1 - unix/zsyscall_openbsd_amd64.go | 1 - unix/zsyscall_openbsd_arm.go | 1 - unix/zsyscall_openbsd_arm64.go | 1 - unix/zsyscall_openbsd_mips64.go | 1 - unix/zsyscall_openbsd_ppc64.go | 1 - unix/zsyscall_openbsd_riscv64.go | 1 - unix/zsyscall_solaris_amd64.go | 1 - unix/zsyscall_zos_s390x.go | 1 - unix/zsysctl_openbsd_386.go | 1 - unix/zsysctl_openbsd_amd64.go | 1 - unix/zsysctl_openbsd_arm.go | 1 - unix/zsysctl_openbsd_arm64.go | 1 - unix/zsysctl_openbsd_mips64.go | 1 - unix/zsysctl_openbsd_ppc64.go | 1 - unix/zsysctl_openbsd_riscv64.go | 1 - unix/zsysnum_darwin_amd64.go | 1 - unix/zsysnum_darwin_arm64.go | 1 - unix/zsysnum_dragonfly_amd64.go | 1 - unix/zsysnum_freebsd_386.go | 1 - unix/zsysnum_freebsd_amd64.go | 1 - unix/zsysnum_freebsd_arm.go | 1 - unix/zsysnum_freebsd_arm64.go | 1 - unix/zsysnum_freebsd_riscv64.go | 1 - unix/zsysnum_linux_386.go | 1 - unix/zsysnum_linux_amd64.go | 1 - unix/zsysnum_linux_arm.go | 1 - unix/zsysnum_linux_arm64.go | 1 - unix/zsysnum_linux_loong64.go | 1 - unix/zsysnum_linux_mips.go | 1 - unix/zsysnum_linux_mips64.go | 1 - unix/zsysnum_linux_mips64le.go | 1 - unix/zsysnum_linux_mipsle.go | 1 - unix/zsysnum_linux_ppc.go | 1 - unix/zsysnum_linux_ppc64.go | 1 - unix/zsysnum_linux_ppc64le.go | 1 - unix/zsysnum_linux_riscv64.go | 1 - unix/zsysnum_linux_s390x.go | 1 - unix/zsysnum_linux_sparc64.go | 1 - unix/zsysnum_netbsd_386.go | 1 - unix/zsysnum_netbsd_amd64.go | 1 - unix/zsysnum_netbsd_arm.go | 1 - unix/zsysnum_netbsd_arm64.go | 1 - unix/zsysnum_openbsd_386.go | 1 - unix/zsysnum_openbsd_amd64.go | 1 - unix/zsysnum_openbsd_arm.go | 1 - unix/zsysnum_openbsd_arm64.go | 1 - unix/zsysnum_openbsd_mips64.go | 1 - unix/zsysnum_openbsd_ppc64.go | 1 - unix/zsysnum_openbsd_riscv64.go | 1 - unix/zsysnum_zos_s390x.go | 1 - unix/ztypes_aix_ppc.go | 1 - unix/ztypes_aix_ppc64.go | 1 - unix/ztypes_darwin_amd64.go | 1 - unix/ztypes_darwin_arm64.go | 1 - unix/ztypes_dragonfly_amd64.go | 1 - unix/ztypes_freebsd_386.go | 1 - unix/ztypes_freebsd_amd64.go | 1 - unix/ztypes_freebsd_arm.go | 1 - unix/ztypes_freebsd_arm64.go | 1 - unix/ztypes_freebsd_riscv64.go | 1 - unix/ztypes_linux.go | 1 - unix/ztypes_linux_386.go | 1 - unix/ztypes_linux_amd64.go | 1 - unix/ztypes_linux_arm.go | 1 - unix/ztypes_linux_arm64.go | 1 - unix/ztypes_linux_loong64.go | 1 - unix/ztypes_linux_mips.go | 1 - unix/ztypes_linux_mips64.go | 1 - unix/ztypes_linux_mips64le.go | 1 - unix/ztypes_linux_mipsle.go | 1 - unix/ztypes_linux_ppc.go | 1 - unix/ztypes_linux_ppc64.go | 1 - unix/ztypes_linux_ppc64le.go | 1 - unix/ztypes_linux_riscv64.go | 1 - unix/ztypes_linux_s390x.go | 1 - unix/ztypes_linux_sparc64.go | 1 - unix/ztypes_netbsd_386.go | 1 - unix/ztypes_netbsd_amd64.go | 1 - unix/ztypes_netbsd_arm.go | 1 - unix/ztypes_netbsd_arm64.go | 1 - unix/ztypes_openbsd_386.go | 1 - unix/ztypes_openbsd_amd64.go | 1 - unix/ztypes_openbsd_arm.go | 1 - unix/ztypes_openbsd_arm64.go | 1 - unix/ztypes_openbsd_mips64.go | 1 - unix/ztypes_openbsd_ppc64.go | 1 - unix/ztypes_openbsd_riscv64.go | 1 - unix/ztypes_solaris_amd64.go | 1 - unix/ztypes_zos_s390x.go | 1 - windows/aliases.go | 1 - windows/empty.s | 1 - windows/eventlog.go | 1 - windows/mksyscall.go | 1 - windows/race.go | 1 - windows/race0.go | 1 - windows/registry/export_test.go | 1 - windows/registry/key.go | 1 - windows/registry/mksyscall.go | 1 - windows/registry/registry_test.go | 1 - windows/registry/syscall.go | 1 - windows/registry/value.go | 1 - windows/service.go | 1 - windows/str.go | 1 - windows/svc/debug/log.go | 1 - windows/svc/debug/service.go | 1 - windows/svc/eventlog/install.go | 1 - windows/svc/eventlog/log.go | 1 - windows/svc/eventlog/log_test.go | 1 - windows/svc/example/beep.go | 1 - windows/svc/example/install.go | 1 - windows/svc/example/main.go | 1 - windows/svc/example/manage.go | 1 - windows/svc/example/service.go | 1 - windows/svc/mgr/config.go | 1 - windows/svc/mgr/mgr.go | 1 - windows/svc/mgr/mgr_test.go | 1 - windows/svc/mgr/recovery.go | 1 - windows/svc/mgr/service.go | 1 - windows/svc/security.go | 1 - windows/svc/service.go | 1 - windows/svc/svc_test.go | 1 - windows/syscall.go | 1 - windows/syscall_test.go | 1 - 418 files changed, 24 insertions(+), 534 deletions(-) diff --git a/cpu/asm_aix_ppc64.s b/cpu/asm_aix_ppc64.s index db9171c2e4..269e173ca4 100644 --- a/cpu/asm_aix_ppc64.s +++ b/cpu/asm_aix_ppc64.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc #include "textflag.h" diff --git a/cpu/cpu_aix.go b/cpu/cpu_aix.go index 8aaeef545a..9bf0c32eb6 100644 --- a/cpu/cpu_aix.go +++ b/cpu/cpu_aix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix -// +build aix package cpu diff --git a/cpu/cpu_arm64.s b/cpu/cpu_arm64.s index c61f95a05a..fcb9a38882 100644 --- a/cpu/cpu_arm64.s +++ b/cpu/cpu_arm64.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc #include "textflag.h" diff --git a/cpu/cpu_gc_arm64.go b/cpu/cpu_gc_arm64.go index ccf542a73d..a8acd3e328 100644 --- a/cpu/cpu_gc_arm64.go +++ b/cpu/cpu_gc_arm64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc package cpu diff --git a/cpu/cpu_gc_s390x.go b/cpu/cpu_gc_s390x.go index 0af2f24841..c8ae6ddc15 100644 --- a/cpu/cpu_gc_s390x.go +++ b/cpu/cpu_gc_s390x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc package cpu diff --git a/cpu/cpu_gc_x86.go b/cpu/cpu_gc_x86.go index fa7cdb9bcd..910728fb16 100644 --- a/cpu/cpu_gc_x86.go +++ b/cpu/cpu_gc_x86.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (386 || amd64 || amd64p32) && gc -// +build 386 amd64 amd64p32 -// +build gc package cpu diff --git a/cpu/cpu_gccgo_arm64.go b/cpu/cpu_gccgo_arm64.go index 2aff318911..7f1946780b 100644 --- a/cpu/cpu_gccgo_arm64.go +++ b/cpu/cpu_gccgo_arm64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gccgo -// +build gccgo package cpu diff --git a/cpu/cpu_gccgo_s390x.go b/cpu/cpu_gccgo_s390x.go index 4bfbda6199..9526d2ce3a 100644 --- a/cpu/cpu_gccgo_s390x.go +++ b/cpu/cpu_gccgo_s390x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gccgo -// +build gccgo package cpu diff --git a/cpu/cpu_gccgo_x86.c b/cpu/cpu_gccgo_x86.c index 6cc73109f5..3f73a05dcf 100644 --- a/cpu/cpu_gccgo_x86.c +++ b/cpu/cpu_gccgo_x86.c @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (386 || amd64 || amd64p32) && gccgo -// +build 386 amd64 amd64p32 -// +build gccgo #include #include diff --git a/cpu/cpu_gccgo_x86.go b/cpu/cpu_gccgo_x86.go index 863d415ab4..99c60fe9f9 100644 --- a/cpu/cpu_gccgo_x86.go +++ b/cpu/cpu_gccgo_x86.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (386 || amd64 || amd64p32) && gccgo -// +build 386 amd64 amd64p32 -// +build gccgo package cpu diff --git a/cpu/cpu_linux.go b/cpu/cpu_linux.go index 159a686f6f..743eb54354 100644 --- a/cpu/cpu_linux.go +++ b/cpu/cpu_linux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !386 && !amd64 && !amd64p32 && !arm64 -// +build !386,!amd64,!amd64p32,!arm64 package cpu diff --git a/cpu/cpu_linux_mips64x.go b/cpu/cpu_linux_mips64x.go index 6000db4cdd..4686c1d541 100644 --- a/cpu/cpu_linux_mips64x.go +++ b/cpu/cpu_linux_mips64x.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (mips64 || mips64le) -// +build linux -// +build mips64 mips64le package cpu diff --git a/cpu/cpu_linux_noinit.go b/cpu/cpu_linux_noinit.go index f4992b1a59..cd63e73355 100644 --- a/cpu/cpu_linux_noinit.go +++ b/cpu/cpu_linux_noinit.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x -// +build linux,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le,!s390x package cpu diff --git a/cpu/cpu_linux_ppc64x.go b/cpu/cpu_linux_ppc64x.go index 021356d6de..197188e67f 100644 --- a/cpu/cpu_linux_ppc64x.go +++ b/cpu/cpu_linux_ppc64x.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (ppc64 || ppc64le) -// +build linux -// +build ppc64 ppc64le package cpu diff --git a/cpu/cpu_loong64.go b/cpu/cpu_loong64.go index 0f57b05bdb..558635850c 100644 --- a/cpu/cpu_loong64.go +++ b/cpu/cpu_loong64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build loong64 -// +build loong64 package cpu diff --git a/cpu/cpu_mips64x.go b/cpu/cpu_mips64x.go index f4063c6642..fedb00cc4c 100644 --- a/cpu/cpu_mips64x.go +++ b/cpu/cpu_mips64x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build mips64 || mips64le -// +build mips64 mips64le package cpu diff --git a/cpu/cpu_mipsx.go b/cpu/cpu_mipsx.go index 07c4e36d8f..ffb4ec7eb3 100644 --- a/cpu/cpu_mipsx.go +++ b/cpu/cpu_mipsx.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build mips || mipsle -// +build mips mipsle package cpu diff --git a/cpu/cpu_other_arm.go b/cpu/cpu_other_arm.go index d7b4fb4ccc..e9ecf2a456 100644 --- a/cpu/cpu_other_arm.go +++ b/cpu/cpu_other_arm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux && arm -// +build !linux,arm package cpu diff --git a/cpu/cpu_other_arm64.go b/cpu/cpu_other_arm64.go index f3cde129b6..5341e7f88d 100644 --- a/cpu/cpu_other_arm64.go +++ b/cpu/cpu_other_arm64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux && !netbsd && !openbsd && arm64 -// +build !linux,!netbsd,!openbsd,arm64 package cpu diff --git a/cpu/cpu_other_mips64x.go b/cpu/cpu_other_mips64x.go index 0dafe9644a..5f8f2419ab 100644 --- a/cpu/cpu_other_mips64x.go +++ b/cpu/cpu_other_mips64x.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux && (mips64 || mips64le) -// +build !linux -// +build mips64 mips64le package cpu diff --git a/cpu/cpu_other_ppc64x.go b/cpu/cpu_other_ppc64x.go index 060d46b6ea..89608fba27 100644 --- a/cpu/cpu_other_ppc64x.go +++ b/cpu/cpu_other_ppc64x.go @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build !aix && !linux && (ppc64 || ppc64le) -// +build !aix -// +build !linux -// +build ppc64 ppc64le package cpu diff --git a/cpu/cpu_other_riscv64.go b/cpu/cpu_other_riscv64.go index dd10eb79fe..5ab87808f7 100644 --- a/cpu/cpu_other_riscv64.go +++ b/cpu/cpu_other_riscv64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux && riscv64 -// +build !linux,riscv64 package cpu diff --git a/cpu/cpu_ppc64x.go b/cpu/cpu_ppc64x.go index 4e8acd1658..c14f12b149 100644 --- a/cpu/cpu_ppc64x.go +++ b/cpu/cpu_ppc64x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ppc64 || ppc64le -// +build ppc64 ppc64le package cpu diff --git a/cpu/cpu_riscv64.go b/cpu/cpu_riscv64.go index ff7da60eb8..7f0c79c004 100644 --- a/cpu/cpu_riscv64.go +++ b/cpu/cpu_riscv64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build riscv64 -// +build riscv64 package cpu diff --git a/cpu/cpu_s390x.s b/cpu/cpu_s390x.s index 96f81e2097..1fb4b70133 100644 --- a/cpu/cpu_s390x.s +++ b/cpu/cpu_s390x.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc #include "textflag.h" diff --git a/cpu/cpu_wasm.go b/cpu/cpu_wasm.go index 7747d888a6..384787ea30 100644 --- a/cpu/cpu_wasm.go +++ b/cpu/cpu_wasm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build wasm -// +build wasm package cpu diff --git a/cpu/cpu_x86.go b/cpu/cpu_x86.go index 2dcde8285d..c29f5e4c5a 100644 --- a/cpu/cpu_x86.go +++ b/cpu/cpu_x86.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build 386 || amd64 || amd64p32 -// +build 386 amd64 amd64p32 package cpu diff --git a/cpu/cpu_x86.s b/cpu/cpu_x86.s index 39acab2ff5..7d7ba33efb 100644 --- a/cpu/cpu_x86.s +++ b/cpu/cpu_x86.s @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (386 || amd64 || amd64p32) && gc -// +build 386 amd64 amd64p32 -// +build gc #include "textflag.h" diff --git a/cpu/endian_big.go b/cpu/endian_big.go index 93ce03a346..7fe04b0a13 100644 --- a/cpu/endian_big.go +++ b/cpu/endian_big.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 -// +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64 package cpu diff --git a/cpu/endian_little.go b/cpu/endian_little.go index 55db853efb..48eccc4c79 100644 --- a/cpu/endian_little.go +++ b/cpu/endian_little.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh || wasm -// +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh wasm package cpu diff --git a/cpu/proc_cpuinfo_linux.go b/cpu/proc_cpuinfo_linux.go index d87bd6b3eb..4cd64c7042 100644 --- a/cpu/proc_cpuinfo_linux.go +++ b/cpu/proc_cpuinfo_linux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && arm64 -// +build linux,arm64 package cpu diff --git a/cpu/runtime_auxv_go121.go b/cpu/runtime_auxv_go121.go index b975ea2a04..4c9788ea8e 100644 --- a/cpu/runtime_auxv_go121.go +++ b/cpu/runtime_auxv_go121.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.21 -// +build go1.21 package cpu diff --git a/cpu/runtime_auxv_go121_test.go b/cpu/runtime_auxv_go121_test.go index ac806b4f6b..2afe767bd2 100644 --- a/cpu/runtime_auxv_go121_test.go +++ b/cpu/runtime_auxv_go121_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.21 -// +build go1.21 package cpu diff --git a/cpu/syscall_aix_gccgo.go b/cpu/syscall_aix_gccgo.go index 96134157a1..1b9ccb091a 100644 --- a/cpu/syscall_aix_gccgo.go +++ b/cpu/syscall_aix_gccgo.go @@ -9,7 +9,6 @@ // gccgo's libgo and thus must not used a CGo method. //go:build aix && gccgo -// +build aix,gccgo package cpu diff --git a/cpu/syscall_aix_ppc64_gc.go b/cpu/syscall_aix_ppc64_gc.go index 904be42ffd..e8b6cdbe9a 100644 --- a/cpu/syscall_aix_ppc64_gc.go +++ b/cpu/syscall_aix_ppc64_gc.go @@ -7,7 +7,6 @@ // (See golang.org/issue/32102) //go:build aix && ppc64 && gc -// +build aix,ppc64,gc package cpu diff --git a/execabs/execabs_go118.go b/execabs/execabs_go118.go index 2000064a81..5627d70e39 100644 --- a/execabs/execabs_go118.go +++ b/execabs/execabs_go118.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !go1.19 -// +build !go1.19 package execabs diff --git a/execabs/execabs_go119.go b/execabs/execabs_go119.go index f364b34189..d60ab1b419 100644 --- a/execabs/execabs_go119.go +++ b/execabs/execabs_go119.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.19 -// +build go1.19 package execabs diff --git a/go.mod b/go.mod index 29eb4d22f8..9e1e4d59be 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module golang.org/x/sys -go 1.17 +go 1.18 diff --git a/plan9/mksyscall.go b/plan9/mksyscall.go index d7a481fb01..fd04cbb68d 100644 --- a/plan9/mksyscall.go +++ b/plan9/mksyscall.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore /* This program reads a file containing function prototypes @@ -55,11 +54,6 @@ func goBuildTags() string { return strings.ReplaceAll(*tags, ",", " && ") } -// buildTags returns build tags in the +build format. -func buildTags() string { - return *tags -} - // Param is function parameter type Param struct { Name string @@ -123,7 +117,7 @@ func main() { } libc := false - if goos == "darwin" && strings.Contains(buildTags(), ",go1.12") { + if goos == "darwin" && strings.Contains(goBuildTags(), " && go1.12") { libc = true } trampolines := map[string]bool{} @@ -383,14 +377,13 @@ func main() { } file.Close() } - fmt.Printf(srcTemplate, cmdLine(), goBuildTags(), plusBuildTags(), text) + fmt.Printf(srcTemplate, cmdLine(), goBuildTags(), text) } const srcTemplate = `// %s // Code generated by the command above; see README.md. DO NOT EDIT. //go:build %s -// +build %s package plan9 diff --git a/plan9/pwd_go15_plan9.go b/plan9/pwd_go15_plan9.go index c9b69937a0..73687de748 100644 --- a/plan9/pwd_go15_plan9.go +++ b/plan9/pwd_go15_plan9.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.5 -// +build go1.5 package plan9 diff --git a/plan9/pwd_plan9.go b/plan9/pwd_plan9.go index 98bf56b732..fb94582184 100644 --- a/plan9/pwd_plan9.go +++ b/plan9/pwd_plan9.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !go1.5 -// +build !go1.5 package plan9 diff --git a/plan9/race.go b/plan9/race.go index 62377d2ff9..c02d9ed333 100644 --- a/plan9/race.go +++ b/plan9/race.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build plan9 && race -// +build plan9,race package plan9 diff --git a/plan9/race0.go b/plan9/race0.go index f8da30876d..7b15e15f65 100644 --- a/plan9/race0.go +++ b/plan9/race0.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build plan9 && !race -// +build plan9,!race package plan9 diff --git a/plan9/str.go b/plan9/str.go index 55fa8d025e..ba3e8ff8a6 100644 --- a/plan9/str.go +++ b/plan9/str.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build plan9 -// +build plan9 package plan9 diff --git a/plan9/syscall.go b/plan9/syscall.go index 67e5b0115c..d631fd664a 100644 --- a/plan9/syscall.go +++ b/plan9/syscall.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build plan9 -// +build plan9 // Package plan9 contains an interface to the low-level operating system // primitives. OS details vary depending on the underlying system, and diff --git a/plan9/syscall_test.go b/plan9/syscall_test.go index 50b4f68558..d030eb5489 100644 --- a/plan9/syscall_test.go +++ b/plan9/syscall_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build plan9 -// +build plan9 package plan9_test diff --git a/plan9/zsyscall_plan9_386.go b/plan9/zsyscall_plan9_386.go index 3f40b9bd74..f780d5c807 100644 --- a/plan9/zsyscall_plan9_386.go +++ b/plan9/zsyscall_plan9_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build plan9 && 386 -// +build plan9,386 package plan9 diff --git a/plan9/zsyscall_plan9_amd64.go b/plan9/zsyscall_plan9_amd64.go index 0e6a96aa4f..7de61065f6 100644 --- a/plan9/zsyscall_plan9_amd64.go +++ b/plan9/zsyscall_plan9_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build plan9 && amd64 -// +build plan9,amd64 package plan9 diff --git a/plan9/zsyscall_plan9_arm.go b/plan9/zsyscall_plan9_arm.go index 244c501b77..ea85780f03 100644 --- a/plan9/zsyscall_plan9_arm.go +++ b/plan9/zsyscall_plan9_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build plan9 && arm -// +build plan9,arm package plan9 diff --git a/unix/aliases.go b/unix/aliases.go index abc89c104a..e7d3df4bd3 100644 --- a/unix/aliases.go +++ b/unix/aliases.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) && go1.9 -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos -// +build go1.9 package unix diff --git a/unix/asm_aix_ppc64.s b/unix/asm_aix_ppc64.s index db9171c2e4..269e173ca4 100644 --- a/unix/asm_aix_ppc64.s +++ b/unix/asm_aix_ppc64.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc #include "textflag.h" diff --git a/unix/asm_bsd_386.s b/unix/asm_bsd_386.s index e0fcd9b3de..a4fcef0e0d 100644 --- a/unix/asm_bsd_386.s +++ b/unix/asm_bsd_386.s @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (freebsd || netbsd || openbsd) && gc -// +build freebsd netbsd openbsd -// +build gc #include "textflag.h" diff --git a/unix/asm_bsd_amd64.s b/unix/asm_bsd_amd64.s index 2b99c349a2..1e63615c57 100644 --- a/unix/asm_bsd_amd64.s +++ b/unix/asm_bsd_amd64.s @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc -// +build darwin dragonfly freebsd netbsd openbsd -// +build gc #include "textflag.h" diff --git a/unix/asm_bsd_arm.s b/unix/asm_bsd_arm.s index d702d4adc7..6496c31008 100644 --- a/unix/asm_bsd_arm.s +++ b/unix/asm_bsd_arm.s @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (freebsd || netbsd || openbsd) && gc -// +build freebsd netbsd openbsd -// +build gc #include "textflag.h" diff --git a/unix/asm_bsd_arm64.s b/unix/asm_bsd_arm64.s index fe36a7391a..4fd1f54daa 100644 --- a/unix/asm_bsd_arm64.s +++ b/unix/asm_bsd_arm64.s @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin || freebsd || netbsd || openbsd) && gc -// +build darwin freebsd netbsd openbsd -// +build gc #include "textflag.h" diff --git a/unix/asm_bsd_ppc64.s b/unix/asm_bsd_ppc64.s index e5b9a84899..42f7eb9e47 100644 --- a/unix/asm_bsd_ppc64.s +++ b/unix/asm_bsd_ppc64.s @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin || freebsd || netbsd || openbsd) && gc -// +build darwin freebsd netbsd openbsd -// +build gc #include "textflag.h" diff --git a/unix/asm_bsd_riscv64.s b/unix/asm_bsd_riscv64.s index d560019ea2..f8902667e9 100644 --- a/unix/asm_bsd_riscv64.s +++ b/unix/asm_bsd_riscv64.s @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin || freebsd || netbsd || openbsd) && gc -// +build darwin freebsd netbsd openbsd -// +build gc #include "textflag.h" diff --git a/unix/asm_linux_386.s b/unix/asm_linux_386.s index 8fd101d071..3b4734870d 100644 --- a/unix/asm_linux_386.s +++ b/unix/asm_linux_386.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc #include "textflag.h" diff --git a/unix/asm_linux_amd64.s b/unix/asm_linux_amd64.s index 7ed38e43c6..67e29f3178 100644 --- a/unix/asm_linux_amd64.s +++ b/unix/asm_linux_amd64.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc #include "textflag.h" diff --git a/unix/asm_linux_arm.s b/unix/asm_linux_arm.s index 8ef1d51402..d6ae269ce1 100644 --- a/unix/asm_linux_arm.s +++ b/unix/asm_linux_arm.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc #include "textflag.h" diff --git a/unix/asm_linux_arm64.s b/unix/asm_linux_arm64.s index 98ae02760d..01e5e253c6 100644 --- a/unix/asm_linux_arm64.s +++ b/unix/asm_linux_arm64.s @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && arm64 && gc -// +build linux -// +build arm64 -// +build gc #include "textflag.h" diff --git a/unix/asm_linux_loong64.s b/unix/asm_linux_loong64.s index 565357288a..2abf12f6e8 100644 --- a/unix/asm_linux_loong64.s +++ b/unix/asm_linux_loong64.s @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && loong64 && gc -// +build linux -// +build loong64 -// +build gc #include "textflag.h" diff --git a/unix/asm_linux_mips64x.s b/unix/asm_linux_mips64x.s index 21231d2ce1..f84bae7120 100644 --- a/unix/asm_linux_mips64x.s +++ b/unix/asm_linux_mips64x.s @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (mips64 || mips64le) && gc -// +build linux -// +build mips64 mips64le -// +build gc #include "textflag.h" diff --git a/unix/asm_linux_mipsx.s b/unix/asm_linux_mipsx.s index 6783b26c60..f08f628077 100644 --- a/unix/asm_linux_mipsx.s +++ b/unix/asm_linux_mipsx.s @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (mips || mipsle) && gc -// +build linux -// +build mips mipsle -// +build gc #include "textflag.h" diff --git a/unix/asm_linux_ppc64x.s b/unix/asm_linux_ppc64x.s index 19d4989344..bdfc024d2d 100644 --- a/unix/asm_linux_ppc64x.s +++ b/unix/asm_linux_ppc64x.s @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (ppc64 || ppc64le) && gc -// +build linux -// +build ppc64 ppc64le -// +build gc #include "textflag.h" diff --git a/unix/asm_linux_riscv64.s b/unix/asm_linux_riscv64.s index e42eb81d58..2e8c996120 100644 --- a/unix/asm_linux_riscv64.s +++ b/unix/asm_linux_riscv64.s @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build riscv64 && gc -// +build riscv64 -// +build gc #include "textflag.h" diff --git a/unix/asm_linux_s390x.s b/unix/asm_linux_s390x.s index c46aab3395..2c394b11eb 100644 --- a/unix/asm_linux_s390x.s +++ b/unix/asm_linux_s390x.s @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && s390x && gc -// +build linux -// +build s390x -// +build gc #include "textflag.h" diff --git a/unix/asm_openbsd_mips64.s b/unix/asm_openbsd_mips64.s index 5e7a1169c0..fab586a2c4 100644 --- a/unix/asm_openbsd_mips64.s +++ b/unix/asm_openbsd_mips64.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc #include "textflag.h" diff --git a/unix/asm_solaris_amd64.s b/unix/asm_solaris_amd64.s index f8c5394c1a..f949ec5476 100644 --- a/unix/asm_solaris_amd64.s +++ b/unix/asm_solaris_amd64.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc #include "textflag.h" diff --git a/unix/asm_zos_s390x.s b/unix/asm_zos_s390x.s index 3b54e18581..2f67ba86d5 100644 --- a/unix/asm_zos_s390x.s +++ b/unix/asm_zos_s390x.s @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x && gc -// +build zos -// +build s390x -// +build gc #include "textflag.h" diff --git a/unix/cap_freebsd.go b/unix/cap_freebsd.go index 0b7c6adb86..a08657890f 100644 --- a/unix/cap_freebsd.go +++ b/unix/cap_freebsd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build freebsd -// +build freebsd package unix diff --git a/unix/constants.go b/unix/constants.go index 394a3965b6..6fb7cb77d0 100644 --- a/unix/constants.go +++ b/unix/constants.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package unix diff --git a/unix/creds_test.go b/unix/creds_test.go index 32d251fa57..e41aa01a95 100644 --- a/unix/creds_test.go +++ b/unix/creds_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package unix_test diff --git a/unix/darwin_amd64_test.go b/unix/darwin_amd64_test.go index 1b42017eab..b547a62871 100644 --- a/unix/darwin_amd64_test.go +++ b/unix/darwin_amd64_test.go @@ -2,7 +2,6 @@ // Code generated by the command above; DO NOT EDIT. //go:build darwin && go1.12 -// +build darwin,go1.12 package unix diff --git a/unix/darwin_arm64_test.go b/unix/darwin_arm64_test.go index d168bfc957..b0df8c7485 100644 --- a/unix/darwin_arm64_test.go +++ b/unix/darwin_arm64_test.go @@ -2,7 +2,6 @@ // Code generated by the command above; DO NOT EDIT. //go:build darwin && go1.12 -// +build darwin,go1.12 package unix diff --git a/unix/darwin_test.go b/unix/darwin_test.go index ef8af089b4..6f801f6c94 100644 --- a/unix/darwin_test.go +++ b/unix/darwin_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin && go1.12 -// +build darwin,go1.12 package unix diff --git a/unix/dev_aix_ppc.go b/unix/dev_aix_ppc.go index 65a998508d..d785134617 100644 --- a/unix/dev_aix_ppc.go +++ b/unix/dev_aix_ppc.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix && ppc -// +build aix,ppc // Functions to access/create device major and minor numbers matching the // encoding used by AIX. diff --git a/unix/dev_aix_ppc64.go b/unix/dev_aix_ppc64.go index 8fc08ad0aa..623a5e6973 100644 --- a/unix/dev_aix_ppc64.go +++ b/unix/dev_aix_ppc64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix && ppc64 -// +build aix,ppc64 // Functions to access/create device major and minor numbers matching the // encoding used AIX. diff --git a/unix/dev_linux_test.go b/unix/dev_linux_test.go index 2b3a9bd835..bf86fd0e6d 100644 --- a/unix/dev_linux_test.go +++ b/unix/dev_linux_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.7 -// +build go1.7 package unix_test diff --git a/unix/dev_zos.go b/unix/dev_zos.go index a388e59a0e..bb6a64fe92 100644 --- a/unix/dev_zos.go +++ b/unix/dev_zos.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x // Functions to access/create device major and minor numbers matching the // encoding used by z/OS. diff --git a/unix/dev_zos_test.go b/unix/dev_zos_test.go index d50eeba026..5fa18e98c1 100644 --- a/unix/dev_zos_test.go +++ b/unix/dev_zos_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x package unix_test diff --git a/unix/dirent.go b/unix/dirent.go index 2499f977b0..1ebf117826 100644 --- a/unix/dirent.go +++ b/unix/dirent.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package unix diff --git a/unix/dirent_test.go b/unix/dirent_test.go index df6d422fe4..c4911366d9 100644 --- a/unix/dirent_test.go +++ b/unix/dirent_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package unix_test diff --git a/unix/dup3_test.go b/unix/dup3_test.go index b932b3be49..9201e35580 100644 --- a/unix/dup3_test.go +++ b/unix/dup3_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build freebsd || linux || netbsd || openbsd -// +build freebsd linux netbsd openbsd package unix_test diff --git a/unix/endian_big.go b/unix/endian_big.go index a520265576..1095fd31d6 100644 --- a/unix/endian_big.go +++ b/unix/endian_big.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. // //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 -// +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64 package unix diff --git a/unix/endian_little.go b/unix/endian_little.go index b0f2bc4ae3..b9f0e277b1 100644 --- a/unix/endian_little.go +++ b/unix/endian_little.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. // //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh -// +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh package unix diff --git a/unix/env_unix.go b/unix/env_unix.go index 29ccc4d133..a96da71f47 100644 --- a/unix/env_unix.go +++ b/unix/env_unix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos // Unix environment variables. diff --git a/unix/epoll_zos.go b/unix/epoll_zos.go index cedaf7e024..7753fddea8 100644 --- a/unix/epoll_zos.go +++ b/unix/epoll_zos.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x package unix diff --git a/unix/epoll_zos_test.go b/unix/epoll_zos_test.go index 6d7ef6d769..1918604eef 100644 --- a/unix/epoll_zos_test.go +++ b/unix/epoll_zos_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x package unix_test diff --git a/unix/example_exec_test.go b/unix/example_exec_test.go index 4302b09fdf..660e0f2887 100644 --- a/unix/example_exec_test.go +++ b/unix/example_exec_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package unix_test diff --git a/unix/example_flock_test.go b/unix/example_flock_test.go index d2cc500bba..20cbe6de09 100644 --- a/unix/example_flock_test.go +++ b/unix/example_flock_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build darwin dragonfly freebsd linux netbsd openbsd solaris package unix_test diff --git a/unix/example_sysvshm_test.go b/unix/example_sysvshm_test.go index 66ef2edf73..6d2bee70ef 100644 --- a/unix/example_sysvshm_test.go +++ b/unix/example_sysvshm_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin && !ios) || (linux && !android) -// +build darwin,!ios linux,!android package unix_test diff --git a/unix/export_mremap_test.go b/unix/export_mremap_test.go index 1c235c2c3b..b3ec4d073a 100644 --- a/unix/export_mremap_test.go +++ b/unix/export_mremap_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || netbsd -// +build linux netbsd package unix diff --git a/unix/fcntl.go b/unix/fcntl.go index e9b991258c..58c6bfc70f 100644 --- a/unix/fcntl.go +++ b/unix/fcntl.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build dragonfly || freebsd || linux || netbsd || openbsd -// +build dragonfly freebsd linux netbsd openbsd package unix diff --git a/unix/fcntl_linux_32bit.go b/unix/fcntl_linux_32bit.go index 29d44808b1..13b4acd5c6 100644 --- a/unix/fcntl_linux_32bit.go +++ b/unix/fcntl_linux_32bit.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) -// +build linux,386 linux,arm linux,mips linux,mipsle linux,ppc package unix diff --git a/unix/fdset.go b/unix/fdset.go index a8068f94f2..9e83d18cd0 100644 --- a/unix/fdset.go +++ b/unix/fdset.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package unix diff --git a/unix/fdset_test.go b/unix/fdset_test.go index b10e6c9614..26d05c7a52 100644 --- a/unix/fdset_test.go +++ b/unix/fdset_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package unix_test diff --git a/unix/fstatfs_zos.go b/unix/fstatfs_zos.go index e377cc9f49..c8bde601e7 100644 --- a/unix/fstatfs_zos.go +++ b/unix/fstatfs_zos.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x package unix diff --git a/unix/fstatfs_zos_test.go b/unix/fstatfs_zos_test.go index 03899deb87..a0eb61641f 100644 --- a/unix/fstatfs_zos_test.go +++ b/unix/fstatfs_zos_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x package unix_test diff --git a/unix/gccgo.go b/unix/gccgo.go index b06f52d748..aca5721ddc 100644 --- a/unix/gccgo.go +++ b/unix/gccgo.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gccgo && !aix && !hurd -// +build gccgo,!aix,!hurd package unix diff --git a/unix/gccgo_c.c b/unix/gccgo_c.c index f98a1c542f..d468b7b47f 100644 --- a/unix/gccgo_c.c +++ b/unix/gccgo_c.c @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gccgo && !aix && !hurd -// +build gccgo,!aix,!hurd #include #include diff --git a/unix/gccgo_linux_amd64.go b/unix/gccgo_linux_amd64.go index e60e49a3d9..972d61bd75 100644 --- a/unix/gccgo_linux_amd64.go +++ b/unix/gccgo_linux_amd64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gccgo && linux && amd64 -// +build gccgo,linux,amd64 package unix diff --git a/unix/getdirentries_test.go b/unix/getdirentries_test.go index 023e6a1441..ca94a4cf8f 100644 --- a/unix/getdirentries_test.go +++ b/unix/getdirentries_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || dragonfly || freebsd || openbsd || netbsd || zos -// +build darwin dragonfly freebsd openbsd netbsd zos package unix_test diff --git a/unix/getfsstat_test.go b/unix/getfsstat_test.go index 3b5f9d159a..32e2725b5f 100644 --- a/unix/getfsstat_test.go +++ b/unix/getfsstat_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || dragonfly || freebsd || openbsd -// +build darwin dragonfly freebsd openbsd package unix_test diff --git a/unix/ifreq_linux.go b/unix/ifreq_linux.go index 15721a5104..848840ae4c 100644 --- a/unix/ifreq_linux.go +++ b/unix/ifreq_linux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package unix diff --git a/unix/ifreq_linux_test.go b/unix/ifreq_linux_test.go index b81a8b633f..f10040bdae 100644 --- a/unix/ifreq_linux_test.go +++ b/unix/ifreq_linux_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package unix diff --git a/unix/internal/mkmerge/mkmerge.go b/unix/internal/mkmerge/mkmerge.go index bb7462694c..db8098c7f0 100644 --- a/unix/internal/mkmerge/mkmerge.go +++ b/unix/internal/mkmerge/mkmerge.go @@ -282,7 +282,15 @@ func getCodeSet(src interface{}) (*codeSet, error) { // Add file level comments cmap := ast.NewCommentMap(fset, f, f.Comments) for _, cGrp := range cmap[f] { - set.add(codeElem{token.COMMENT, cGrp.Text()}) + text := cGrp.Text() + if text == "" && len(cGrp.List) == 1 && strings.HasPrefix(cGrp.List[0].Text, "//go:build ") { + // ast.CommentGroup.Text doesn't include comment directives like "//go:build" + // in the text. So if a comment group has empty text and a single //go:build + // constraint line, make a custom codeElem. This is enough for mkmerge needs. + set.add(codeElem{token.COMMENT, cGrp.List[0].Text[len("//"):] + "\n"}) + continue + } + set.add(codeElem{token.COMMENT, text}) } return set, nil @@ -465,7 +473,6 @@ func merge(mergedFile string, archFiles ...string) error { fmt.Fprintln(buf, "// Code generated by mkmerge; DO NOT EDIT.") fmt.Fprintln(buf) fmt.Fprintf(buf, "//go:build %s\n", goos) - fmt.Fprintf(buf, "// +build %s\n", goos) fmt.Fprintln(buf) buf.Write(mergedSrc) diff --git a/unix/internal/mkmerge/mkmerge_test.go b/unix/internal/mkmerge/mkmerge_test.go index e61d7d477b..2566dad9e0 100644 --- a/unix/internal/mkmerge/mkmerge_test.go +++ b/unix/internal/mkmerge/mkmerge_test.go @@ -100,7 +100,6 @@ func TestMerge(t *testing.T) { // build directives for arch{{.}} //go:build goos && arch{{.}} -// +build goos,arch{{.}} package main @@ -186,7 +185,6 @@ const ( // build directives for arch{{.}} //go:build goos && arch{{.}} -// +build goos,arch{{.}} package main @@ -317,7 +315,7 @@ const ( expectedElems := []codeElem{ {token.COMMENT, "Package comments\n"}, {token.COMMENT, "build directives for archA\n"}, - {token.COMMENT, "+build goos,archA\n"}, + {token.COMMENT, "go:build goos && archA\n"}, {token.CONST, `COMMON_INDEPENDENT = 1234`}, {token.CONST, `UNIQUE_INDEPENDENT_A = "UNIQUE_INDEPENDENT_A"`}, {token.CONST, `COMMON_GROUP = "COMMON_GROUP"`}, diff --git a/unix/ioctl_signed.go b/unix/ioctl_signed.go index 7def9580e6..5b0759bd86 100644 --- a/unix/ioctl_signed.go +++ b/unix/ioctl_signed.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || solaris -// +build aix solaris package unix diff --git a/unix/ioctl_unsigned.go b/unix/ioctl_unsigned.go index 649913d1ea..20f470b9d0 100644 --- a/unix/ioctl_unsigned.go +++ b/unix/ioctl_unsigned.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd -// +build darwin dragonfly freebsd hurd linux netbsd openbsd package unix diff --git a/unix/ioctl_zos.go b/unix/ioctl_zos.go index cdc21bf76d..c8b2a750f8 100644 --- a/unix/ioctl_zos.go +++ b/unix/ioctl_zos.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x package unix diff --git a/unix/linux/mkall.go b/unix/linux/mkall.go index e032013a3d..70d8cd8f2e 100644 --- a/unix/linux/mkall.go +++ b/unix/linux/mkall.go @@ -11,7 +11,6 @@ // go run linux/mkall.go //go:build ignore -// +build ignore package main @@ -629,11 +628,7 @@ func (t *target) matchesMksyscallFile(file string) (bool, error) { s := bufio.NewScanner(f) for s.Scan() { // Keep scanning until a valid constraint is found or we hit EOF. - // - // This only supports single-line constraints such as the //go:build - // convention used in Go 1.17+. Because the old //+build convention - // (which may have multiple lines of build tags) is being deprecated, - // we don't bother looking for multi-line constraints. + // This is sufficient for the single-line //go:build constraints. if expr, err = constraint.Parse(s.Text()); err == nil { found = true break @@ -752,8 +747,6 @@ func generatePtracePair(arch1, arch2, archName string) error { fmt.Fprintf(buf, "// Code generated by linux/mkall.go generatePtracePair(%q, %q). DO NOT EDIT.\n", arch1, arch2) fmt.Fprintf(buf, "\n") fmt.Fprintf(buf, "//go:build linux && (%s || %s)\n", arch1, arch2) - fmt.Fprintf(buf, "// +build linux\n") - fmt.Fprintf(buf, "// +build %s %s\n", arch1, arch2) fmt.Fprintf(buf, "\n") fmt.Fprintf(buf, "package unix\n") fmt.Fprintf(buf, "\n") diff --git a/unix/linux/mksysnum.go b/unix/linux/mksysnum.go index e1712cbe0a..be425325f9 100644 --- a/unix/linux/mksysnum.go +++ b/unix/linux/mksysnum.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore package main @@ -32,11 +31,6 @@ func goBuildTags() string { return fmt.Sprintf("%s && %s", goarch, goos) } -// plusBuildTags returns build tags in the +build format. -func plusBuildTags() string { - return fmt.Sprintf("%s,%s", goarch, goos) -} - func format(name string, num int, offset int) (int, string) { if num > 999 { // ignore deprecated syscalls that are no longer implemented @@ -186,14 +180,13 @@ func main() { for _, num := range nums { text.WriteString(num.declaration) } - fmt.Printf(template, cmdLine(), goBuildTags(), plusBuildTags(), text.String()) + fmt.Printf(template, cmdLine(), goBuildTags(), text.String()) } const template = `// %s // Code generated by the command above; see README.md. DO NOT EDIT. //go:build %s -// +build %s package unix diff --git a/unix/linux/types.go b/unix/linux/types.go index f5a6ae9e7b..dcf69cd051 100644 --- a/unix/linux/types.go +++ b/unix/linux/types.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore /* Input to cgo -godefs. See README.md diff --git a/unix/mkasm.go b/unix/mkasm.go index ade20808ea..9fd62822bf 100644 --- a/unix/mkasm.go +++ b/unix/mkasm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore // mkasm.go generates assembly trampolines to call library routines from Go. // This program must be run after mksyscall.go. @@ -82,7 +81,6 @@ const darwinTestTemplate = `// go run mkasm.go %s // Code generated by the command above; DO NOT EDIT. //go:build darwin && go1.12 -// +build darwin,go1.12 package unix diff --git a/unix/mkerrors.sh b/unix/mkerrors.sh index 47fa6a7ebd..cbe24150a7 100755 --- a/unix/mkerrors.sh +++ b/unix/mkerrors.sh @@ -663,7 +663,6 @@ echo '// mkerrors.sh' "$@" echo '// Code generated by the command above; see README.md. DO NOT EDIT.' echo echo "//go:build ${GOARCH} && ${GOOS}" -echo "// +build ${GOARCH},${GOOS}" echo go tool cgo -godefs -- "$@" _const.go >_error.out cat _error.out | grep -vf _error.grep | grep -vf _signal.grep diff --git a/unix/mkpost.go b/unix/mkpost.go index 928e276568..5dc2a2b92c 100644 --- a/unix/mkpost.go +++ b/unix/mkpost.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore // mkpost processes the output of cgo -godefs to // modify the generated types. It is used to clean up @@ -218,8 +217,7 @@ func main() { replacement := fmt.Sprintf(`$1 | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. -//go:build %s && %s -// +build %s,%s`, goarch, goos, goarch, goos) +//go:build %s && %s`, goarch, goos) cgoCommandRegex := regexp.MustCompile(`(cgo -godefs .*)`) b = cgoCommandRegex.ReplaceAll(b, []byte(replacement)) diff --git a/unix/mksyscall.go b/unix/mksyscall.go index ad2879e747..e606c2acea 100644 --- a/unix/mksyscall.go +++ b/unix/mksyscall.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore /* This program reads a file containing function prototypes @@ -58,11 +57,6 @@ func goBuildTags() string { return strings.ReplaceAll(*tags, ",", " && ") } -// plusBuildTags returns build tags in the +build format. -func plusBuildTags() string { - return *tags -} - // Param is function parameter type Param struct { Name string @@ -389,14 +383,13 @@ func main() { } file.Close() } - fmt.Printf(srcTemplate, cmdLine(), goBuildTags(), plusBuildTags(), text) + fmt.Printf(srcTemplate, cmdLine(), goBuildTags(), text) } const srcTemplate = `// %s // Code generated by the command above; see README.md. DO NOT EDIT. //go:build %s -// +build %s package unix diff --git a/unix/mksyscall_aix_ppc.go b/unix/mksyscall_aix_ppc.go index eec7dcd843..8cee4e7e28 100644 --- a/unix/mksyscall_aix_ppc.go +++ b/unix/mksyscall_aix_ppc.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore /* This program reads a file containing function prototypes @@ -48,11 +47,6 @@ func goBuildTags() string { return strings.ReplaceAll(*tags, ",", " && ") } -// plusBuildTags returns build tags in the +build format. -func plusBuildTags() string { - return *tags -} - // Param is function parameter type Param struct { Name string @@ -392,14 +386,13 @@ func main() { imp = "import \"golang.org/x/sys/unix\"\n" } - fmt.Printf(srcTemplate, cmdLine(), goBuildTags(), plusBuildTags(), pack, cExtern, imp, text) + fmt.Printf(srcTemplate, cmdLine(), goBuildTags(), pack, cExtern, imp, text) } const srcTemplate = `// %s // Code generated by the command above; see README.md. DO NOT EDIT. //go:build %s -// +build %s package %s diff --git a/unix/mksyscall_aix_ppc64.go b/unix/mksyscall_aix_ppc64.go index a6598ddc59..6cb2e642f0 100644 --- a/unix/mksyscall_aix_ppc64.go +++ b/unix/mksyscall_aix_ppc64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore /* This program reads a file containing function prototypes @@ -88,11 +87,6 @@ func goBuildTags() string { return strings.ReplaceAll(*tags, ",", " && ") } -// plusBuildTags returns build tags in the +build format. -func plusBuildTags() string { - return *tags -} - // Param is function parameter type Param struct { Name string @@ -525,7 +519,7 @@ func main() { // Print zsyscall_aix_ppc64.go err := os.WriteFile("zsyscall_aix_ppc64.go", - []byte(fmt.Sprintf(srcTemplate1, cmdLine(), goBuildTags(), plusBuildTags(), pack, imp, textcommon)), + []byte(fmt.Sprintf(srcTemplate1, cmdLine(), goBuildTags(), pack, imp, textcommon)), 0644) if err != nil { fmt.Fprintf(os.Stderr, err.Error()) @@ -536,7 +530,7 @@ func main() { vardecls := "\t" + strings.Join(vars, ",\n\t") vardecls += " syscallFunc" err = os.WriteFile("zsyscall_aix_ppc64_gc.go", - []byte(fmt.Sprintf(srcTemplate2, cmdLine(), goBuildTags(), plusBuildTags(), pack, imp, dynimports, linknames, vardecls, textgc)), + []byte(fmt.Sprintf(srcTemplate2, cmdLine(), goBuildTags(), pack, imp, dynimports, linknames, vardecls, textgc)), 0644) if err != nil { fmt.Fprintf(os.Stderr, err.Error()) @@ -545,7 +539,7 @@ func main() { // Print zsyscall_aix_ppc64_gccgo.go err = os.WriteFile("zsyscall_aix_ppc64_gccgo.go", - []byte(fmt.Sprintf(srcTemplate3, cmdLine(), goBuildTags(), plusBuildTags(), pack, cExtern, imp, textgccgo)), + []byte(fmt.Sprintf(srcTemplate3, cmdLine(), goBuildTags(), pack, cExtern, imp, textgccgo)), 0644) if err != nil { fmt.Fprintf(os.Stderr, err.Error()) @@ -557,7 +551,6 @@ const srcTemplate1 = `// %s // Code generated by the command above; see README.md. DO NOT EDIT. //go:build %s -// +build %s package %s @@ -574,7 +567,6 @@ const srcTemplate2 = `// %s // Code generated by the command above; see README.md. DO NOT EDIT. //go:build %s && gc -// +build %s,gc package %s @@ -600,7 +592,6 @@ const srcTemplate3 = `// %s // Code generated by the command above; see README.md. DO NOT EDIT. //go:build %s && gccgo -// +build %s,gccgo package %s diff --git a/unix/mksyscall_solaris.go b/unix/mksyscall_solaris.go index ba8e85c177..c633cf0848 100644 --- a/unix/mksyscall_solaris.go +++ b/unix/mksyscall_solaris.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore /* This program reads a file containing function prototypes @@ -49,11 +48,6 @@ func goBuildTags() string { return strings.ReplaceAll(*tags, ",", " && ") } -// plusBuildTags returns build tags in the +build format. -func plusBuildTags() string { - return *tags -} - // Param is function parameter type Param struct { Name string @@ -322,14 +316,13 @@ func main() { vardecls := "\t" + strings.Join(vars, ",\n\t") vardecls += " syscallFunc" - fmt.Printf(srcTemplate, cmdLine(), goBuildTags(), plusBuildTags(), pack, syscallimp, imp, dynimports, linknames, vardecls, text) + fmt.Printf(srcTemplate, cmdLine(), goBuildTags(), pack, syscallimp, imp, dynimports, linknames, vardecls, text) } const srcTemplate = `// %s // Code generated by the command above; see README.md. DO NOT EDIT. //go:build %s -// +build %s package %s diff --git a/unix/mksysctl_openbsd.go b/unix/mksysctl_openbsd.go index 3fde87eca5..80f3747eca 100644 --- a/unix/mksysctl_openbsd.go +++ b/unix/mksysctl_openbsd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore // Parse the header files for OpenBSD and generate a Go usable sysctl MIB. // @@ -37,11 +36,6 @@ func goBuildTags() string { return fmt.Sprintf("%s && %s", goarch, goos) } -// plusBuildTags returns build tags in the +build format. -func plusBuildTags() string { - return fmt.Sprintf("%s,%s", goarch, goos) -} - // reMatch performs regular expression match and stores the substring slice to value pointed by m. func reMatch(re *regexp.Regexp, str string, m *[]string) bool { *m = re.FindStringSubmatch(str) @@ -336,14 +330,13 @@ func main() { sort.Strings(sysCtl) text := strings.Join(sysCtl, "") - fmt.Printf(srcTemplate, cmdLine(), goBuildTags(), plusBuildTags(), text) + fmt.Printf(srcTemplate, cmdLine(), goBuildTags(), text) } const srcTemplate = `// %s // Code generated by the command above; DO NOT EDIT. //go:build %s -// +build %s package unix diff --git a/unix/mksysnum.go b/unix/mksysnum.go index 27368041ab..70fd43c3dd 100644 --- a/unix/mksysnum.go +++ b/unix/mksysnum.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore // Generate system call table for DragonFly, NetBSD, // FreeBSD or OpenBSD from master list (for example, @@ -34,11 +33,6 @@ func goBuildTags() string { return fmt.Sprintf("%s && %s", goarch, goos) } -// plusBuildTags returns build tags in the +build format. -func plusBuildTags() string { - return fmt.Sprintf("%s,%s", goarch, goos) -} - func checkErr(err error) { if err != nil { fmt.Fprintf(os.Stderr, "%v\n", err) @@ -182,14 +176,13 @@ func main() { err := s.Err() checkErr(err) - fmt.Printf(template, cmdLine(), goBuildTags(), plusBuildTags(), text) + fmt.Printf(template, cmdLine(), goBuildTags(), text) } const template = `// %s // Code generated by the command above; see README.md. DO NOT EDIT. //go:build %s -// +build %s package unix diff --git a/unix/mmap_nomremap.go b/unix/mmap_nomremap.go index ca0513632e..4b68e59780 100644 --- a/unix/mmap_nomremap.go +++ b/unix/mmap_nomremap.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris -// +build aix darwin dragonfly freebsd openbsd solaris package unix diff --git a/unix/mmap_unix_test.go b/unix/mmap_unix_test.go index d51f690e21..a60a0f62b9 100644 --- a/unix/mmap_unix_test.go +++ b/unix/mmap_unix_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package unix_test diff --git a/unix/mmap_zos_test.go b/unix/mmap_zos_test.go index 513cc5530e..1dc580ae8b 100644 --- a/unix/mmap_zos_test.go +++ b/unix/mmap_zos_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x // This test is based on mmap_unix_test, but tweaked for z/OS, which does not support memadvise // or anonymous mmapping. diff --git a/unix/mremap.go b/unix/mremap.go index fa93d0aa90..fd45fe529d 100644 --- a/unix/mremap.go +++ b/unix/mremap.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || netbsd -// +build linux netbsd package unix diff --git a/unix/mremap_test.go b/unix/mremap_test.go index 40d4f60dcf..e84104fc6a 100644 --- a/unix/mremap_test.go +++ b/unix/mremap_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || netbsd -// +build linux netbsd package unix_test diff --git a/unix/openbsd_test.go b/unix/openbsd_test.go index 4955943a80..8ca05245d7 100644 --- a/unix/openbsd_test.go +++ b/unix/openbsd_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build openbsd -// +build openbsd // This, on the face of it, bizarre testing mechanism is necessary because // the only reliable way to gauge whether or not a pledge(2) call has succeeded diff --git a/unix/pagesize_unix.go b/unix/pagesize_unix.go index 53f1b4c5b8..4d0a3430ed 100644 --- a/unix/pagesize_unix.go +++ b/unix/pagesize_unix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris // For Unix, get the pagesize from the runtime. diff --git a/unix/pipe2_test.go b/unix/pipe2_test.go index d2f50a1d27..74a43f06ad 100644 --- a/unix/pipe2_test.go +++ b/unix/pipe2_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build dragonfly freebsd linux netbsd openbsd solaris package unix_test diff --git a/unix/ptrace_darwin.go b/unix/ptrace_darwin.go index 463c3eff7f..3f0975f3de 100644 --- a/unix/ptrace_darwin.go +++ b/unix/ptrace_darwin.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin && !ios -// +build darwin,!ios package unix diff --git a/unix/ptrace_ios.go b/unix/ptrace_ios.go index ed0509a011..a4d35db5dc 100644 --- a/unix/ptrace_ios.go +++ b/unix/ptrace_ios.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ios -// +build ios package unix diff --git a/unix/race.go b/unix/race.go index 6f6c5fec5a..714d2aae7c 100644 --- a/unix/race.go +++ b/unix/race.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin && race) || (linux && race) || (freebsd && race) -// +build darwin,race linux,race freebsd,race package unix diff --git a/unix/race0.go b/unix/race0.go index 706e1322ae..4a9f6634c9 100644 --- a/unix/race0.go +++ b/unix/race0.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos -// +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly zos package unix diff --git a/unix/readdirent_getdents.go b/unix/readdirent_getdents.go index 4d6257569e..dbd2b6ccb1 100644 --- a/unix/readdirent_getdents.go +++ b/unix/readdirent_getdents.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd -// +build aix dragonfly freebsd linux netbsd openbsd package unix diff --git a/unix/readdirent_getdirentries.go b/unix/readdirent_getdirentries.go index 2a4ba47c45..130398b6b7 100644 --- a/unix/readdirent_getdirentries.go +++ b/unix/readdirent_getdirentries.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin -// +build darwin package unix diff --git a/unix/sendfile_test.go b/unix/sendfile_test.go index c4494e01d0..37f7312b84 100644 --- a/unix/sendfile_test.go +++ b/unix/sendfile_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin && amd64) || dragonfly || freebsd || linux || solaris -// +build darwin,amd64 dragonfly freebsd linux solaris package unix_test diff --git a/unix/sockcmsg_unix.go b/unix/sockcmsg_unix.go index 3865943f6e..c3a62dbb1b 100644 --- a/unix/sockcmsg_unix.go +++ b/unix/sockcmsg_unix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos // Socket control messages diff --git a/unix/sockcmsg_unix_other.go b/unix/sockcmsg_unix_other.go index 0840fe4a57..4a1eab37ec 100644 --- a/unix/sockcmsg_unix_other.go +++ b/unix/sockcmsg_unix_other.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || freebsd || linux || netbsd || openbsd || solaris || zos -// +build aix darwin freebsd linux netbsd openbsd solaris zos package unix diff --git a/unix/syscall.go b/unix/syscall.go index 63e8c83831..5ea74da982 100644 --- a/unix/syscall.go +++ b/unix/syscall.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos // Package unix contains an interface to the low-level operating system // primitives. OS details vary depending on the underlying system, and diff --git a/unix/syscall_aix.go b/unix/syscall_aix.go index e94e6cdac8..6d3009d214 100644 --- a/unix/syscall_aix.go +++ b/unix/syscall_aix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix -// +build aix // Aix system calls. // This file is compiled as ordinary Go code, diff --git a/unix/syscall_aix_ppc.go b/unix/syscall_aix_ppc.go index f2871fa953..1fdaa47600 100644 --- a/unix/syscall_aix_ppc.go +++ b/unix/syscall_aix_ppc.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix && ppc -// +build aix,ppc package unix diff --git a/unix/syscall_aix_ppc64.go b/unix/syscall_aix_ppc64.go index 75718ec0f1..c87f9a9f45 100644 --- a/unix/syscall_aix_ppc64.go +++ b/unix/syscall_aix_ppc64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix && ppc64 -// +build aix,ppc64 package unix diff --git a/unix/syscall_aix_test.go b/unix/syscall_aix_test.go index ffff394c1a..581936ad35 100644 --- a/unix/syscall_aix_test.go +++ b/unix/syscall_aix_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix -// +build aix package unix_test diff --git a/unix/syscall_bsd.go b/unix/syscall_bsd.go index 4217de518b..6f328e3a55 100644 --- a/unix/syscall_bsd.go +++ b/unix/syscall_bsd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || dragonfly || freebsd || netbsd || openbsd -// +build darwin dragonfly freebsd netbsd openbsd // BSD system call wrappers shared by *BSD based systems // including OS X (Darwin) and FreeBSD. Like the other diff --git a/unix/syscall_bsd_test.go b/unix/syscall_bsd_test.go index 9646c56724..3f3cc98a45 100644 --- a/unix/syscall_bsd_test.go +++ b/unix/syscall_bsd_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || dragonfly || freebsd || netbsd || openbsd -// +build darwin dragonfly freebsd netbsd openbsd package unix_test diff --git a/unix/syscall_darwin_amd64.go b/unix/syscall_darwin_amd64.go index b37310ce9b..0eaecf5fc3 100644 --- a/unix/syscall_darwin_amd64.go +++ b/unix/syscall_darwin_amd64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build amd64 && darwin -// +build amd64,darwin package unix diff --git a/unix/syscall_darwin_arm64.go b/unix/syscall_darwin_arm64.go index d51ec99630..f36c6707cf 100644 --- a/unix/syscall_darwin_arm64.go +++ b/unix/syscall_darwin_arm64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm64 && darwin -// +build arm64,darwin package unix diff --git a/unix/syscall_darwin_libSystem.go b/unix/syscall_darwin_libSystem.go index 53c96641f8..16dc699379 100644 --- a/unix/syscall_darwin_libSystem.go +++ b/unix/syscall_darwin_libSystem.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin && go1.12 -// +build darwin,go1.12 package unix diff --git a/unix/syscall_dragonfly_amd64.go b/unix/syscall_dragonfly_amd64.go index 4e2d32120a..14bab6b2de 100644 --- a/unix/syscall_dragonfly_amd64.go +++ b/unix/syscall_dragonfly_amd64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build amd64 && dragonfly -// +build amd64,dragonfly package unix diff --git a/unix/syscall_freebsd_386.go b/unix/syscall_freebsd_386.go index b8da510043..3967bca772 100644 --- a/unix/syscall_freebsd_386.go +++ b/unix/syscall_freebsd_386.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build 386 && freebsd -// +build 386,freebsd package unix diff --git a/unix/syscall_freebsd_amd64.go b/unix/syscall_freebsd_amd64.go index 47155c4839..eff19ada23 100644 --- a/unix/syscall_freebsd_amd64.go +++ b/unix/syscall_freebsd_amd64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build amd64 && freebsd -// +build amd64,freebsd package unix diff --git a/unix/syscall_freebsd_arm.go b/unix/syscall_freebsd_arm.go index 08932093fa..4f24b517a6 100644 --- a/unix/syscall_freebsd_arm.go +++ b/unix/syscall_freebsd_arm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm && freebsd -// +build arm,freebsd package unix diff --git a/unix/syscall_freebsd_arm64.go b/unix/syscall_freebsd_arm64.go index d151a0d0e5..ac30759ece 100644 --- a/unix/syscall_freebsd_arm64.go +++ b/unix/syscall_freebsd_arm64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm64 && freebsd -// +build arm64,freebsd package unix diff --git a/unix/syscall_freebsd_riscv64.go b/unix/syscall_freebsd_riscv64.go index d5cd64b378..aab725ca77 100644 --- a/unix/syscall_freebsd_riscv64.go +++ b/unix/syscall_freebsd_riscv64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build riscv64 && freebsd -// +build riscv64,freebsd package unix diff --git a/unix/syscall_freebsd_test.go b/unix/syscall_freebsd_test.go index e27689ac62..cbe3d36696 100644 --- a/unix/syscall_freebsd_test.go +++ b/unix/syscall_freebsd_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build freebsd -// +build freebsd package unix_test diff --git a/unix/syscall_hurd.go b/unix/syscall_hurd.go index 381fd4673b..ba46651f8e 100644 --- a/unix/syscall_hurd.go +++ b/unix/syscall_hurd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build hurd -// +build hurd package unix diff --git a/unix/syscall_hurd_386.go b/unix/syscall_hurd_386.go index 7cf54a3e4f..df89f9e6b4 100644 --- a/unix/syscall_hurd_386.go +++ b/unix/syscall_hurd_386.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build 386 && hurd -// +build 386,hurd package unix diff --git a/unix/syscall_illumos.go b/unix/syscall_illumos.go index 87db5a6a8c..a863f7052c 100644 --- a/unix/syscall_illumos.go +++ b/unix/syscall_illumos.go @@ -5,7 +5,6 @@ // illumos system calls not present on Solaris. //go:build amd64 && illumos -// +build amd64,illumos package unix diff --git a/unix/syscall_internal_bsd_test.go b/unix/syscall_internal_bsd_test.go index e742267019..7d07b5e348 100644 --- a/unix/syscall_internal_bsd_test.go +++ b/unix/syscall_internal_bsd_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || dragonfly || freebsd || netbsd || openbsd -// +build darwin dragonfly freebsd netbsd openbsd package unix diff --git a/unix/syscall_internal_linux_test.go b/unix/syscall_internal_linux_test.go index d2aebe373d..7d34c4f1e2 100644 --- a/unix/syscall_internal_linux_test.go +++ b/unix/syscall_internal_linux_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package unix diff --git a/unix/syscall_internal_solaris_test.go b/unix/syscall_internal_solaris_test.go index d3b5871899..b759657528 100644 --- a/unix/syscall_internal_solaris_test.go +++ b/unix/syscall_internal_solaris_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build solaris -// +build solaris package unix diff --git a/unix/syscall_linux_386.go b/unix/syscall_linux_386.go index c7d9945ea1..506dafa7b4 100644 --- a/unix/syscall_linux_386.go +++ b/unix/syscall_linux_386.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build 386 && linux -// +build 386,linux package unix diff --git a/unix/syscall_linux_alarm.go b/unix/syscall_linux_alarm.go index 08086ac6a4..38d55641b5 100644 --- a/unix/syscall_linux_alarm.go +++ b/unix/syscall_linux_alarm.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64) -// +build linux -// +build 386 amd64 mips mipsle mips64 mipsle ppc64 ppc64le ppc s390x sparc64 package unix diff --git a/unix/syscall_linux_amd64.go b/unix/syscall_linux_amd64.go index 70601ce369..d557cf8de3 100644 --- a/unix/syscall_linux_amd64.go +++ b/unix/syscall_linux_amd64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build amd64 && linux -// +build amd64,linux package unix diff --git a/unix/syscall_linux_amd64_gc.go b/unix/syscall_linux_amd64_gc.go index 8b0f0f3aa5..facdb83b23 100644 --- a/unix/syscall_linux_amd64_gc.go +++ b/unix/syscall_linux_amd64_gc.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build amd64 && linux && gc -// +build amd64,linux,gc package unix diff --git a/unix/syscall_linux_arm.go b/unix/syscall_linux_arm.go index da2986415a..cd2dd797fd 100644 --- a/unix/syscall_linux_arm.go +++ b/unix/syscall_linux_arm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm && linux -// +build arm,linux package unix diff --git a/unix/syscall_linux_arm64.go b/unix/syscall_linux_arm64.go index f5266689af..cf2ee6c75e 100644 --- a/unix/syscall_linux_arm64.go +++ b/unix/syscall_linux_arm64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm64 && linux -// +build arm64,linux package unix diff --git a/unix/syscall_linux_gc.go b/unix/syscall_linux_gc.go index 2b1168d7d1..ffc4c2b635 100644 --- a/unix/syscall_linux_gc.go +++ b/unix/syscall_linux_gc.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && gc -// +build linux,gc package unix diff --git a/unix/syscall_linux_gc_386.go b/unix/syscall_linux_gc_386.go index 9843fb4896..9ebfdcf447 100644 --- a/unix/syscall_linux_gc_386.go +++ b/unix/syscall_linux_gc_386.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && gc && 386 -// +build linux,gc,386 package unix diff --git a/unix/syscall_linux_gc_arm.go b/unix/syscall_linux_gc_arm.go index a6008fccd5..5f2b57c4c2 100644 --- a/unix/syscall_linux_gc_arm.go +++ b/unix/syscall_linux_gc_arm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm && gc && linux -// +build arm,gc,linux package unix diff --git a/unix/syscall_linux_gccgo_386.go b/unix/syscall_linux_gccgo_386.go index 7740af2428..d1a3ad8263 100644 --- a/unix/syscall_linux_gccgo_386.go +++ b/unix/syscall_linux_gccgo_386.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && gccgo && 386 -// +build linux,gccgo,386 package unix diff --git a/unix/syscall_linux_gccgo_arm.go b/unix/syscall_linux_gccgo_arm.go index e16a12299a..f2f67423e9 100644 --- a/unix/syscall_linux_gccgo_arm.go +++ b/unix/syscall_linux_gccgo_arm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && gccgo && arm -// +build linux,gccgo,arm package unix diff --git a/unix/syscall_linux_loong64.go b/unix/syscall_linux_loong64.go index f6ab02ec15..3d0e98451f 100644 --- a/unix/syscall_linux_loong64.go +++ b/unix/syscall_linux_loong64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build loong64 && linux -// +build loong64,linux package unix diff --git a/unix/syscall_linux_mips64x.go b/unix/syscall_linux_mips64x.go index 93fe59d25d..70963a95ab 100644 --- a/unix/syscall_linux_mips64x.go +++ b/unix/syscall_linux_mips64x.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (mips64 || mips64le) -// +build linux -// +build mips64 mips64le package unix diff --git a/unix/syscall_linux_mipsx.go b/unix/syscall_linux_mipsx.go index aae7f0ffd3..c218ebd280 100644 --- a/unix/syscall_linux_mipsx.go +++ b/unix/syscall_linux_mipsx.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (mips || mipsle) -// +build linux -// +build mips mipsle package unix diff --git a/unix/syscall_linux_ppc.go b/unix/syscall_linux_ppc.go index 66eff19a32..e6c48500ca 100644 --- a/unix/syscall_linux_ppc.go +++ b/unix/syscall_linux_ppc.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && ppc -// +build linux,ppc package unix diff --git a/unix/syscall_linux_ppc64x.go b/unix/syscall_linux_ppc64x.go index 806aa2574d..7286a9aa88 100644 --- a/unix/syscall_linux_ppc64x.go +++ b/unix/syscall_linux_ppc64x.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (ppc64 || ppc64le) -// +build linux -// +build ppc64 ppc64le package unix diff --git a/unix/syscall_linux_riscv64.go b/unix/syscall_linux_riscv64.go index 5e6ceee129..6f5a288944 100644 --- a/unix/syscall_linux_riscv64.go +++ b/unix/syscall_linux_riscv64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build riscv64 && linux -// +build riscv64,linux package unix diff --git a/unix/syscall_linux_s390x.go b/unix/syscall_linux_s390x.go index 2f89e8f5de..66f31210d0 100644 --- a/unix/syscall_linux_s390x.go +++ b/unix/syscall_linux_s390x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build s390x && linux -// +build s390x,linux package unix diff --git a/unix/syscall_linux_sparc64.go b/unix/syscall_linux_sparc64.go index 7ca064ae76..11d1f16986 100644 --- a/unix/syscall_linux_sparc64.go +++ b/unix/syscall_linux_sparc64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build sparc64 && linux -// +build sparc64,linux package unix diff --git a/unix/syscall_linux_test.go b/unix/syscall_linux_test.go index 36b1e7f425..2a92419d3e 100644 --- a/unix/syscall_linux_test.go +++ b/unix/syscall_linux_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package unix_test diff --git a/unix/syscall_netbsd_386.go b/unix/syscall_netbsd_386.go index 5199d282fd..7a5eb57432 100644 --- a/unix/syscall_netbsd_386.go +++ b/unix/syscall_netbsd_386.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build 386 && netbsd -// +build 386,netbsd package unix diff --git a/unix/syscall_netbsd_amd64.go b/unix/syscall_netbsd_amd64.go index 70a9c52e98..62d8957ae6 100644 --- a/unix/syscall_netbsd_amd64.go +++ b/unix/syscall_netbsd_amd64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build amd64 && netbsd -// +build amd64,netbsd package unix diff --git a/unix/syscall_netbsd_arm.go b/unix/syscall_netbsd_arm.go index 3eb5942f93..ce6a068851 100644 --- a/unix/syscall_netbsd_arm.go +++ b/unix/syscall_netbsd_arm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm && netbsd -// +build arm,netbsd package unix diff --git a/unix/syscall_netbsd_arm64.go b/unix/syscall_netbsd_arm64.go index fc6ccfd810..d46d689d1b 100644 --- a/unix/syscall_netbsd_arm64.go +++ b/unix/syscall_netbsd_arm64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm64 && netbsd -// +build arm64,netbsd package unix diff --git a/unix/syscall_openbsd_386.go b/unix/syscall_openbsd_386.go index 6baabcdcb0..9ddc89f4fc 100644 --- a/unix/syscall_openbsd_386.go +++ b/unix/syscall_openbsd_386.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build 386 && openbsd -// +build 386,openbsd package unix diff --git a/unix/syscall_openbsd_amd64.go b/unix/syscall_openbsd_amd64.go index bab25360ea..70a3c96eea 100644 --- a/unix/syscall_openbsd_amd64.go +++ b/unix/syscall_openbsd_amd64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build amd64 && openbsd -// +build amd64,openbsd package unix diff --git a/unix/syscall_openbsd_arm.go b/unix/syscall_openbsd_arm.go index 8eed3c4d4e..265caa87f7 100644 --- a/unix/syscall_openbsd_arm.go +++ b/unix/syscall_openbsd_arm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm && openbsd -// +build arm,openbsd package unix diff --git a/unix/syscall_openbsd_arm64.go b/unix/syscall_openbsd_arm64.go index 483dde99d4..ac4fda1715 100644 --- a/unix/syscall_openbsd_arm64.go +++ b/unix/syscall_openbsd_arm64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm64 && openbsd -// +build arm64,openbsd package unix diff --git a/unix/syscall_openbsd_libc.go b/unix/syscall_openbsd_libc.go index 04aa43f41b..0a451e6dd4 100644 --- a/unix/syscall_openbsd_libc.go +++ b/unix/syscall_openbsd_libc.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build openbsd -// +build openbsd package unix diff --git a/unix/syscall_openbsd_ppc64.go b/unix/syscall_openbsd_ppc64.go index c2796139c0..30a308cbb4 100644 --- a/unix/syscall_openbsd_ppc64.go +++ b/unix/syscall_openbsd_ppc64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ppc64 && openbsd -// +build ppc64,openbsd package unix diff --git a/unix/syscall_openbsd_riscv64.go b/unix/syscall_openbsd_riscv64.go index 23199a7ff6..ea954330fa 100644 --- a/unix/syscall_openbsd_riscv64.go +++ b/unix/syscall_openbsd_riscv64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build riscv64 && openbsd -// +build riscv64,openbsd package unix diff --git a/unix/syscall_solaris_amd64.go b/unix/syscall_solaris_amd64.go index 0bd25ef81f..e02d8ceae3 100644 --- a/unix/syscall_solaris_amd64.go +++ b/unix/syscall_solaris_amd64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build amd64 && solaris -// +build amd64,solaris package unix diff --git a/unix/syscall_solaris_test.go b/unix/syscall_solaris_test.go index f99c2a198e..a9d486a10f 100644 --- a/unix/syscall_solaris_test.go +++ b/unix/syscall_solaris_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build solaris -// +build solaris package unix_test diff --git a/unix/syscall_test.go b/unix/syscall_test.go index bc2a08837c..f9c14f76fa 100644 --- a/unix/syscall_test.go +++ b/unix/syscall_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package unix_test diff --git a/unix/syscall_unix.go b/unix/syscall_unix.go index f6eda27050..77081de8c7 100644 --- a/unix/syscall_unix.go +++ b/unix/syscall_unix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package unix diff --git a/unix/syscall_unix_gc.go b/unix/syscall_unix_gc.go index b6919ca580..05c95bccfa 100644 --- a/unix/syscall_unix_gc.go +++ b/unix/syscall_unix_gc.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc -// +build darwin dragonfly freebsd linux,!ppc64,!ppc64le netbsd openbsd solaris -// +build gc package unix diff --git a/unix/syscall_unix_gc_ppc64x.go b/unix/syscall_unix_gc_ppc64x.go index f6f707acf2..23f39b7af7 100644 --- a/unix/syscall_unix_gc_ppc64x.go +++ b/unix/syscall_unix_gc_ppc64x.go @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (ppc64le || ppc64) && gc -// +build linux -// +build ppc64le ppc64 -// +build gc package unix diff --git a/unix/syscall_unix_test.go b/unix/syscall_unix_test.go index d147923cd5..29c158fbab 100644 --- a/unix/syscall_unix_test.go +++ b/unix/syscall_unix_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package unix_test diff --git a/unix/syscall_zos_s390x.go b/unix/syscall_zos_s390x.go index 4596d041ce..d99d05f1bc 100644 --- a/unix/syscall_zos_s390x.go +++ b/unix/syscall_zos_s390x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x package unix diff --git a/unix/syscall_zos_test.go b/unix/syscall_zos_test.go index 30ace20898..4cd79bfa0c 100644 --- a/unix/syscall_zos_test.go +++ b/unix/syscall_zos_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x package unix_test diff --git a/unix/sysvshm_linux.go b/unix/sysvshm_linux.go index 2c3a4437f0..4fcd38de27 100644 --- a/unix/sysvshm_linux.go +++ b/unix/sysvshm_linux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package unix diff --git a/unix/sysvshm_unix.go b/unix/sysvshm_unix.go index 5bb41d17bc..79a84f18b4 100644 --- a/unix/sysvshm_unix.go +++ b/unix/sysvshm_unix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin && !ios) || linux -// +build darwin,!ios linux package unix diff --git a/unix/sysvshm_unix_other.go b/unix/sysvshm_unix_other.go index 71bddefdb8..9eb0db664c 100644 --- a/unix/sysvshm_unix_other.go +++ b/unix/sysvshm_unix_other.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin && !ios -// +build darwin,!ios package unix diff --git a/unix/sysvshm_unix_test.go b/unix/sysvshm_unix_test.go index c1eff8dd6d..91e16dad1f 100644 --- a/unix/sysvshm_unix_test.go +++ b/unix/sysvshm_unix_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin && amd64) || linux -// +build darwin,amd64 linux package unix_test diff --git a/unix/timestruct.go b/unix/timestruct.go index 616b1b2848..7997b19022 100644 --- a/unix/timestruct.go +++ b/unix/timestruct.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package unix diff --git a/unix/timestruct_test.go b/unix/timestruct_test.go index e39df4cb5d..ceb7375f08 100644 --- a/unix/timestruct_test.go +++ b/unix/timestruct_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package unix_test diff --git a/unix/types_aix.go b/unix/types_aix.go index bfa2a706c3..f639099f10 100644 --- a/unix/types_aix.go +++ b/unix/types_aix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore && aix -// +build ignore,aix /* Input to cgo -godefs. See also mkerrors.sh and mkall.sh diff --git a/unix/types_darwin.go b/unix/types_darwin.go index 0e8ebe5aa2..7ed32a1a5f 100644 --- a/unix/types_darwin.go +++ b/unix/types_darwin.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore /* Input to cgo -godefs. See README.md diff --git a/unix/types_dragonfly.go b/unix/types_dragonfly.go index 32f8acf60f..a89ec017b0 100644 --- a/unix/types_dragonfly.go +++ b/unix/types_dragonfly.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore /* Input to cgo -godefs. See README.md diff --git a/unix/types_freebsd.go b/unix/types_freebsd.go index 0687a15515..23e3a026af 100644 --- a/unix/types_freebsd.go +++ b/unix/types_freebsd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore /* Input to cgo -godefs. See README.md diff --git a/unix/types_netbsd.go b/unix/types_netbsd.go index 8bcdfe6327..d91741619c 100644 --- a/unix/types_netbsd.go +++ b/unix/types_netbsd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore /* Input to cgo -godefs. See README.md diff --git a/unix/types_openbsd.go b/unix/types_openbsd.go index 8cdd8fa0a5..71478aa7e9 100644 --- a/unix/types_openbsd.go +++ b/unix/types_openbsd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore /* Input to cgo -godefs. See README.md diff --git a/unix/types_solaris.go b/unix/types_solaris.go index 89e4c51e25..986cff905e 100644 --- a/unix/types_solaris.go +++ b/unix/types_solaris.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore /* Input to cgo -godefs. See README.md diff --git a/unix/xattr_bsd.go b/unix/xattr_bsd.go index f5f8e9f366..e168793961 100644 --- a/unix/xattr_bsd.go +++ b/unix/xattr_bsd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build freebsd || netbsd -// +build freebsd netbsd package unix diff --git a/unix/xattr_test.go b/unix/xattr_test.go index 94411bd04e..a8e4fb86d1 100644 --- a/unix/xattr_test.go +++ b/unix/xattr_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || freebsd || linux || netbsd -// +build darwin freebsd linux netbsd package unix_test diff --git a/unix/zerrors_aix_ppc.go b/unix/zerrors_aix_ppc.go index ca9799b79e..2fb219d787 100644 --- a/unix/zerrors_aix_ppc.go +++ b/unix/zerrors_aix_ppc.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc && aix -// +build ppc,aix // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -maix32 _const.go diff --git a/unix/zerrors_aix_ppc64.go b/unix/zerrors_aix_ppc64.go index 200c8c26fe..b0e6f5c85c 100644 --- a/unix/zerrors_aix_ppc64.go +++ b/unix/zerrors_aix_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && aix -// +build ppc64,aix // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -maix64 _const.go diff --git a/unix/zerrors_darwin_amd64.go b/unix/zerrors_darwin_amd64.go index 1430076271..e40fa85245 100644 --- a/unix/zerrors_darwin_amd64.go +++ b/unix/zerrors_darwin_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && darwin -// +build amd64,darwin // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/unix/zerrors_darwin_arm64.go b/unix/zerrors_darwin_arm64.go index ab044a7427..bb02aa6c05 100644 --- a/unix/zerrors_darwin_arm64.go +++ b/unix/zerrors_darwin_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && darwin -// +build arm64,darwin // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/unix/zerrors_dragonfly_amd64.go b/unix/zerrors_dragonfly_amd64.go index 17bba0e44f..c0e0f8694c 100644 --- a/unix/zerrors_dragonfly_amd64.go +++ b/unix/zerrors_dragonfly_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && dragonfly -// +build amd64,dragonfly // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/unix/zerrors_freebsd_386.go b/unix/zerrors_freebsd_386.go index f8c2c51387..6c6923906f 100644 --- a/unix/zerrors_freebsd_386.go +++ b/unix/zerrors_freebsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && freebsd -// +build 386,freebsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m32 _const.go diff --git a/unix/zerrors_freebsd_amd64.go b/unix/zerrors_freebsd_amd64.go index 96310c3be1..dd9163f8e8 100644 --- a/unix/zerrors_freebsd_amd64.go +++ b/unix/zerrors_freebsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && freebsd -// +build amd64,freebsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/unix/zerrors_freebsd_arm.go b/unix/zerrors_freebsd_arm.go index 777b69defa..493a2a793c 100644 --- a/unix/zerrors_freebsd_arm.go +++ b/unix/zerrors_freebsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && freebsd -// +build arm,freebsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- _const.go diff --git a/unix/zerrors_freebsd_arm64.go b/unix/zerrors_freebsd_arm64.go index c557ac2db3..8b437b307d 100644 --- a/unix/zerrors_freebsd_arm64.go +++ b/unix/zerrors_freebsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && freebsd -// +build arm64,freebsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/unix/zerrors_freebsd_riscv64.go b/unix/zerrors_freebsd_riscv64.go index 341b4d9626..67c02dd579 100644 --- a/unix/zerrors_freebsd_riscv64.go +++ b/unix/zerrors_freebsd_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && freebsd -// +build riscv64,freebsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/unix/zerrors_linux.go b/unix/zerrors_linux.go index f9c7f479b0..2409c44780 100644 --- a/unix/zerrors_linux.go +++ b/unix/zerrors_linux.go @@ -1,7 +1,6 @@ // Code generated by mkmerge; DO NOT EDIT. //go:build linux -// +build linux package unix diff --git a/unix/zerrors_linux_386.go b/unix/zerrors_linux_386.go index 30aee00a53..4920821cf3 100644 --- a/unix/zerrors_linux_386.go +++ b/unix/zerrors_linux_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && linux -// +build 386,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/386/include -m32 _const.go diff --git a/unix/zerrors_linux_amd64.go b/unix/zerrors_linux_amd64.go index 8ebfa51278..a0c1e41127 100644 --- a/unix/zerrors_linux_amd64.go +++ b/unix/zerrors_linux_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && linux -// +build amd64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/amd64/include -m64 _const.go diff --git a/unix/zerrors_linux_arm.go b/unix/zerrors_linux_arm.go index 271a21cdc7..c63985560f 100644 --- a/unix/zerrors_linux_arm.go +++ b/unix/zerrors_linux_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && linux -// +build arm,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/arm/include _const.go diff --git a/unix/zerrors_linux_arm64.go b/unix/zerrors_linux_arm64.go index 910c330a39..47cc62e25c 100644 --- a/unix/zerrors_linux_arm64.go +++ b/unix/zerrors_linux_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && linux -// +build arm64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/arm64/include -fsigned-char _const.go diff --git a/unix/zerrors_linux_loong64.go b/unix/zerrors_linux_loong64.go index a640798c93..e6467bd23b 100644 --- a/unix/zerrors_linux_loong64.go +++ b/unix/zerrors_linux_loong64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build loong64 && linux -// +build loong64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/loong64/include _const.go diff --git a/unix/zerrors_linux_mips.go b/unix/zerrors_linux_mips.go index 0d5925d340..54694642a5 100644 --- a/unix/zerrors_linux_mips.go +++ b/unix/zerrors_linux_mips.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips && linux -// +build mips,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/mips/include _const.go diff --git a/unix/zerrors_linux_mips64.go b/unix/zerrors_linux_mips64.go index d72a00e0b6..3adb81d758 100644 --- a/unix/zerrors_linux_mips64.go +++ b/unix/zerrors_linux_mips64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64 && linux -// +build mips64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/mips64/include _const.go diff --git a/unix/zerrors_linux_mips64le.go b/unix/zerrors_linux_mips64le.go index 02ba129f85..2dfe98f0d1 100644 --- a/unix/zerrors_linux_mips64le.go +++ b/unix/zerrors_linux_mips64le.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64le && linux -// +build mips64le,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/mips64le/include _const.go diff --git a/unix/zerrors_linux_mipsle.go b/unix/zerrors_linux_mipsle.go index 8daa6dd968..f5398f84f0 100644 --- a/unix/zerrors_linux_mipsle.go +++ b/unix/zerrors_linux_mipsle.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mipsle && linux -// +build mipsle,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/mipsle/include _const.go diff --git a/unix/zerrors_linux_ppc.go b/unix/zerrors_linux_ppc.go index 63c8fa2f7f..c54f152d68 100644 --- a/unix/zerrors_linux_ppc.go +++ b/unix/zerrors_linux_ppc.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc && linux -// +build ppc,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/ppc/include _const.go diff --git a/unix/zerrors_linux_ppc64.go b/unix/zerrors_linux_ppc64.go index 930799ec1b..76057dc72f 100644 --- a/unix/zerrors_linux_ppc64.go +++ b/unix/zerrors_linux_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && linux -// +build ppc64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/ppc64/include _const.go diff --git a/unix/zerrors_linux_ppc64le.go b/unix/zerrors_linux_ppc64le.go index 8605a7dd7e..e0c3725e2b 100644 --- a/unix/zerrors_linux_ppc64le.go +++ b/unix/zerrors_linux_ppc64le.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64le && linux -// +build ppc64le,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/ppc64le/include _const.go diff --git a/unix/zerrors_linux_riscv64.go b/unix/zerrors_linux_riscv64.go index 95a016f1c0..c597e31db6 100644 --- a/unix/zerrors_linux_riscv64.go +++ b/unix/zerrors_linux_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && linux -// +build riscv64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/riscv64/include _const.go diff --git a/unix/zerrors_linux_s390x.go b/unix/zerrors_linux_s390x.go index 1ae0108f57..11619d4ec8 100644 --- a/unix/zerrors_linux_s390x.go +++ b/unix/zerrors_linux_s390x.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build s390x && linux -// +build s390x,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/s390x/include -fsigned-char _const.go diff --git a/unix/zerrors_linux_sparc64.go b/unix/zerrors_linux_sparc64.go index 1bb7c6333b..396d994da7 100644 --- a/unix/zerrors_linux_sparc64.go +++ b/unix/zerrors_linux_sparc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build sparc64 && linux -// +build sparc64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/sparc64/include _const.go diff --git a/unix/zerrors_netbsd_386.go b/unix/zerrors_netbsd_386.go index 72f7420d20..130085df40 100644 --- a/unix/zerrors_netbsd_386.go +++ b/unix/zerrors_netbsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && netbsd -// +build 386,netbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m32 _const.go diff --git a/unix/zerrors_netbsd_amd64.go b/unix/zerrors_netbsd_amd64.go index 8d4eb0c080..84769a1a38 100644 --- a/unix/zerrors_netbsd_amd64.go +++ b/unix/zerrors_netbsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && netbsd -// +build amd64,netbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/unix/zerrors_netbsd_arm.go b/unix/zerrors_netbsd_arm.go index 9eef9749f6..602ded0033 100644 --- a/unix/zerrors_netbsd_arm.go +++ b/unix/zerrors_netbsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && netbsd -// +build arm,netbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -marm _const.go diff --git a/unix/zerrors_netbsd_arm64.go b/unix/zerrors_netbsd_arm64.go index 3b62ba192c..efc0406ee1 100644 --- a/unix/zerrors_netbsd_arm64.go +++ b/unix/zerrors_netbsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && netbsd -// +build arm64,netbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/unix/zerrors_openbsd_386.go b/unix/zerrors_openbsd_386.go index af20e474b3..5a6500f837 100644 --- a/unix/zerrors_openbsd_386.go +++ b/unix/zerrors_openbsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && openbsd -// +build 386,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m32 _const.go diff --git a/unix/zerrors_openbsd_amd64.go b/unix/zerrors_openbsd_amd64.go index 6015fcb2bf..a5aeeb979d 100644 --- a/unix/zerrors_openbsd_amd64.go +++ b/unix/zerrors_openbsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && openbsd -// +build amd64,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/unix/zerrors_openbsd_arm.go b/unix/zerrors_openbsd_arm.go index 8d44955e44..0e9748a722 100644 --- a/unix/zerrors_openbsd_arm.go +++ b/unix/zerrors_openbsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && openbsd -// +build arm,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- _const.go diff --git a/unix/zerrors_openbsd_arm64.go b/unix/zerrors_openbsd_arm64.go index ae16fe7542..4f4449abc1 100644 --- a/unix/zerrors_openbsd_arm64.go +++ b/unix/zerrors_openbsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && openbsd -// +build arm64,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/unix/zerrors_openbsd_mips64.go b/unix/zerrors_openbsd_mips64.go index 03d90fe355..76a363f0fe 100644 --- a/unix/zerrors_openbsd_mips64.go +++ b/unix/zerrors_openbsd_mips64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64 && openbsd -// +build mips64,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/unix/zerrors_openbsd_ppc64.go b/unix/zerrors_openbsd_ppc64.go index 8e2c51b1ee..43ca0cdfdc 100644 --- a/unix/zerrors_openbsd_ppc64.go +++ b/unix/zerrors_openbsd_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && openbsd -// +build ppc64,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/unix/zerrors_openbsd_riscv64.go b/unix/zerrors_openbsd_riscv64.go index 13d403031e..b1b8bb2005 100644 --- a/unix/zerrors_openbsd_riscv64.go +++ b/unix/zerrors_openbsd_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && openbsd -// +build riscv64,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/unix/zerrors_solaris_amd64.go b/unix/zerrors_solaris_amd64.go index 1afee6a089..d2ddd3176e 100644 --- a/unix/zerrors_solaris_amd64.go +++ b/unix/zerrors_solaris_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && solaris -// +build amd64,solaris // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/unix/zerrors_zos_s390x.go b/unix/zerrors_zos_s390x.go index fc7d0506f6..4dfd2e051d 100644 --- a/unix/zerrors_zos_s390x.go +++ b/unix/zerrors_zos_s390x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x // Hand edited based on zerrors_linux_s390x.go // TODO: auto-generate. diff --git a/unix/zptrace_armnn_linux.go b/unix/zptrace_armnn_linux.go index 97f20ca282..586317c78e 100644 --- a/unix/zptrace_armnn_linux.go +++ b/unix/zptrace_armnn_linux.go @@ -1,8 +1,6 @@ // Code generated by linux/mkall.go generatePtracePair("arm", "arm64"). DO NOT EDIT. //go:build linux && (arm || arm64) -// +build linux -// +build arm arm64 package unix diff --git a/unix/zptrace_mipsnn_linux.go b/unix/zptrace_mipsnn_linux.go index 0b5f794305..d7c881be77 100644 --- a/unix/zptrace_mipsnn_linux.go +++ b/unix/zptrace_mipsnn_linux.go @@ -1,8 +1,6 @@ // Code generated by linux/mkall.go generatePtracePair("mips", "mips64"). DO NOT EDIT. //go:build linux && (mips || mips64) -// +build linux -// +build mips mips64 package unix diff --git a/unix/zptrace_mipsnnle_linux.go b/unix/zptrace_mipsnnle_linux.go index 2807f7e646..2d2de5d292 100644 --- a/unix/zptrace_mipsnnle_linux.go +++ b/unix/zptrace_mipsnnle_linux.go @@ -1,8 +1,6 @@ // Code generated by linux/mkall.go generatePtracePair("mipsle", "mips64le"). DO NOT EDIT. //go:build linux && (mipsle || mips64le) -// +build linux -// +build mipsle mips64le package unix diff --git a/unix/zptrace_x86_linux.go b/unix/zptrace_x86_linux.go index 281ea64e34..5adc79fb5e 100644 --- a/unix/zptrace_x86_linux.go +++ b/unix/zptrace_x86_linux.go @@ -1,8 +1,6 @@ // Code generated by linux/mkall.go generatePtracePair("386", "amd64"). DO NOT EDIT. //go:build linux && (386 || amd64) -// +build linux -// +build 386 amd64 package unix diff --git a/unix/zsyscall_aix_ppc.go b/unix/zsyscall_aix_ppc.go index d1d1d23311..6ea64a3c0c 100644 --- a/unix/zsyscall_aix_ppc.go +++ b/unix/zsyscall_aix_ppc.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build aix && ppc -// +build aix,ppc package unix diff --git a/unix/zsyscall_aix_ppc64.go b/unix/zsyscall_aix_ppc64.go index f99a18adc3..99ee4399a3 100644 --- a/unix/zsyscall_aix_ppc64.go +++ b/unix/zsyscall_aix_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build aix && ppc64 -// +build aix,ppc64 package unix diff --git a/unix/zsyscall_aix_ppc64_gc.go b/unix/zsyscall_aix_ppc64_gc.go index c4d50ae500..b68a78362b 100644 --- a/unix/zsyscall_aix_ppc64_gc.go +++ b/unix/zsyscall_aix_ppc64_gc.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build aix && ppc64 && gc -// +build aix,ppc64,gc package unix diff --git a/unix/zsyscall_aix_ppc64_gccgo.go b/unix/zsyscall_aix_ppc64_gccgo.go index 6903d3b09e..0a87450bf8 100644 --- a/unix/zsyscall_aix_ppc64_gccgo.go +++ b/unix/zsyscall_aix_ppc64_gccgo.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build aix && ppc64 && gccgo -// +build aix,ppc64,gccgo package unix diff --git a/unix/zsyscall_darwin_amd64.go b/unix/zsyscall_darwin_amd64.go index 1cad561e98..ccb02f240a 100644 --- a/unix/zsyscall_darwin_amd64.go +++ b/unix/zsyscall_darwin_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build darwin && amd64 -// +build darwin,amd64 package unix diff --git a/unix/zsyscall_darwin_arm64.go b/unix/zsyscall_darwin_arm64.go index b18edbd0e3..1b40b997b5 100644 --- a/unix/zsyscall_darwin_arm64.go +++ b/unix/zsyscall_darwin_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build darwin && arm64 -// +build darwin,arm64 package unix diff --git a/unix/zsyscall_dragonfly_amd64.go b/unix/zsyscall_dragonfly_amd64.go index 0c67df64a5..aad65fc793 100644 --- a/unix/zsyscall_dragonfly_amd64.go +++ b/unix/zsyscall_dragonfly_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build dragonfly && amd64 -// +build dragonfly,amd64 package unix diff --git a/unix/zsyscall_freebsd_386.go b/unix/zsyscall_freebsd_386.go index e6e05d145b..c0096391af 100644 --- a/unix/zsyscall_freebsd_386.go +++ b/unix/zsyscall_freebsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build freebsd && 386 -// +build freebsd,386 package unix diff --git a/unix/zsyscall_freebsd_amd64.go b/unix/zsyscall_freebsd_amd64.go index 7508accac9..7664df7496 100644 --- a/unix/zsyscall_freebsd_amd64.go +++ b/unix/zsyscall_freebsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build freebsd && amd64 -// +build freebsd,amd64 package unix diff --git a/unix/zsyscall_freebsd_arm.go b/unix/zsyscall_freebsd_arm.go index 7b56aead46..ae099182c9 100644 --- a/unix/zsyscall_freebsd_arm.go +++ b/unix/zsyscall_freebsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build freebsd && arm -// +build freebsd,arm package unix diff --git a/unix/zsyscall_freebsd_arm64.go b/unix/zsyscall_freebsd_arm64.go index cc623dcaae..11fd5d45bb 100644 --- a/unix/zsyscall_freebsd_arm64.go +++ b/unix/zsyscall_freebsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build freebsd && arm64 -// +build freebsd,arm64 package unix diff --git a/unix/zsyscall_freebsd_riscv64.go b/unix/zsyscall_freebsd_riscv64.go index 5818491974..c3d2d65307 100644 --- a/unix/zsyscall_freebsd_riscv64.go +++ b/unix/zsyscall_freebsd_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build freebsd && riscv64 -// +build freebsd,riscv64 package unix diff --git a/unix/zsyscall_illumos_amd64.go b/unix/zsyscall_illumos_amd64.go index 6be25cd190..c698cbc01a 100644 --- a/unix/zsyscall_illumos_amd64.go +++ b/unix/zsyscall_illumos_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build illumos && amd64 -// +build illumos,amd64 package unix diff --git a/unix/zsyscall_linux.go b/unix/zsyscall_linux.go index 863d7dde20..faca7a557b 100644 --- a/unix/zsyscall_linux.go +++ b/unix/zsyscall_linux.go @@ -1,7 +1,6 @@ // Code generated by mkmerge; DO NOT EDIT. //go:build linux -// +build linux package unix diff --git a/unix/zsyscall_linux_386.go b/unix/zsyscall_linux_386.go index 07b549cc25..4def3e9fcb 100644 --- a/unix/zsyscall_linux_386.go +++ b/unix/zsyscall_linux_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && 386 -// +build linux,386 package unix diff --git a/unix/zsyscall_linux_amd64.go b/unix/zsyscall_linux_amd64.go index 5f481bf83f..fef2bc8ba9 100644 --- a/unix/zsyscall_linux_amd64.go +++ b/unix/zsyscall_linux_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && amd64 -// +build linux,amd64 package unix diff --git a/unix/zsyscall_linux_arm.go b/unix/zsyscall_linux_arm.go index 824cd52c7f..a9fd76a884 100644 --- a/unix/zsyscall_linux_arm.go +++ b/unix/zsyscall_linux_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && arm -// +build linux,arm package unix diff --git a/unix/zsyscall_linux_arm64.go b/unix/zsyscall_linux_arm64.go index e77aecfe98..4600650280 100644 --- a/unix/zsyscall_linux_arm64.go +++ b/unix/zsyscall_linux_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && arm64 -// +build linux,arm64 package unix diff --git a/unix/zsyscall_linux_loong64.go b/unix/zsyscall_linux_loong64.go index 806ffd1e12..c8987d2646 100644 --- a/unix/zsyscall_linux_loong64.go +++ b/unix/zsyscall_linux_loong64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && loong64 -// +build linux,loong64 package unix diff --git a/unix/zsyscall_linux_mips.go b/unix/zsyscall_linux_mips.go index 961a3afb7b..921f430611 100644 --- a/unix/zsyscall_linux_mips.go +++ b/unix/zsyscall_linux_mips.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && mips -// +build linux,mips package unix diff --git a/unix/zsyscall_linux_mips64.go b/unix/zsyscall_linux_mips64.go index ed05005e91..44f067829c 100644 --- a/unix/zsyscall_linux_mips64.go +++ b/unix/zsyscall_linux_mips64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && mips64 -// +build linux,mips64 package unix diff --git a/unix/zsyscall_linux_mips64le.go b/unix/zsyscall_linux_mips64le.go index d365b718f3..e7fa0abf0d 100644 --- a/unix/zsyscall_linux_mips64le.go +++ b/unix/zsyscall_linux_mips64le.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && mips64le -// +build linux,mips64le package unix diff --git a/unix/zsyscall_linux_mipsle.go b/unix/zsyscall_linux_mipsle.go index c3f1b8bbde..8c5125675e 100644 --- a/unix/zsyscall_linux_mipsle.go +++ b/unix/zsyscall_linux_mipsle.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && mipsle -// +build linux,mipsle package unix diff --git a/unix/zsyscall_linux_ppc.go b/unix/zsyscall_linux_ppc.go index a6574cf98b..7392fd45e4 100644 --- a/unix/zsyscall_linux_ppc.go +++ b/unix/zsyscall_linux_ppc.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && ppc -// +build linux,ppc package unix diff --git a/unix/zsyscall_linux_ppc64.go b/unix/zsyscall_linux_ppc64.go index f40990264f..41180434e6 100644 --- a/unix/zsyscall_linux_ppc64.go +++ b/unix/zsyscall_linux_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && ppc64 -// +build linux,ppc64 package unix diff --git a/unix/zsyscall_linux_ppc64le.go b/unix/zsyscall_linux_ppc64le.go index 9dfcc29974..40c6ce7ae5 100644 --- a/unix/zsyscall_linux_ppc64le.go +++ b/unix/zsyscall_linux_ppc64le.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && ppc64le -// +build linux,ppc64le package unix diff --git a/unix/zsyscall_linux_riscv64.go b/unix/zsyscall_linux_riscv64.go index 0ab4f2ed72..2cfe34adb1 100644 --- a/unix/zsyscall_linux_riscv64.go +++ b/unix/zsyscall_linux_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && riscv64 -// +build linux,riscv64 package unix diff --git a/unix/zsyscall_linux_s390x.go b/unix/zsyscall_linux_s390x.go index 6cde32237d..61e6f07097 100644 --- a/unix/zsyscall_linux_s390x.go +++ b/unix/zsyscall_linux_s390x.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && s390x -// +build linux,s390x package unix diff --git a/unix/zsyscall_linux_sparc64.go b/unix/zsyscall_linux_sparc64.go index 5253d65bf1..834b842042 100644 --- a/unix/zsyscall_linux_sparc64.go +++ b/unix/zsyscall_linux_sparc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && sparc64 -// +build linux,sparc64 package unix diff --git a/unix/zsyscall_netbsd_386.go b/unix/zsyscall_netbsd_386.go index 2df3c5bac6..e91ebc14a1 100644 --- a/unix/zsyscall_netbsd_386.go +++ b/unix/zsyscall_netbsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build netbsd && 386 -// +build netbsd,386 package unix diff --git a/unix/zsyscall_netbsd_amd64.go b/unix/zsyscall_netbsd_amd64.go index a60556babb..be28babbcd 100644 --- a/unix/zsyscall_netbsd_amd64.go +++ b/unix/zsyscall_netbsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build netbsd && amd64 -// +build netbsd,amd64 package unix diff --git a/unix/zsyscall_netbsd_arm.go b/unix/zsyscall_netbsd_arm.go index 9f788917a4..fb587e8261 100644 --- a/unix/zsyscall_netbsd_arm.go +++ b/unix/zsyscall_netbsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build netbsd && arm -// +build netbsd,arm package unix diff --git a/unix/zsyscall_netbsd_arm64.go b/unix/zsyscall_netbsd_arm64.go index 82a4cb2dc4..d576438bb0 100644 --- a/unix/zsyscall_netbsd_arm64.go +++ b/unix/zsyscall_netbsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build netbsd && arm64 -// +build netbsd,arm64 package unix diff --git a/unix/zsyscall_openbsd_386.go b/unix/zsyscall_openbsd_386.go index 66b3b64563..9da3ec3772 100644 --- a/unix/zsyscall_openbsd_386.go +++ b/unix/zsyscall_openbsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && 386 -// +build openbsd,386 package unix diff --git a/unix/zsyscall_openbsd_amd64.go b/unix/zsyscall_openbsd_amd64.go index c5c4cc112e..cc273c4126 100644 --- a/unix/zsyscall_openbsd_amd64.go +++ b/unix/zsyscall_openbsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && amd64 -// +build openbsd,amd64 package unix diff --git a/unix/zsyscall_openbsd_arm.go b/unix/zsyscall_openbsd_arm.go index 93bfbb3287..fa34e22e3b 100644 --- a/unix/zsyscall_openbsd_arm.go +++ b/unix/zsyscall_openbsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && arm -// +build openbsd,arm package unix diff --git a/unix/zsyscall_openbsd_arm64.go b/unix/zsyscall_openbsd_arm64.go index a107b8fda5..ab61221477 100644 --- a/unix/zsyscall_openbsd_arm64.go +++ b/unix/zsyscall_openbsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && arm64 -// +build openbsd,arm64 package unix diff --git a/unix/zsyscall_openbsd_mips64.go b/unix/zsyscall_openbsd_mips64.go index c427de509e..3882790a52 100644 --- a/unix/zsyscall_openbsd_mips64.go +++ b/unix/zsyscall_openbsd_mips64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && mips64 -// +build openbsd,mips64 package unix diff --git a/unix/zsyscall_openbsd_ppc64.go b/unix/zsyscall_openbsd_ppc64.go index 60c1a99ae4..172ba7f62c 100644 --- a/unix/zsyscall_openbsd_ppc64.go +++ b/unix/zsyscall_openbsd_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && ppc64 -// +build openbsd,ppc64 package unix diff --git a/unix/zsyscall_openbsd_riscv64.go b/unix/zsyscall_openbsd_riscv64.go index 52eba360f8..fd8e6f62fa 100644 --- a/unix/zsyscall_openbsd_riscv64.go +++ b/unix/zsyscall_openbsd_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && riscv64 -// +build openbsd,riscv64 package unix diff --git a/unix/zsyscall_solaris_amd64.go b/unix/zsyscall_solaris_amd64.go index b401894644..829b87feb8 100644 --- a/unix/zsyscall_solaris_amd64.go +++ b/unix/zsyscall_solaris_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build solaris && amd64 -// +build solaris,amd64 package unix diff --git a/unix/zsyscall_zos_s390x.go b/unix/zsyscall_zos_s390x.go index 1d8fe1d4b2..94f0112383 100644 --- a/unix/zsyscall_zos_s390x.go +++ b/unix/zsyscall_zos_s390x.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build zos && s390x -// +build zos,s390x package unix diff --git a/unix/zsysctl_openbsd_386.go b/unix/zsysctl_openbsd_386.go index 55e0484719..3a58ae819a 100644 --- a/unix/zsysctl_openbsd_386.go +++ b/unix/zsysctl_openbsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; DO NOT EDIT. //go:build 386 && openbsd -// +build 386,openbsd package unix diff --git a/unix/zsysctl_openbsd_amd64.go b/unix/zsysctl_openbsd_amd64.go index d2243cf83f..dcb7a0eb72 100644 --- a/unix/zsysctl_openbsd_amd64.go +++ b/unix/zsysctl_openbsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; DO NOT EDIT. //go:build amd64 && openbsd -// +build amd64,openbsd package unix diff --git a/unix/zsysctl_openbsd_arm.go b/unix/zsysctl_openbsd_arm.go index 82dc51bd8b..db5a7bf13c 100644 --- a/unix/zsysctl_openbsd_arm.go +++ b/unix/zsysctl_openbsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; DO NOT EDIT. //go:build arm && openbsd -// +build arm,openbsd package unix diff --git a/unix/zsysctl_openbsd_arm64.go b/unix/zsysctl_openbsd_arm64.go index cbdda1a4ae..7be575a777 100644 --- a/unix/zsysctl_openbsd_arm64.go +++ b/unix/zsysctl_openbsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; DO NOT EDIT. //go:build arm64 && openbsd -// +build arm64,openbsd package unix diff --git a/unix/zsysctl_openbsd_mips64.go b/unix/zsysctl_openbsd_mips64.go index f55eae1a82..d6e3174c69 100644 --- a/unix/zsysctl_openbsd_mips64.go +++ b/unix/zsysctl_openbsd_mips64.go @@ -2,7 +2,6 @@ // Code generated by the command above; DO NOT EDIT. //go:build mips64 && openbsd -// +build mips64,openbsd package unix diff --git a/unix/zsysctl_openbsd_ppc64.go b/unix/zsysctl_openbsd_ppc64.go index e44054470b..ee97157d01 100644 --- a/unix/zsysctl_openbsd_ppc64.go +++ b/unix/zsysctl_openbsd_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; DO NOT EDIT. //go:build ppc64 && openbsd -// +build ppc64,openbsd package unix diff --git a/unix/zsysctl_openbsd_riscv64.go b/unix/zsysctl_openbsd_riscv64.go index a0db82fce2..35c3b91d0f 100644 --- a/unix/zsysctl_openbsd_riscv64.go +++ b/unix/zsysctl_openbsd_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; DO NOT EDIT. //go:build riscv64 && openbsd -// +build riscv64,openbsd package unix diff --git a/unix/zsysnum_darwin_amd64.go b/unix/zsysnum_darwin_amd64.go index f8298ff9b5..5edda76870 100644 --- a/unix/zsysnum_darwin_amd64.go +++ b/unix/zsysnum_darwin_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && darwin -// +build amd64,darwin package unix diff --git a/unix/zsysnum_darwin_arm64.go b/unix/zsysnum_darwin_arm64.go index 5eb433bbf0..0dc9e8b4d9 100644 --- a/unix/zsysnum_darwin_arm64.go +++ b/unix/zsysnum_darwin_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && darwin -// +build arm64,darwin package unix diff --git a/unix/zsysnum_dragonfly_amd64.go b/unix/zsysnum_dragonfly_amd64.go index 703675c0c4..308ddf3a1f 100644 --- a/unix/zsysnum_dragonfly_amd64.go +++ b/unix/zsysnum_dragonfly_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && dragonfly -// +build amd64,dragonfly package unix diff --git a/unix/zsysnum_freebsd_386.go b/unix/zsysnum_freebsd_386.go index 4e0d96107b..418664e3dc 100644 --- a/unix/zsysnum_freebsd_386.go +++ b/unix/zsysnum_freebsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && freebsd -// +build 386,freebsd package unix diff --git a/unix/zsysnum_freebsd_amd64.go b/unix/zsysnum_freebsd_amd64.go index 01636b838d..34d0b86d7c 100644 --- a/unix/zsysnum_freebsd_amd64.go +++ b/unix/zsysnum_freebsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && freebsd -// +build amd64,freebsd package unix diff --git a/unix/zsysnum_freebsd_arm.go b/unix/zsysnum_freebsd_arm.go index ad99bc106a..b71cf45e2e 100644 --- a/unix/zsysnum_freebsd_arm.go +++ b/unix/zsysnum_freebsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && freebsd -// +build arm,freebsd package unix diff --git a/unix/zsysnum_freebsd_arm64.go b/unix/zsysnum_freebsd_arm64.go index 89dcc42747..e32df1c1ee 100644 --- a/unix/zsysnum_freebsd_arm64.go +++ b/unix/zsysnum_freebsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && freebsd -// +build arm64,freebsd package unix diff --git a/unix/zsysnum_freebsd_riscv64.go b/unix/zsysnum_freebsd_riscv64.go index ee37aaa0c9..15ad6111f3 100644 --- a/unix/zsysnum_freebsd_riscv64.go +++ b/unix/zsysnum_freebsd_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && freebsd -// +build riscv64,freebsd package unix diff --git a/unix/zsysnum_linux_386.go b/unix/zsysnum_linux_386.go index 9862853d34..2d181ba7b2 100644 --- a/unix/zsysnum_linux_386.go +++ b/unix/zsysnum_linux_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && linux -// +build 386,linux package unix diff --git a/unix/zsysnum_linux_amd64.go b/unix/zsysnum_linux_amd64.go index 8901f0f4e5..2b25ab33cf 100644 --- a/unix/zsysnum_linux_amd64.go +++ b/unix/zsysnum_linux_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && linux -// +build amd64,linux package unix diff --git a/unix/zsysnum_linux_arm.go b/unix/zsysnum_linux_arm.go index 6902c37eed..b43e7c4c21 100644 --- a/unix/zsysnum_linux_arm.go +++ b/unix/zsysnum_linux_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && linux -// +build arm,linux package unix diff --git a/unix/zsysnum_linux_arm64.go b/unix/zsysnum_linux_arm64.go index a6d3dff811..d50622f82e 100644 --- a/unix/zsysnum_linux_arm64.go +++ b/unix/zsysnum_linux_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && linux -// +build arm64,linux package unix diff --git a/unix/zsysnum_linux_loong64.go b/unix/zsysnum_linux_loong64.go index b18f3f7107..7c31dbe4fe 100644 --- a/unix/zsysnum_linux_loong64.go +++ b/unix/zsysnum_linux_loong64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build loong64 && linux -// +build loong64,linux package unix diff --git a/unix/zsysnum_linux_mips.go b/unix/zsysnum_linux_mips.go index 0302e5e3de..2b01364d7e 100644 --- a/unix/zsysnum_linux_mips.go +++ b/unix/zsysnum_linux_mips.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips && linux -// +build mips,linux package unix diff --git a/unix/zsysnum_linux_mips64.go b/unix/zsysnum_linux_mips64.go index 6693ba4a0f..9bb31708e8 100644 --- a/unix/zsysnum_linux_mips64.go +++ b/unix/zsysnum_linux_mips64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64 && linux -// +build mips64,linux package unix diff --git a/unix/zsysnum_linux_mips64le.go b/unix/zsysnum_linux_mips64le.go index fd93f4987c..8413fe6dc0 100644 --- a/unix/zsysnum_linux_mips64le.go +++ b/unix/zsysnum_linux_mips64le.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64le && linux -// +build mips64le,linux package unix diff --git a/unix/zsysnum_linux_mipsle.go b/unix/zsysnum_linux_mipsle.go index 760ddcadc2..cf76a275ad 100644 --- a/unix/zsysnum_linux_mipsle.go +++ b/unix/zsysnum_linux_mipsle.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mipsle && linux -// +build mipsle,linux package unix diff --git a/unix/zsysnum_linux_ppc.go b/unix/zsysnum_linux_ppc.go index cff2b2555b..7999422733 100644 --- a/unix/zsysnum_linux_ppc.go +++ b/unix/zsysnum_linux_ppc.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc && linux -// +build ppc,linux package unix diff --git a/unix/zsysnum_linux_ppc64.go b/unix/zsysnum_linux_ppc64.go index a4b2405d09..75904d52b9 100644 --- a/unix/zsysnum_linux_ppc64.go +++ b/unix/zsysnum_linux_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && linux -// +build ppc64,linux package unix diff --git a/unix/zsysnum_linux_ppc64le.go b/unix/zsysnum_linux_ppc64le.go index aca54b4e3a..f5f681c3de 100644 --- a/unix/zsysnum_linux_ppc64le.go +++ b/unix/zsysnum_linux_ppc64le.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64le && linux -// +build ppc64le,linux package unix diff --git a/unix/zsysnum_linux_riscv64.go b/unix/zsysnum_linux_riscv64.go index 9d1738d641..391954743d 100644 --- a/unix/zsysnum_linux_riscv64.go +++ b/unix/zsysnum_linux_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && linux -// +build riscv64,linux package unix diff --git a/unix/zsysnum_linux_s390x.go b/unix/zsysnum_linux_s390x.go index 022878dc8d..f33ceef17d 100644 --- a/unix/zsysnum_linux_s390x.go +++ b/unix/zsysnum_linux_s390x.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build s390x && linux -// +build s390x,linux package unix diff --git a/unix/zsysnum_linux_sparc64.go b/unix/zsysnum_linux_sparc64.go index 4100a761c2..a2ce59e73f 100644 --- a/unix/zsysnum_linux_sparc64.go +++ b/unix/zsysnum_linux_sparc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build sparc64 && linux -// +build sparc64,linux package unix diff --git a/unix/zsysnum_netbsd_386.go b/unix/zsysnum_netbsd_386.go index 3a6699eba9..b2aa8cd495 100644 --- a/unix/zsysnum_netbsd_386.go +++ b/unix/zsysnum_netbsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && netbsd -// +build 386,netbsd package unix diff --git a/unix/zsysnum_netbsd_amd64.go b/unix/zsysnum_netbsd_amd64.go index 5677cd4f15..524a1b1c9a 100644 --- a/unix/zsysnum_netbsd_amd64.go +++ b/unix/zsysnum_netbsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && netbsd -// +build amd64,netbsd package unix diff --git a/unix/zsysnum_netbsd_arm.go b/unix/zsysnum_netbsd_arm.go index e784cb6db1..d59b943ac2 100644 --- a/unix/zsysnum_netbsd_arm.go +++ b/unix/zsysnum_netbsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && netbsd -// +build arm,netbsd package unix diff --git a/unix/zsysnum_netbsd_arm64.go b/unix/zsysnum_netbsd_arm64.go index bd4952efa5..31e771d53e 100644 --- a/unix/zsysnum_netbsd_arm64.go +++ b/unix/zsysnum_netbsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; DO NOT EDIT. //go:build arm64 && netbsd -// +build arm64,netbsd package unix diff --git a/unix/zsysnum_openbsd_386.go b/unix/zsysnum_openbsd_386.go index 597733813e..9fd77c6cb4 100644 --- a/unix/zsysnum_openbsd_386.go +++ b/unix/zsysnum_openbsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && openbsd -// +build 386,openbsd package unix diff --git a/unix/zsysnum_openbsd_amd64.go b/unix/zsysnum_openbsd_amd64.go index 16af291899..af10af28cb 100644 --- a/unix/zsysnum_openbsd_amd64.go +++ b/unix/zsysnum_openbsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && openbsd -// +build amd64,openbsd package unix diff --git a/unix/zsysnum_openbsd_arm.go b/unix/zsysnum_openbsd_arm.go index f59b18a977..cc2028af4b 100644 --- a/unix/zsysnum_openbsd_arm.go +++ b/unix/zsysnum_openbsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && openbsd -// +build arm,openbsd package unix diff --git a/unix/zsysnum_openbsd_arm64.go b/unix/zsysnum_openbsd_arm64.go index 721ef59103..c06dd4415a 100644 --- a/unix/zsysnum_openbsd_arm64.go +++ b/unix/zsysnum_openbsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && openbsd -// +build arm64,openbsd package unix diff --git a/unix/zsysnum_openbsd_mips64.go b/unix/zsysnum_openbsd_mips64.go index 01c43a01fd..9ddbf3e08f 100644 --- a/unix/zsysnum_openbsd_mips64.go +++ b/unix/zsysnum_openbsd_mips64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64 && openbsd -// +build mips64,openbsd package unix diff --git a/unix/zsysnum_openbsd_ppc64.go b/unix/zsysnum_openbsd_ppc64.go index f258cfa24e..19a6ee4134 100644 --- a/unix/zsysnum_openbsd_ppc64.go +++ b/unix/zsysnum_openbsd_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && openbsd -// +build ppc64,openbsd package unix diff --git a/unix/zsysnum_openbsd_riscv64.go b/unix/zsysnum_openbsd_riscv64.go index 07919e0ecc..05192a782d 100644 --- a/unix/zsysnum_openbsd_riscv64.go +++ b/unix/zsysnum_openbsd_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && openbsd -// +build riscv64,openbsd package unix diff --git a/unix/zsysnum_zos_s390x.go b/unix/zsysnum_zos_s390x.go index 073daad43b..b2e3085819 100644 --- a/unix/zsysnum_zos_s390x.go +++ b/unix/zsysnum_zos_s390x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x package unix diff --git a/unix/ztypes_aix_ppc.go b/unix/ztypes_aix_ppc.go index 7a8161c1d1..3e6d57cae7 100644 --- a/unix/ztypes_aix_ppc.go +++ b/unix/ztypes_aix_ppc.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc && aix -// +build ppc,aix package unix diff --git a/unix/ztypes_aix_ppc64.go b/unix/ztypes_aix_ppc64.go index 07ed733c51..3a219bdce7 100644 --- a/unix/ztypes_aix_ppc64.go +++ b/unix/ztypes_aix_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && aix -// +build ppc64,aix package unix diff --git a/unix/ztypes_darwin_amd64.go b/unix/ztypes_darwin_amd64.go index 690cefc3d0..091d107f3a 100644 --- a/unix/ztypes_darwin_amd64.go +++ b/unix/ztypes_darwin_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && darwin -// +build amd64,darwin package unix diff --git a/unix/ztypes_darwin_arm64.go b/unix/ztypes_darwin_arm64.go index 5bffc10eac..28ff4ef74d 100644 --- a/unix/ztypes_darwin_arm64.go +++ b/unix/ztypes_darwin_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && darwin -// +build arm64,darwin package unix diff --git a/unix/ztypes_dragonfly_amd64.go b/unix/ztypes_dragonfly_amd64.go index d0ba8e9b86..30e405bb4c 100644 --- a/unix/ztypes_dragonfly_amd64.go +++ b/unix/ztypes_dragonfly_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && dragonfly -// +build amd64,dragonfly package unix diff --git a/unix/ztypes_freebsd_386.go b/unix/ztypes_freebsd_386.go index 29dc483378..6cbd094a3a 100644 --- a/unix/ztypes_freebsd_386.go +++ b/unix/ztypes_freebsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && freebsd -// +build 386,freebsd package unix diff --git a/unix/ztypes_freebsd_amd64.go b/unix/ztypes_freebsd_amd64.go index 0a89b28906..7c03b6ee77 100644 --- a/unix/ztypes_freebsd_amd64.go +++ b/unix/ztypes_freebsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && freebsd -// +build amd64,freebsd package unix diff --git a/unix/ztypes_freebsd_arm.go b/unix/ztypes_freebsd_arm.go index c8666bb152..422107ee8b 100644 --- a/unix/ztypes_freebsd_arm.go +++ b/unix/ztypes_freebsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && freebsd -// +build arm,freebsd package unix diff --git a/unix/ztypes_freebsd_arm64.go b/unix/ztypes_freebsd_arm64.go index 88fb48a887..505a12acfd 100644 --- a/unix/ztypes_freebsd_arm64.go +++ b/unix/ztypes_freebsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && freebsd -// +build arm64,freebsd package unix diff --git a/unix/ztypes_freebsd_riscv64.go b/unix/ztypes_freebsd_riscv64.go index 698dc975e9..cc986c7900 100644 --- a/unix/ztypes_freebsd_riscv64.go +++ b/unix/ztypes_freebsd_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && freebsd -// +build riscv64,freebsd package unix diff --git a/unix/ztypes_linux.go b/unix/ztypes_linux.go index cdba4c77df..997bcd55ae 100644 --- a/unix/ztypes_linux.go +++ b/unix/ztypes_linux.go @@ -1,7 +1,6 @@ // Code generated by mkmerge; DO NOT EDIT. //go:build linux -// +build linux package unix diff --git a/unix/ztypes_linux_386.go b/unix/ztypes_linux_386.go index 6d8acbcc57..438a30affa 100644 --- a/unix/ztypes_linux_386.go +++ b/unix/ztypes_linux_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && linux -// +build 386,linux package unix diff --git a/unix/ztypes_linux_amd64.go b/unix/ztypes_linux_amd64.go index 59293c6884..adceca3553 100644 --- a/unix/ztypes_linux_amd64.go +++ b/unix/ztypes_linux_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && linux -// +build amd64,linux package unix diff --git a/unix/ztypes_linux_arm.go b/unix/ztypes_linux_arm.go index 40cfa38c29..eeaa00a37d 100644 --- a/unix/ztypes_linux_arm.go +++ b/unix/ztypes_linux_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && linux -// +build arm,linux package unix diff --git a/unix/ztypes_linux_arm64.go b/unix/ztypes_linux_arm64.go index 055bc4216d..6739aa91d4 100644 --- a/unix/ztypes_linux_arm64.go +++ b/unix/ztypes_linux_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && linux -// +build arm64,linux package unix diff --git a/unix/ztypes_linux_loong64.go b/unix/ztypes_linux_loong64.go index f28affbc60..9920ef6317 100644 --- a/unix/ztypes_linux_loong64.go +++ b/unix/ztypes_linux_loong64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build loong64 && linux -// +build loong64,linux package unix diff --git a/unix/ztypes_linux_mips.go b/unix/ztypes_linux_mips.go index 9d71e7ccd8..2923b799a4 100644 --- a/unix/ztypes_linux_mips.go +++ b/unix/ztypes_linux_mips.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips && linux -// +build mips,linux package unix diff --git a/unix/ztypes_linux_mips64.go b/unix/ztypes_linux_mips64.go index fd5ccd332a..ce2750ee41 100644 --- a/unix/ztypes_linux_mips64.go +++ b/unix/ztypes_linux_mips64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64 && linux -// +build mips64,linux package unix diff --git a/unix/ztypes_linux_mips64le.go b/unix/ztypes_linux_mips64le.go index 7704de77a2..3038811d70 100644 --- a/unix/ztypes_linux_mips64le.go +++ b/unix/ztypes_linux_mips64le.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64le && linux -// +build mips64le,linux package unix diff --git a/unix/ztypes_linux_mipsle.go b/unix/ztypes_linux_mipsle.go index df00b87571..efc6fed18c 100644 --- a/unix/ztypes_linux_mipsle.go +++ b/unix/ztypes_linux_mipsle.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mipsle && linux -// +build mipsle,linux package unix diff --git a/unix/ztypes_linux_ppc.go b/unix/ztypes_linux_ppc.go index 0942840db6..9a654b75a9 100644 --- a/unix/ztypes_linux_ppc.go +++ b/unix/ztypes_linux_ppc.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc && linux -// +build ppc,linux package unix diff --git a/unix/ztypes_linux_ppc64.go b/unix/ztypes_linux_ppc64.go index 0348743950..40d358e33e 100644 --- a/unix/ztypes_linux_ppc64.go +++ b/unix/ztypes_linux_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && linux -// +build ppc64,linux package unix diff --git a/unix/ztypes_linux_ppc64le.go b/unix/ztypes_linux_ppc64le.go index bad0670475..148c6ceb86 100644 --- a/unix/ztypes_linux_ppc64le.go +++ b/unix/ztypes_linux_ppc64le.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64le && linux -// +build ppc64le,linux package unix diff --git a/unix/ztypes_linux_riscv64.go b/unix/ztypes_linux_riscv64.go index 1b4c97c32a..72ba81543e 100644 --- a/unix/ztypes_linux_riscv64.go +++ b/unix/ztypes_linux_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && linux -// +build riscv64,linux package unix diff --git a/unix/ztypes_linux_s390x.go b/unix/ztypes_linux_s390x.go index aa268d025c..71e765508e 100644 --- a/unix/ztypes_linux_s390x.go +++ b/unix/ztypes_linux_s390x.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build s390x && linux -// +build s390x,linux package unix diff --git a/unix/ztypes_linux_sparc64.go b/unix/ztypes_linux_sparc64.go index 444045b6c5..4abbdb9de9 100644 --- a/unix/ztypes_linux_sparc64.go +++ b/unix/ztypes_linux_sparc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build sparc64 && linux -// +build sparc64,linux package unix diff --git a/unix/ztypes_netbsd_386.go b/unix/ztypes_netbsd_386.go index 9bc4c8f9d8..f22e7947d9 100644 --- a/unix/ztypes_netbsd_386.go +++ b/unix/ztypes_netbsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && netbsd -// +build 386,netbsd package unix diff --git a/unix/ztypes_netbsd_amd64.go b/unix/ztypes_netbsd_amd64.go index bb05f655d2..066a7d83d2 100644 --- a/unix/ztypes_netbsd_amd64.go +++ b/unix/ztypes_netbsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && netbsd -// +build amd64,netbsd package unix diff --git a/unix/ztypes_netbsd_arm.go b/unix/ztypes_netbsd_arm.go index db40e3a19c..439548ec9a 100644 --- a/unix/ztypes_netbsd_arm.go +++ b/unix/ztypes_netbsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && netbsd -// +build arm,netbsd package unix diff --git a/unix/ztypes_netbsd_arm64.go b/unix/ztypes_netbsd_arm64.go index 11121151cc..16085d3bbc 100644 --- a/unix/ztypes_netbsd_arm64.go +++ b/unix/ztypes_netbsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && netbsd -// +build arm64,netbsd package unix diff --git a/unix/ztypes_openbsd_386.go b/unix/ztypes_openbsd_386.go index 26eba23b72..afd13a3af7 100644 --- a/unix/ztypes_openbsd_386.go +++ b/unix/ztypes_openbsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && openbsd -// +build 386,openbsd package unix diff --git a/unix/ztypes_openbsd_amd64.go b/unix/ztypes_openbsd_amd64.go index 5a54798869..5d97f1f9b6 100644 --- a/unix/ztypes_openbsd_amd64.go +++ b/unix/ztypes_openbsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && openbsd -// +build amd64,openbsd package unix diff --git a/unix/ztypes_openbsd_arm.go b/unix/ztypes_openbsd_arm.go index be58c4e1ff..34871cdc15 100644 --- a/unix/ztypes_openbsd_arm.go +++ b/unix/ztypes_openbsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && openbsd -// +build arm,openbsd package unix diff --git a/unix/ztypes_openbsd_arm64.go b/unix/ztypes_openbsd_arm64.go index 52338266cb..5911bceb31 100644 --- a/unix/ztypes_openbsd_arm64.go +++ b/unix/ztypes_openbsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && openbsd -// +build arm64,openbsd package unix diff --git a/unix/ztypes_openbsd_mips64.go b/unix/ztypes_openbsd_mips64.go index 605cfdb12b..e4f24f3bc9 100644 --- a/unix/ztypes_openbsd_mips64.go +++ b/unix/ztypes_openbsd_mips64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64 && openbsd -// +build mips64,openbsd package unix diff --git a/unix/ztypes_openbsd_ppc64.go b/unix/ztypes_openbsd_ppc64.go index d6724c0102..ca50a79303 100644 --- a/unix/ztypes_openbsd_ppc64.go +++ b/unix/ztypes_openbsd_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && openbsd -// +build ppc64,openbsd package unix diff --git a/unix/ztypes_openbsd_riscv64.go b/unix/ztypes_openbsd_riscv64.go index ddfd27a434..d7d7f79023 100644 --- a/unix/ztypes_openbsd_riscv64.go +++ b/unix/ztypes_openbsd_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && openbsd -// +build riscv64,openbsd package unix diff --git a/unix/ztypes_solaris_amd64.go b/unix/ztypes_solaris_amd64.go index 0400747c67..14160576d2 100644 --- a/unix/ztypes_solaris_amd64.go +++ b/unix/ztypes_solaris_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && solaris -// +build amd64,solaris package unix diff --git a/unix/ztypes_zos_s390x.go b/unix/ztypes_zos_s390x.go index aec1efcb30..54f31be637 100644 --- a/unix/ztypes_zos_s390x.go +++ b/unix/ztypes_zos_s390x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x // Hand edited based on ztypes_linux_s390x.go // TODO: auto-generate. diff --git a/windows/aliases.go b/windows/aliases.go index a20ebea633..ce2d713d62 100644 --- a/windows/aliases.go +++ b/windows/aliases.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows && go1.9 -// +build windows,go1.9 package windows diff --git a/windows/empty.s b/windows/empty.s index fdbbbcd317..ba64caca5d 100644 --- a/windows/empty.s +++ b/windows/empty.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !go1.12 -// +build !go1.12 // This file is here to allow bodyless functions with go:linkname for Go 1.11 // and earlier (see https://golang.org/issue/23311). diff --git a/windows/eventlog.go b/windows/eventlog.go index 2cd60645ee..6c366955d9 100644 --- a/windows/eventlog.go +++ b/windows/eventlog.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package windows diff --git a/windows/mksyscall.go b/windows/mksyscall.go index 8563f79c57..dbcdb090c0 100644 --- a/windows/mksyscall.go +++ b/windows/mksyscall.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build generate -// +build generate package windows diff --git a/windows/race.go b/windows/race.go index 9196b089ca..0f1bdc3860 100644 --- a/windows/race.go +++ b/windows/race.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows && race -// +build windows,race package windows diff --git a/windows/race0.go b/windows/race0.go index 7bae4817a0..0c78da78b1 100644 --- a/windows/race0.go +++ b/windows/race0.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows && !race -// +build windows,!race package windows diff --git a/windows/registry/export_test.go b/windows/registry/export_test.go index d02d93f287..7f1ac70e8f 100644 --- a/windows/registry/export_test.go +++ b/windows/registry/export_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package registry diff --git a/windows/registry/key.go b/windows/registry/key.go index 6c8d97b6a5..fd8632444e 100644 --- a/windows/registry/key.go +++ b/windows/registry/key.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows // Package registry provides access to the Windows registry. // diff --git a/windows/registry/mksyscall.go b/windows/registry/mksyscall.go index ee74927d3c..bbf86ccf0c 100644 --- a/windows/registry/mksyscall.go +++ b/windows/registry/mksyscall.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build generate -// +build generate package registry diff --git a/windows/registry/registry_test.go b/windows/registry/registry_test.go index e2dd66fb3e..c227a5db62 100644 --- a/windows/registry/registry_test.go +++ b/windows/registry/registry_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package registry_test diff --git a/windows/registry/syscall.go b/windows/registry/syscall.go index 4173351230..f533091c19 100644 --- a/windows/registry/syscall.go +++ b/windows/registry/syscall.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package registry diff --git a/windows/registry/value.go b/windows/registry/value.go index 2789f6f18d..74db26b94d 100644 --- a/windows/registry/value.go +++ b/windows/registry/value.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package registry diff --git a/windows/service.go b/windows/service.go index c44a1b9636..a9dc6308d6 100644 --- a/windows/service.go +++ b/windows/service.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package windows diff --git a/windows/str.go b/windows/str.go index 4fc01434e4..6a4f9ce6aa 100644 --- a/windows/str.go +++ b/windows/str.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package windows diff --git a/windows/svc/debug/log.go b/windows/svc/debug/log.go index 6ee64ca819..e99d8317dc 100644 --- a/windows/svc/debug/log.go +++ b/windows/svc/debug/log.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package debug diff --git a/windows/svc/debug/service.go b/windows/svc/debug/service.go index 684c5dcbab..bd1327e7e5 100644 --- a/windows/svc/debug/service.go +++ b/windows/svc/debug/service.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows // Package debug provides facilities to execute svc.Handler on console. package debug diff --git a/windows/svc/eventlog/install.go b/windows/svc/eventlog/install.go index 43e324f4b4..1179c38bc7 100644 --- a/windows/svc/eventlog/install.go +++ b/windows/svc/eventlog/install.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package eventlog diff --git a/windows/svc/eventlog/log.go b/windows/svc/eventlog/log.go index f37b4b5107..f279444d98 100644 --- a/windows/svc/eventlog/log.go +++ b/windows/svc/eventlog/log.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows // Package eventlog implements access to Windows event log. package eventlog diff --git a/windows/svc/eventlog/log_test.go b/windows/svc/eventlog/log_test.go index a667b8fbec..79adc1a78b 100644 --- a/windows/svc/eventlog/log_test.go +++ b/windows/svc/eventlog/log_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package eventlog_test diff --git a/windows/svc/example/beep.go b/windows/svc/example/beep.go index b454f59386..18d5113c0e 100644 --- a/windows/svc/example/beep.go +++ b/windows/svc/example/beep.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package main diff --git a/windows/svc/example/install.go b/windows/svc/example/install.go index 4e9ac883aa..6394fc10d6 100644 --- a/windows/svc/example/install.go +++ b/windows/svc/example/install.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package main diff --git a/windows/svc/example/main.go b/windows/svc/example/main.go index 62f947027f..f9786635ed 100644 --- a/windows/svc/example/main.go +++ b/windows/svc/example/main.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows // Example service program that beeps. // diff --git a/windows/svc/example/manage.go b/windows/svc/example/manage.go index 8ba3952a84..be3556cba5 100644 --- a/windows/svc/example/manage.go +++ b/windows/svc/example/manage.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package main diff --git a/windows/svc/example/service.go b/windows/svc/example/service.go index 08d54b51a3..373da64ddf 100644 --- a/windows/svc/example/service.go +++ b/windows/svc/example/service.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package main diff --git a/windows/svc/mgr/config.go b/windows/svc/mgr/config.go index 04554862c2..a6d3e8a88a 100644 --- a/windows/svc/mgr/config.go +++ b/windows/svc/mgr/config.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package mgr diff --git a/windows/svc/mgr/mgr.go b/windows/svc/mgr/mgr.go index 4449161a7b..dbfd729fec 100644 --- a/windows/svc/mgr/mgr.go +++ b/windows/svc/mgr/mgr.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows // Package mgr can be used to manage Windows service programs. // It can be used to install and remove them. It can also start, diff --git a/windows/svc/mgr/mgr_test.go b/windows/svc/mgr/mgr_test.go index 285dc10ddd..7741b117da 100644 --- a/windows/svc/mgr/mgr_test.go +++ b/windows/svc/mgr/mgr_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package mgr_test diff --git a/windows/svc/mgr/recovery.go b/windows/svc/mgr/recovery.go index f7d13bbdf1..cdf880e13a 100644 --- a/windows/svc/mgr/recovery.go +++ b/windows/svc/mgr/recovery.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package mgr diff --git a/windows/svc/mgr/service.go b/windows/svc/mgr/service.go index be3d151a3f..c9740ef0ce 100644 --- a/windows/svc/mgr/service.go +++ b/windows/svc/mgr/service.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package mgr diff --git a/windows/svc/security.go b/windows/svc/security.go index 1c51006eab..6a1f3c627b 100644 --- a/windows/svc/security.go +++ b/windows/svc/security.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package svc diff --git a/windows/svc/service.go b/windows/svc/service.go index e9e47f0b4e..c96932d962 100644 --- a/windows/svc/service.go +++ b/windows/svc/service.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows // Package svc provides everything required to build Windows service. package svc diff --git a/windows/svc/svc_test.go b/windows/svc/svc_test.go index 81161b85a3..be369ea211 100644 --- a/windows/svc/svc_test.go +++ b/windows/svc/svc_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package svc_test diff --git a/windows/syscall.go b/windows/syscall.go index 8732cdb957..e85ed6b9c8 100644 --- a/windows/syscall.go +++ b/windows/syscall.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows // Package windows contains an interface to the low-level operating system // primitives. OS details vary depending on the underlying system, and diff --git a/windows/syscall_test.go b/windows/syscall_test.go index fd4a01568d..4b29fad596 100644 --- a/windows/syscall_test.go +++ b/windows/syscall_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package windows_test From 1e638101df598a2021589b119c659547ca236d51 Mon Sep 17 00:00:00 2001 From: F Y Date: Tue, 17 Oct 2023 10:01:27 +0100 Subject: [PATCH 5/9] unix: stop counting trailing NUL for abstract addresses starting with NUL Changes trailing-NUL-counting behavior for abstract addresses starting with the NUL character to be the same as abstract addresses starting with the @ character. For golang/go#63579. Change-Id: I2f26de4bcf614c4635ad188b1afa3d14ebd9a95f Reviewed-on: https://go-review.googlesource.com/c/sys/+/535955 Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor Reviewed-by: Benny Siegert LUCI-TryBot-Result: Go LUCI --- unix/syscall_aix.go | 3 ++- unix/syscall_internal_linux_test.go | 12 +++++++++++- unix/syscall_linux.go | 3 ++- unix/syscall_solaris.go | 3 ++- windows/syscall_windows.go | 3 ++- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/unix/syscall_aix.go b/unix/syscall_aix.go index 6d3009d214..67ce6cef2d 100644 --- a/unix/syscall_aix.go +++ b/unix/syscall_aix.go @@ -106,7 +106,8 @@ func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) { if n > 0 { sl += _Socklen(n) + 1 } - if sa.raw.Path[0] == '@' { + if sa.raw.Path[0] == '@' || (sa.raw.Path[0] == 0 && sl > 3) { + // Check sl > 3 so we don't change unnamed socket behavior. sa.raw.Path[0] = 0 // Don't count trailing NUL for abstract address. sl-- diff --git a/unix/syscall_internal_linux_test.go b/unix/syscall_internal_linux_test.go index 7d34c4f1e2..e8b749170d 100644 --- a/unix/syscall_internal_linux_test.go +++ b/unix/syscall_internal_linux_test.go @@ -517,7 +517,7 @@ func TestSockaddrUnix_sockaddr(t *testing.T) { slen: 2, // family (uint16) }, { - name: "abstract", + name: "abstract_starting_with_at", sa: &SockaddrUnix{ Name: "@", }, @@ -526,6 +526,16 @@ func TestSockaddrUnix_sockaddr(t *testing.T) { }, slen: 3, // family (uint16) + NULL }, + { + name: "abstract_starting_with_null", + sa: &SockaddrUnix{ + Name: "\x00", + }, + raw: &RawSockaddrUnix{ + Family: AF_UNIX, + }, + slen: 3, // family (uint16) + NULL + }, { name: "named", sa: &SockaddrUnix{ diff --git a/unix/syscall_linux.go b/unix/syscall_linux.go index 6b8a4ad69c..a5e1c10e34 100644 --- a/unix/syscall_linux.go +++ b/unix/syscall_linux.go @@ -417,7 +417,8 @@ func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) { if n > 0 { sl += _Socklen(n) + 1 } - if sa.raw.Path[0] == '@' { + if sa.raw.Path[0] == '@' || (sa.raw.Path[0] == 0 && sl > 3) { + // Check sl > 3 so we don't change unnamed socket behavior. sa.raw.Path[0] = 0 // Don't count trailing NUL for abstract address. sl-- diff --git a/unix/syscall_solaris.go b/unix/syscall_solaris.go index b99cfa1342..60c8142d49 100644 --- a/unix/syscall_solaris.go +++ b/unix/syscall_solaris.go @@ -128,7 +128,8 @@ func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) { if n > 0 { sl += _Socklen(n) + 1 } - if sa.raw.Path[0] == '@' { + if sa.raw.Path[0] == '@' || (sa.raw.Path[0] == 0 && sl > 3) { + // Check sl > 3 so we don't change unnamed socket behavior. sa.raw.Path[0] = 0 // Don't count trailing NUL for abstract address. sl-- diff --git a/windows/syscall_windows.go b/windows/syscall_windows.go index dcaa40977f..fb6cfd0462 100644 --- a/windows/syscall_windows.go +++ b/windows/syscall_windows.go @@ -970,7 +970,8 @@ func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, int32, error) { if n > 0 { sl += int32(n) + 1 } - if sa.raw.Path[0] == '@' { + if sa.raw.Path[0] == '@' || (sa.raw.Path[0] == 0 && sl > 3) { + // Check sl > 3 so we don't change unnamed socket behavior. sa.raw.Path[0] = 0 // Don't count trailing NUL for abstract address. sl-- From 249e16f7caf5bdc2b6025811648e1074df96e3f5 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Tue, 24 Oct 2023 14:39:43 +0000 Subject: [PATCH 6/9] unix: require minimum OpenBSD 6.4 for pledge, unveil OpenBSD 7.3 and 7.4 are the only supported OpenBSD releases. This change simplifies the version detection and error handling to require at least OpenBSD 6.4 to call the Pledge and Unveil functions. Updates golang/go#63569. Change-Id: I6bd0d58807a73a532ddd2d3239687ca19a93db9d GitHub-Last-Rev: d03d157e76d1d861fa8bd9be179f9dc4fb91f8d2 GitHub-Pull-Request: golang/sys#177 Reviewed-on: https://go-review.googlesource.com/c/sys/+/537355 TryBot-Result: Gopher Robot Run-TryBot: Joel Sing Reviewed-by: David Chase Reviewed-by: Cherry Mui Reviewed-by: Joel Sing --- unix/pledge_openbsd.go | 68 +++++++++++++----------------------------- unix/unveil_openbsd.go | 23 ++++++++++++++ 2 files changed, 44 insertions(+), 47 deletions(-) diff --git a/unix/pledge_openbsd.go b/unix/pledge_openbsd.go index eb48294b27..a614929fdc 100644 --- a/unix/pledge_openbsd.go +++ b/unix/pledge_openbsd.go @@ -14,43 +14,28 @@ import ( // Pledge implements the pledge syscall. // -// The pledge syscall does not accept execpromises on OpenBSD releases -// before 6.3. -// -// execpromises must be empty when Pledge is called on OpenBSD -// releases predating 6.3, otherwise an error will be returned. +// This changes both the promises and execpromises; use PledgePromises or +// PledgeExecpromises to only change the promises or execpromises +// respectively. // // For more information see pledge(2). func Pledge(promises, execpromises string) error { - maj, min, err := majmin() - if err != nil { + if err := pledgeAvailable(); err != nil { return err } - err = pledgeAvailable(maj, min, execpromises) + pptr, err := syscall.BytePtrFromString(promises) if err != nil { return err } - pptr, err := syscall.BytePtrFromString(promises) + exptr, err := syscall.BytePtrFromString(execpromises) if err != nil { return err } - // This variable will hold either a nil unsafe.Pointer or - // an unsafe.Pointer to a string (execpromises). - var expr unsafe.Pointer - - // If we're running on OpenBSD > 6.2, pass execpromises to the syscall. - if maj > 6 || (maj == 6 && min > 2) { - exptr, err := syscall.BytePtrFromString(execpromises) - if err != nil { - return err - } - expr = unsafe.Pointer(exptr) - } - - _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), uintptr(expr), 0) + _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), + uintptr(unsafe.Pointer(exptr)), 0) if e != 0 { return e } @@ -64,13 +49,7 @@ func Pledge(promises, execpromises string) error { // // For more information see pledge(2). func PledgePromises(promises string) error { - maj, min, err := majmin() - if err != nil { - return err - } - - err = pledgeAvailable(maj, min, "") - if err != nil { + if err := pledgeAvailable(); err != nil { return err } @@ -82,7 +61,8 @@ func PledgePromises(promises string) error { return err } - _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), uintptr(expr), 0) + _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), + uintptr(expr), 0) if e != 0 { return e } @@ -96,13 +76,7 @@ func PledgePromises(promises string) error { // // For more information see pledge(2). func PledgeExecpromises(execpromises string) error { - maj, min, err := majmin() - if err != nil { - return err - } - - err = pledgeAvailable(maj, min, execpromises) - if err != nil { + if err := pledgeAvailable(); err != nil { return err } @@ -114,7 +88,8 @@ func PledgeExecpromises(execpromises string) error { return err } - _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(pptr), uintptr(unsafe.Pointer(exptr)), 0) + _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(pptr), + uintptr(unsafe.Pointer(exptr)), 0) if e != 0 { return e } @@ -147,16 +122,15 @@ func majmin() (major int, minor int, err error) { // pledgeAvailable checks for availability of the pledge(2) syscall // based on the running OpenBSD version. -func pledgeAvailable(maj, min int, execpromises string) error { - // If OpenBSD <= 5.9, pledge is not available. - if (maj == 5 && min != 9) || maj < 5 { - return fmt.Errorf("pledge syscall is not available on OpenBSD %d.%d", maj, min) +func pledgeAvailable() error { + maj, min, err := majmin() + if err != nil { + return err } - // If OpenBSD <= 6.2 and execpromises is not empty, - // return an error - execpromises is not available before 6.3 - if (maj < 6 || (maj == 6 && min <= 2)) && execpromises != "" { - return fmt.Errorf("cannot use execpromises on OpenBSD %d.%d", maj, min) + // Require OpenBSD 6.4 as a minimum. + if maj < 6 || (maj == 6 && min <= 3) { + return fmt.Errorf("cannot call Pledge on OpenBSD %d.%d", maj, min) } return nil diff --git a/unix/unveil_openbsd.go b/unix/unveil_openbsd.go index 168d5ae779..2a885187d2 100644 --- a/unix/unveil_openbsd.go +++ b/unix/unveil_openbsd.go @@ -5,6 +5,7 @@ package unix import ( + "fmt" "syscall" "unsafe" ) @@ -14,6 +15,9 @@ import ( // Note that the special case of blocking further // unveil calls is handled by UnveilBlock. func Unveil(path string, flags string) error { + if err := supportsUnveil(); err != nil { + return err + } pathPtr, err := syscall.BytePtrFromString(path) if err != nil { return err @@ -32,6 +36,9 @@ func Unveil(path string, flags string) error { // UnveilBlock blocks future unveil calls. // For more information see unveil(2). func UnveilBlock() error { + if err := supportsUnveil(); err != nil { + return err + } // Both pointers must be nil. var pathUnsafe, flagsUnsafe unsafe.Pointer _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(pathUnsafe), uintptr(flagsUnsafe), 0) @@ -40,3 +47,19 @@ func UnveilBlock() error { } return nil } + +// supportsUnveil checks for availability of the unveil(2) system call based +// on the running OpenBSD version. +func supportsUnveil() error { + maj, min, err := majmin() + if err != nil { + return err + } + + // unveil is not available before 6.4 + if maj < 6 || (maj == 6 && min <= 3) { + return fmt.Errorf("cannot call Unveil on OpenBSD %d.%d", maj, min) + } + + return nil +} From 1168e2596da3c107050a45359d2a33b6ff4b5bc6 Mon Sep 17 00:00:00 2001 From: Mauri de Souza Meneguzzo Date: Mon, 30 Oct 2023 23:29:32 +0000 Subject: [PATCH 7/9] unix/linux: update Linux kernel to v6.6 Update the Dockerfile to clone Linux v6.6 and commit the changes generated by GOOS=linux ./mkall.sh. Fixes golang/go#63833 Change-Id: I35e0b01598809d18e04b073ef1abd58ae936f43c GitHub-Last-Rev: b2a502ffc633e36a7c6de5b8a924904658485f92 GitHub-Pull-Request: golang/sys#178 Reviewed-on: https://go-review.googlesource.com/c/sys/+/538378 Run-TryBot: Tobias Klauser LUCI-TryBot-Result: Go LUCI TryBot-Result: Gopher Robot Auto-Submit: Tobias Klauser Reviewed-by: Bryan Mills Reviewed-by: Tobias Klauser Reviewed-by: Cherry Mui --- unix/linux/Dockerfile | 4 ++-- unix/zerrors_linux.go | 13 ++++++++++++- unix/zerrors_linux_loong64.go | 1 + unix/zerrors_linux_riscv64.go | 3 +++ unix/zsysnum_linux_386.go | 1 + unix/zsysnum_linux_amd64.go | 2 ++ unix/zsysnum_linux_arm.go | 1 + unix/zsysnum_linux_arm64.go | 1 + unix/zsysnum_linux_loong64.go | 1 + unix/zsysnum_linux_mips.go | 1 + unix/zsysnum_linux_mips64.go | 1 + unix/zsysnum_linux_mips64le.go | 1 + unix/zsysnum_linux_mipsle.go | 1 + unix/zsysnum_linux_ppc.go | 1 + unix/zsysnum_linux_ppc64.go | 1 + unix/zsysnum_linux_ppc64le.go | 1 + unix/zsysnum_linux_riscv64.go | 1 + unix/zsysnum_linux_s390x.go | 1 + unix/zsysnum_linux_sparc64.go | 1 + 19 files changed, 34 insertions(+), 3 deletions(-) diff --git a/unix/linux/Dockerfile b/unix/linux/Dockerfile index 731f2fe309..312e0f7d16 100644 --- a/unix/linux/Dockerfile +++ b/unix/linux/Dockerfile @@ -15,8 +15,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ # Get the git sources. If not cached, this takes O(5 minutes). WORKDIR /git RUN git config --global advice.detachedHead false -# Linux Kernel: Released 27 August 2023 -RUN git clone --branch v6.5 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux +# Linux Kernel: Released 30 October 2023 +RUN git clone --branch v6.6 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux # GNU C library: Released 1 Feb 2023 RUN git clone --branch release/2.37/master --depth 1 https://sourceware.org/git/glibc.git diff --git a/unix/zerrors_linux.go b/unix/zerrors_linux.go index 2409c44780..9c00cbf512 100644 --- a/unix/zerrors_linux.go +++ b/unix/zerrors_linux.go @@ -480,10 +480,14 @@ const ( BPF_FROM_BE = 0x8 BPF_FROM_LE = 0x0 BPF_FS_MAGIC = 0xcafe4a11 + BPF_F_AFTER = 0x10 BPF_F_ALLOW_MULTI = 0x2 BPF_F_ALLOW_OVERRIDE = 0x1 BPF_F_ANY_ALIGNMENT = 0x2 - BPF_F_KPROBE_MULTI_RETURN = 0x1 + BPF_F_BEFORE = 0x8 + BPF_F_ID = 0x20 + BPF_F_LINK = 0x2000 + BPF_F_NETFILTER_IP_DEFRAG = 0x1 BPF_F_QUERY_EFFECTIVE = 0x1 BPF_F_REPLACE = 0x4 BPF_F_SLEEPABLE = 0x10 @@ -520,6 +524,7 @@ const ( BPF_MAJOR_VERSION = 0x1 BPF_MAXINSNS = 0x1000 BPF_MEM = 0x60 + BPF_MEMSX = 0x80 BPF_MEMWORDS = 0x10 BPF_MINOR_VERSION = 0x1 BPF_MISC = 0x7 @@ -775,6 +780,8 @@ const ( DEVLINK_GENL_MCGRP_CONFIG_NAME = "config" DEVLINK_GENL_NAME = "devlink" DEVLINK_GENL_VERSION = 0x1 + DEVLINK_PORT_FN_CAP_IPSEC_CRYPTO = 0x4 + DEVLINK_PORT_FN_CAP_IPSEC_PACKET = 0x8 DEVLINK_PORT_FN_CAP_MIGRATABLE = 0x2 DEVLINK_PORT_FN_CAP_ROCE = 0x1 DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14 @@ -1697,6 +1704,7 @@ const ( KEXEC_ON_CRASH = 0x1 KEXEC_PRESERVE_CONTEXT = 0x2 KEXEC_SEGMENT_MAX = 0x10 + KEXEC_UPDATE_ELFCOREHDR = 0x4 KEYCTL_ASSUME_AUTHORITY = 0x10 KEYCTL_CAPABILITIES = 0x1f KEYCTL_CAPS0_BIG_KEY = 0x10 @@ -2274,6 +2282,7 @@ const ( PERF_MEM_LVLNUM_PMEM = 0xe PERF_MEM_LVLNUM_RAM = 0xd PERF_MEM_LVLNUM_SHIFT = 0x21 + PERF_MEM_LVLNUM_UNC = 0x8 PERF_MEM_LVL_HIT = 0x2 PERF_MEM_LVL_IO = 0x1000 PERF_MEM_LVL_L1 = 0x8 @@ -3460,6 +3469,7 @@ const ( XDP_PACKET_HEADROOM = 0x100 XDP_PGOFF_RX_RING = 0x0 XDP_PGOFF_TX_RING = 0x80000000 + XDP_PKT_CONTD = 0x1 XDP_RING_NEED_WAKEUP = 0x1 XDP_RX_RING = 0x2 XDP_SHARED_UMEM = 0x1 @@ -3472,6 +3482,7 @@ const ( XDP_UMEM_REG = 0x4 XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1 XDP_USE_NEED_WAKEUP = 0x8 + XDP_USE_SG = 0x10 XDP_ZEROCOPY = 0x4 XENFS_SUPER_MAGIC = 0xabba1974 XFS_SUPER_MAGIC = 0x58465342 diff --git a/unix/zerrors_linux_loong64.go b/unix/zerrors_linux_loong64.go index e6467bd23b..27ac4a09e2 100644 --- a/unix/zerrors_linux_loong64.go +++ b/unix/zerrors_linux_loong64.go @@ -118,6 +118,7 @@ const ( IXOFF = 0x1000 IXON = 0x400 LASX_CTX_MAGIC = 0x41535801 + LBT_CTX_MAGIC = 0x42540001 LSX_CTX_MAGIC = 0x53580001 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 diff --git a/unix/zerrors_linux_riscv64.go b/unix/zerrors_linux_riscv64.go index c597e31db6..18f2813ed5 100644 --- a/unix/zerrors_linux_riscv64.go +++ b/unix/zerrors_linux_riscv64.go @@ -227,6 +227,9 @@ const ( PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTRACE_GETFDPIC = 0x21 + PTRACE_GETFDPIC_EXEC = 0x0 + PTRACE_GETFDPIC_INTERP = 0x1 RLIMIT_AS = 0x9 RLIMIT_MEMLOCK = 0x8 RLIMIT_NOFILE = 0x7 diff --git a/unix/zsysnum_linux_386.go b/unix/zsysnum_linux_386.go index 2d181ba7b2..fcf3ecbdde 100644 --- a/unix/zsysnum_linux_386.go +++ b/unix/zsysnum_linux_386.go @@ -447,4 +447,5 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 ) diff --git a/unix/zsysnum_linux_amd64.go b/unix/zsysnum_linux_amd64.go index 2b25ab33cf..f56dc2504a 100644 --- a/unix/zsysnum_linux_amd64.go +++ b/unix/zsysnum_linux_amd64.go @@ -369,4 +369,6 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 ) diff --git a/unix/zsysnum_linux_arm.go b/unix/zsysnum_linux_arm.go index b43e7c4c21..974bf24676 100644 --- a/unix/zsysnum_linux_arm.go +++ b/unix/zsysnum_linux_arm.go @@ -411,4 +411,5 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 ) diff --git a/unix/zsysnum_linux_arm64.go b/unix/zsysnum_linux_arm64.go index d50622f82e..39a2739e23 100644 --- a/unix/zsysnum_linux_arm64.go +++ b/unix/zsysnum_linux_arm64.go @@ -314,4 +314,5 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 ) diff --git a/unix/zsysnum_linux_loong64.go b/unix/zsysnum_linux_loong64.go index 7c31dbe4fe..cf9c9d77e1 100644 --- a/unix/zsysnum_linux_loong64.go +++ b/unix/zsysnum_linux_loong64.go @@ -308,4 +308,5 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 ) diff --git a/unix/zsysnum_linux_mips.go b/unix/zsysnum_linux_mips.go index 2b01364d7e..10b7362ef4 100644 --- a/unix/zsysnum_linux_mips.go +++ b/unix/zsysnum_linux_mips.go @@ -431,4 +431,5 @@ const ( SYS_FUTEX_WAITV = 4449 SYS_SET_MEMPOLICY_HOME_NODE = 4450 SYS_CACHESTAT = 4451 + SYS_FCHMODAT2 = 4452 ) diff --git a/unix/zsysnum_linux_mips64.go b/unix/zsysnum_linux_mips64.go index 9bb31708e8..cd4d8b4fd3 100644 --- a/unix/zsysnum_linux_mips64.go +++ b/unix/zsysnum_linux_mips64.go @@ -361,4 +361,5 @@ const ( SYS_FUTEX_WAITV = 5449 SYS_SET_MEMPOLICY_HOME_NODE = 5450 SYS_CACHESTAT = 5451 + SYS_FCHMODAT2 = 5452 ) diff --git a/unix/zsysnum_linux_mips64le.go b/unix/zsysnum_linux_mips64le.go index 8413fe6dc0..2c0efca818 100644 --- a/unix/zsysnum_linux_mips64le.go +++ b/unix/zsysnum_linux_mips64le.go @@ -361,4 +361,5 @@ const ( SYS_FUTEX_WAITV = 5449 SYS_SET_MEMPOLICY_HOME_NODE = 5450 SYS_CACHESTAT = 5451 + SYS_FCHMODAT2 = 5452 ) diff --git a/unix/zsysnum_linux_mipsle.go b/unix/zsysnum_linux_mipsle.go index cf76a275ad..a72e31d391 100644 --- a/unix/zsysnum_linux_mipsle.go +++ b/unix/zsysnum_linux_mipsle.go @@ -431,4 +431,5 @@ const ( SYS_FUTEX_WAITV = 4449 SYS_SET_MEMPOLICY_HOME_NODE = 4450 SYS_CACHESTAT = 4451 + SYS_FCHMODAT2 = 4452 ) diff --git a/unix/zsysnum_linux_ppc.go b/unix/zsysnum_linux_ppc.go index 7999422733..c7d1e37471 100644 --- a/unix/zsysnum_linux_ppc.go +++ b/unix/zsysnum_linux_ppc.go @@ -438,4 +438,5 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 ) diff --git a/unix/zsysnum_linux_ppc64.go b/unix/zsysnum_linux_ppc64.go index 75904d52b9..f4d4838c87 100644 --- a/unix/zsysnum_linux_ppc64.go +++ b/unix/zsysnum_linux_ppc64.go @@ -410,4 +410,5 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 ) diff --git a/unix/zsysnum_linux_ppc64le.go b/unix/zsysnum_linux_ppc64le.go index f5f681c3de..b64f0e5911 100644 --- a/unix/zsysnum_linux_ppc64le.go +++ b/unix/zsysnum_linux_ppc64le.go @@ -410,4 +410,5 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 ) diff --git a/unix/zsysnum_linux_riscv64.go b/unix/zsysnum_linux_riscv64.go index 391954743d..95711195a0 100644 --- a/unix/zsysnum_linux_riscv64.go +++ b/unix/zsysnum_linux_riscv64.go @@ -315,4 +315,5 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 ) diff --git a/unix/zsysnum_linux_s390x.go b/unix/zsysnum_linux_s390x.go index f33ceef17d..f94e943bc4 100644 --- a/unix/zsysnum_linux_s390x.go +++ b/unix/zsysnum_linux_s390x.go @@ -376,4 +376,5 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 ) diff --git a/unix/zsysnum_linux_sparc64.go b/unix/zsysnum_linux_sparc64.go index a2ce59e73f..ba0c2bc515 100644 --- a/unix/zsysnum_linux_sparc64.go +++ b/unix/zsysnum_linux_sparc64.go @@ -389,4 +389,5 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 ) From 661d749b94a62dfdcbe1027bb3c2cdea498377b9 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Thu, 2 Nov 2023 13:00:58 +0000 Subject: [PATCH 8/9] unix: use libc stubs for OpenBSD pledge+unveil Future OpenBSD releases will remove the syscall(2) interface. This converts the Pledge and Unveil calls to use pledge(2) and unveil(2) from libc, rather than indirectly through syscall(2). Updates golang/go#63900. Change-Id: I61e22d8f52f16c8f5e4c0717acae0d5bf4271503 GitHub-Last-Rev: ebc0461460297de6d4f677a48d3a361d7e620df0 GitHub-Pull-Request: golang/sys#146 Reviewed-on: https://go-review.googlesource.com/c/sys/+/468095 Reviewed-by: Cherry Mui Reviewed-by: Mauri de Souza Meneguzzo Reviewed-by: Joel Sing Reviewed-by: Tobias Klauser Run-TryBot: Joel Sing TryBot-Result: Gopher Robot Reviewed-by: Aaron Bieber Reviewed-by: Bryan Mills --- unix/pledge_openbsd.go | 40 ++++++-------------------------- unix/syscall_openbsd.go | 2 ++ unix/unveil_openbsd.go | 24 ++++--------------- unix/zsyscall_openbsd_386.go | 30 ++++++++++++++++++++++++ unix/zsyscall_openbsd_386.s | 10 ++++++++ unix/zsyscall_openbsd_amd64.go | 30 ++++++++++++++++++++++++ unix/zsyscall_openbsd_amd64.s | 10 ++++++++ unix/zsyscall_openbsd_arm.go | 30 ++++++++++++++++++++++++ unix/zsyscall_openbsd_arm.s | 10 ++++++++ unix/zsyscall_openbsd_arm64.go | 30 ++++++++++++++++++++++++ unix/zsyscall_openbsd_arm64.s | 10 ++++++++ unix/zsyscall_openbsd_mips64.go | 30 ++++++++++++++++++++++++ unix/zsyscall_openbsd_mips64.s | 10 ++++++++ unix/zsyscall_openbsd_ppc64.go | 30 ++++++++++++++++++++++++ unix/zsyscall_openbsd_ppc64.s | 12 ++++++++++ unix/zsyscall_openbsd_riscv64.go | 30 ++++++++++++++++++++++++ unix/zsyscall_openbsd_riscv64.s | 10 ++++++++ 17 files changed, 296 insertions(+), 52 deletions(-) diff --git a/unix/pledge_openbsd.go b/unix/pledge_openbsd.go index a614929fdc..6a09af53e6 100644 --- a/unix/pledge_openbsd.go +++ b/unix/pledge_openbsd.go @@ -8,8 +8,6 @@ import ( "errors" "fmt" "strconv" - "syscall" - "unsafe" ) // Pledge implements the pledge syscall. @@ -24,23 +22,17 @@ func Pledge(promises, execpromises string) error { return err } - pptr, err := syscall.BytePtrFromString(promises) + pptr, err := BytePtrFromString(promises) if err != nil { return err } - exptr, err := syscall.BytePtrFromString(execpromises) + exptr, err := BytePtrFromString(execpromises) if err != nil { return err } - _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), - uintptr(unsafe.Pointer(exptr)), 0) - if e != 0 { - return e - } - - return nil + return pledge(pptr, exptr) } // PledgePromises implements the pledge syscall. @@ -53,21 +45,12 @@ func PledgePromises(promises string) error { return err } - // This variable holds the execpromises and is always nil. - var expr unsafe.Pointer - - pptr, err := syscall.BytePtrFromString(promises) + pptr, err := BytePtrFromString(promises) if err != nil { return err } - _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), - uintptr(expr), 0) - if e != 0 { - return e - } - - return nil + return pledge(pptr, nil) } // PledgeExecpromises implements the pledge syscall. @@ -80,21 +63,12 @@ func PledgeExecpromises(execpromises string) error { return err } - // This variable holds the promises and is always nil. - var pptr unsafe.Pointer - - exptr, err := syscall.BytePtrFromString(execpromises) + exptr, err := BytePtrFromString(execpromises) if err != nil { return err } - _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(pptr), - uintptr(unsafe.Pointer(exptr)), 0) - if e != 0 { - return e - } - - return nil + return pledge(nil, exptr) } // majmin returns major and minor version number for an OpenBSD system. diff --git a/unix/syscall_openbsd.go b/unix/syscall_openbsd.go index 6f34479b59..748377c7ae 100644 --- a/unix/syscall_openbsd.go +++ b/unix/syscall_openbsd.go @@ -327,3 +327,5 @@ func Uname(uname *Utsname) error { //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) //sys munmap(addr uintptr, length uintptr) (err error) //sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) +//sys pledge(promises *byte, execpromises *byte) (err error) +//sys unveil(path *byte, flags *byte) (err error) diff --git a/unix/unveil_openbsd.go b/unix/unveil_openbsd.go index 2a885187d2..cb7e598cef 100644 --- a/unix/unveil_openbsd.go +++ b/unix/unveil_openbsd.go @@ -4,11 +4,7 @@ package unix -import ( - "fmt" - "syscall" - "unsafe" -) +import "fmt" // Unveil implements the unveil syscall. // For more information see unveil(2). @@ -18,19 +14,15 @@ func Unveil(path string, flags string) error { if err := supportsUnveil(); err != nil { return err } - pathPtr, err := syscall.BytePtrFromString(path) + pathPtr, err := BytePtrFromString(path) if err != nil { return err } - flagsPtr, err := syscall.BytePtrFromString(flags) + flagsPtr, err := BytePtrFromString(flags) if err != nil { return err } - _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(unsafe.Pointer(pathPtr)), uintptr(unsafe.Pointer(flagsPtr)), 0) - if e != 0 { - return e - } - return nil + return unveil(pathPtr, flagsPtr) } // UnveilBlock blocks future unveil calls. @@ -39,13 +31,7 @@ func UnveilBlock() error { if err := supportsUnveil(); err != nil { return err } - // Both pointers must be nil. - var pathUnsafe, flagsUnsafe unsafe.Pointer - _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(pathUnsafe), uintptr(flagsUnsafe), 0) - if e != 0 { - return e - } - return nil + return unveil(nil, nil) } // supportsUnveil checks for availability of the unveil(2) system call based diff --git a/unix/zsyscall_openbsd_386.go b/unix/zsyscall_openbsd_386.go index 9da3ec3772..63b4aac8de 100644 --- a/unix/zsyscall_openbsd_386.go +++ b/unix/zsyscall_openbsd_386.go @@ -2228,3 +2228,33 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pledge(promises *byte, execpromises *byte) (err error) { + _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pledge_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pledge pledge "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unveil(path *byte, flags *byte) (err error) { + _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_unveil_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unveil unveil "libc.so" + + diff --git a/unix/zsyscall_openbsd_386.s b/unix/zsyscall_openbsd_386.s index 3dcacd30d7..5cb7c451ba 100644 --- a/unix/zsyscall_openbsd_386.s +++ b/unix/zsyscall_openbsd_386.s @@ -672,3 +672,13 @@ TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4 DATA ·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB) + +TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pledge(SB) +GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $4 +DATA ·libc_pledge_trampoline_addr(SB)/4, $libc_pledge_trampoline<>(SB) + +TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_unveil(SB) +GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $4 +DATA ·libc_unveil_trampoline_addr(SB)/4, $libc_unveil_trampoline<>(SB) diff --git a/unix/zsyscall_openbsd_amd64.go b/unix/zsyscall_openbsd_amd64.go index cc273c4126..d6c4145812 100644 --- a/unix/zsyscall_openbsd_amd64.go +++ b/unix/zsyscall_openbsd_amd64.go @@ -2228,3 +2228,33 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pledge(promises *byte, execpromises *byte) (err error) { + _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pledge_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pledge pledge "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unveil(path *byte, flags *byte) (err error) { + _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_unveil_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unveil unveil "libc.so" + + diff --git a/unix/zsyscall_openbsd_amd64.s b/unix/zsyscall_openbsd_amd64.s index 2763620b01..316c47e837 100644 --- a/unix/zsyscall_openbsd_amd64.s +++ b/unix/zsyscall_openbsd_amd64.s @@ -672,3 +672,13 @@ TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) + +TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pledge(SB) +GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB) + +TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_unveil(SB) +GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8 +DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB) diff --git a/unix/zsyscall_openbsd_arm.go b/unix/zsyscall_openbsd_arm.go index fa34e22e3b..4e22b7563c 100644 --- a/unix/zsyscall_openbsd_arm.go +++ b/unix/zsyscall_openbsd_arm.go @@ -2228,3 +2228,33 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pledge(promises *byte, execpromises *byte) (err error) { + _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pledge_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pledge pledge "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unveil(path *byte, flags *byte) (err error) { + _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_unveil_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unveil unveil "libc.so" + + diff --git a/unix/zsyscall_openbsd_arm.s b/unix/zsyscall_openbsd_arm.s index c922314048..e1d81bf9c4 100644 --- a/unix/zsyscall_openbsd_arm.s +++ b/unix/zsyscall_openbsd_arm.s @@ -672,3 +672,13 @@ TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4 DATA ·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB) + +TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pledge(SB) +GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $4 +DATA ·libc_pledge_trampoline_addr(SB)/4, $libc_pledge_trampoline<>(SB) + +TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_unveil(SB) +GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $4 +DATA ·libc_unveil_trampoline_addr(SB)/4, $libc_unveil_trampoline<>(SB) diff --git a/unix/zsyscall_openbsd_arm64.go b/unix/zsyscall_openbsd_arm64.go index ab61221477..1de4158620 100644 --- a/unix/zsyscall_openbsd_arm64.go +++ b/unix/zsyscall_openbsd_arm64.go @@ -2228,3 +2228,33 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pledge(promises *byte, execpromises *byte) (err error) { + _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pledge_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pledge pledge "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unveil(path *byte, flags *byte) (err error) { + _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_unveil_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unveil unveil "libc.so" + + diff --git a/unix/zsyscall_openbsd_arm64.s b/unix/zsyscall_openbsd_arm64.s index a6bc32c922..a738118a4f 100644 --- a/unix/zsyscall_openbsd_arm64.s +++ b/unix/zsyscall_openbsd_arm64.s @@ -672,3 +672,13 @@ TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) + +TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pledge(SB) +GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB) + +TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_unveil(SB) +GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8 +DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB) diff --git a/unix/zsyscall_openbsd_mips64.go b/unix/zsyscall_openbsd_mips64.go index 3882790a52..303b07534d 100644 --- a/unix/zsyscall_openbsd_mips64.go +++ b/unix/zsyscall_openbsd_mips64.go @@ -2228,3 +2228,33 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pledge(promises *byte, execpromises *byte) (err error) { + _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pledge_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pledge pledge "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unveil(path *byte, flags *byte) (err error) { + _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_unveil_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unveil unveil "libc.so" + + diff --git a/unix/zsyscall_openbsd_mips64.s b/unix/zsyscall_openbsd_mips64.s index b4e7bceabf..d794e06ce0 100644 --- a/unix/zsyscall_openbsd_mips64.s +++ b/unix/zsyscall_openbsd_mips64.s @@ -672,3 +672,13 @@ TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) + +TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pledge(SB) +GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB) + +TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_unveil(SB) +GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8 +DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB) diff --git a/unix/zsyscall_openbsd_ppc64.go b/unix/zsyscall_openbsd_ppc64.go index 172ba7f62c..de74432ec3 100644 --- a/unix/zsyscall_openbsd_ppc64.go +++ b/unix/zsyscall_openbsd_ppc64.go @@ -2228,3 +2228,33 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pledge(promises *byte, execpromises *byte) (err error) { + _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pledge_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pledge pledge "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unveil(path *byte, flags *byte) (err error) { + _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_unveil_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unveil unveil "libc.so" + + diff --git a/unix/zsyscall_openbsd_ppc64.s b/unix/zsyscall_openbsd_ppc64.s index ca3f766009..2a31baebd8 100644 --- a/unix/zsyscall_openbsd_ppc64.s +++ b/unix/zsyscall_openbsd_ppc64.s @@ -806,3 +806,15 @@ TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 RET GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) + +TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 + CALL libc_pledge(SB) + RET +GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB) + +TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 + CALL libc_unveil(SB) + RET +GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8 +DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB) diff --git a/unix/zsyscall_openbsd_riscv64.go b/unix/zsyscall_openbsd_riscv64.go index fd8e6f62fa..be39bcf100 100644 --- a/unix/zsyscall_openbsd_riscv64.go +++ b/unix/zsyscall_openbsd_riscv64.go @@ -2228,3 +2228,33 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pledge(promises *byte, execpromises *byte) (err error) { + _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pledge_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pledge pledge "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unveil(path *byte, flags *byte) (err error) { + _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_unveil_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unveil unveil "libc.so" + + diff --git a/unix/zsyscall_openbsd_riscv64.s b/unix/zsyscall_openbsd_riscv64.s index 477a7d5b21..27130c6f3f 100644 --- a/unix/zsyscall_openbsd_riscv64.s +++ b/unix/zsyscall_openbsd_riscv64.s @@ -672,3 +672,13 @@ TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) + +TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pledge(SB) +GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB) + +TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_unveil(SB) +GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8 +DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB) From cb378ae1ff8cd45e69d4f172df8370bc844e1f86 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Thu, 2 Nov 2023 00:29:14 +1100 Subject: [PATCH 9/9] syscall: call getfsstat via libc on openbsd On openbsd, call getfsstat directly via libc, instead of calling it via syscall.Syscall. Updates golang/go#63900 Change-Id: I99a3555b3207754b107dbabf63440569fca93eea Reviewed-on: https://go-review.googlesource.com/c/sys/+/538976 Reviewed-by: Cherry Mui Run-TryBot: Joel Sing Reviewed-by: Tobias Klauser Reviewed-by: Josh Rickmar Reviewed-by: Bryan Mills TryBot-Result: Gopher Robot --- unix/syscall_openbsd.go | 12 ++++-------- unix/zsyscall_openbsd_386.go | 15 +++++++++++++++ unix/zsyscall_openbsd_386.s | 5 +++++ unix/zsyscall_openbsd_amd64.go | 15 +++++++++++++++ unix/zsyscall_openbsd_amd64.s | 5 +++++ unix/zsyscall_openbsd_arm.go | 15 +++++++++++++++ unix/zsyscall_openbsd_arm.s | 5 +++++ unix/zsyscall_openbsd_arm64.go | 15 +++++++++++++++ unix/zsyscall_openbsd_arm64.s | 5 +++++ unix/zsyscall_openbsd_mips64.go | 15 +++++++++++++++ unix/zsyscall_openbsd_mips64.s | 5 +++++ unix/zsyscall_openbsd_ppc64.go | 15 +++++++++++++++ unix/zsyscall_openbsd_ppc64.s | 6 ++++++ unix/zsyscall_openbsd_riscv64.go | 15 +++++++++++++++ unix/zsyscall_openbsd_riscv64.s | 5 +++++ 15 files changed, 145 insertions(+), 8 deletions(-) diff --git a/unix/syscall_openbsd.go b/unix/syscall_openbsd.go index 748377c7ae..d2882ee04f 100644 --- a/unix/syscall_openbsd.go +++ b/unix/syscall_openbsd.go @@ -137,18 +137,13 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e } func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { - var _p0 unsafe.Pointer + var bufptr *Statfs_t var bufsize uintptr if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) + bufptr = &buf[0] bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf)) } - r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = e1 - } - return + return getfsstat(bufptr, bufsize, flags) } //sysnb getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) @@ -326,6 +321,7 @@ func Uname(uname *Utsname) error { //sys write(fd int, p []byte) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) //sys munmap(addr uintptr, length uintptr) (err error) +//sys getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) //sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) //sys pledge(promises *byte, execpromises *byte) (err error) //sys unveil(path *byte, flags *byte) (err error) diff --git a/unix/zsyscall_openbsd_386.go b/unix/zsyscall_openbsd_386.go index 63b4aac8de..88bfc28857 100644 --- a/unix/zsyscall_openbsd_386.go +++ b/unix/zsyscall_openbsd_386.go @@ -2212,6 +2212,21 @@ var libc_munmap_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_getfsstat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/unix/zsyscall_openbsd_386.s b/unix/zsyscall_openbsd_386.s index 5cb7c451ba..4cbeff171b 100644 --- a/unix/zsyscall_openbsd_386.s +++ b/unix/zsyscall_openbsd_386.s @@ -668,6 +668,11 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $4 DATA ·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB) +TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getfsstat(SB) +GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $4 +DATA ·libc_getfsstat_trampoline_addr(SB)/4, $libc_getfsstat_trampoline<>(SB) + TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4 diff --git a/unix/zsyscall_openbsd_amd64.go b/unix/zsyscall_openbsd_amd64.go index d6c4145812..b8a67b99af 100644 --- a/unix/zsyscall_openbsd_amd64.go +++ b/unix/zsyscall_openbsd_amd64.go @@ -2212,6 +2212,21 @@ var libc_munmap_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_getfsstat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/unix/zsyscall_openbsd_amd64.s b/unix/zsyscall_openbsd_amd64.s index 316c47e837..1123f27571 100644 --- a/unix/zsyscall_openbsd_amd64.s +++ b/unix/zsyscall_openbsd_amd64.s @@ -668,6 +668,11 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) +TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getfsstat(SB) +GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB) + TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 diff --git a/unix/zsyscall_openbsd_arm.go b/unix/zsyscall_openbsd_arm.go index 4e22b7563c..af50a65c0c 100644 --- a/unix/zsyscall_openbsd_arm.go +++ b/unix/zsyscall_openbsd_arm.go @@ -2212,6 +2212,21 @@ var libc_munmap_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_getfsstat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/unix/zsyscall_openbsd_arm.s b/unix/zsyscall_openbsd_arm.s index e1d81bf9c4..82badae39f 100644 --- a/unix/zsyscall_openbsd_arm.s +++ b/unix/zsyscall_openbsd_arm.s @@ -668,6 +668,11 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $4 DATA ·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB) +TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getfsstat(SB) +GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $4 +DATA ·libc_getfsstat_trampoline_addr(SB)/4, $libc_getfsstat_trampoline<>(SB) + TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4 diff --git a/unix/zsyscall_openbsd_arm64.go b/unix/zsyscall_openbsd_arm64.go index 1de4158620..8fb4ff36a7 100644 --- a/unix/zsyscall_openbsd_arm64.go +++ b/unix/zsyscall_openbsd_arm64.go @@ -2212,6 +2212,21 @@ var libc_munmap_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_getfsstat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/unix/zsyscall_openbsd_arm64.s b/unix/zsyscall_openbsd_arm64.s index a738118a4f..24d7eecb93 100644 --- a/unix/zsyscall_openbsd_arm64.s +++ b/unix/zsyscall_openbsd_arm64.s @@ -668,6 +668,11 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) +TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getfsstat(SB) +GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB) + TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 diff --git a/unix/zsyscall_openbsd_mips64.go b/unix/zsyscall_openbsd_mips64.go index 303b07534d..f469a83ee6 100644 --- a/unix/zsyscall_openbsd_mips64.go +++ b/unix/zsyscall_openbsd_mips64.go @@ -2212,6 +2212,21 @@ var libc_munmap_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_getfsstat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/unix/zsyscall_openbsd_mips64.s b/unix/zsyscall_openbsd_mips64.s index d794e06ce0..9a498a0677 100644 --- a/unix/zsyscall_openbsd_mips64.s +++ b/unix/zsyscall_openbsd_mips64.s @@ -668,6 +668,11 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) +TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getfsstat(SB) +GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB) + TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 diff --git a/unix/zsyscall_openbsd_ppc64.go b/unix/zsyscall_openbsd_ppc64.go index de74432ec3..c26ca2e1aa 100644 --- a/unix/zsyscall_openbsd_ppc64.go +++ b/unix/zsyscall_openbsd_ppc64.go @@ -2212,6 +2212,21 @@ var libc_munmap_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_getfsstat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/unix/zsyscall_openbsd_ppc64.s b/unix/zsyscall_openbsd_ppc64.s index 2a31baebd8..1f224aa416 100644 --- a/unix/zsyscall_openbsd_ppc64.s +++ b/unix/zsyscall_openbsd_ppc64.s @@ -801,6 +801,12 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) +TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 + CALL libc_getfsstat(SB) + RET +GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB) + TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_utimensat(SB) RET diff --git a/unix/zsyscall_openbsd_riscv64.go b/unix/zsyscall_openbsd_riscv64.go index be39bcf100..bcc920dd25 100644 --- a/unix/zsyscall_openbsd_riscv64.go +++ b/unix/zsyscall_openbsd_riscv64.go @@ -2212,6 +2212,21 @@ var libc_munmap_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_getfsstat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/unix/zsyscall_openbsd_riscv64.s b/unix/zsyscall_openbsd_riscv64.s index 27130c6f3f..87a79c7095 100644 --- a/unix/zsyscall_openbsd_riscv64.s +++ b/unix/zsyscall_openbsd_riscv64.s @@ -668,6 +668,11 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) +TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getfsstat(SB) +GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB) + TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8