Make all our package sources use Go 1.17 gofmt format
(adding //go:build lines).
Not strictly necessary but will avoid spurious changes
as files are edited.
Part of //go:build change (#41184).
See https://golang.org/design/draft-gobuild
Change-Id: I01667f826428426a39c84717d02efa25fa44553c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/294490
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Russ Cox <rsc@golang.org>
Move TestUtimesNanoAt to syscall_unix_test.go. All BSDs and
solaris/illumos provide UtimesNanoAt. The implementations on linux and
darwin are already the same and the type conversions of Timespec members
on aix should no longer be necessary since CL 177838.
Change-Id: If0d03a92b3167da08191b6e98888eec92f27c3c9
Reviewed-on: https://go-review.googlesource.com/c/sys/+/213398
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Also change t.Error messages to use "got foo, expected bar" notation.
Change-Id: Ia0b452f96b08cbb69a0b64cc2a467b5cf94e72da
Reviewed-on: https://go-review.googlesource.com/c/sys/+/207858
Reviewed-by: Ian Lance Taylor <iant@golang.org>
stringsFromByteSlice is only used in xattr_test.go which isn't enabled
for aix.
Change-Id: I95948cbac285d8efe7f5299de85625cb7541e906
Reviewed-on: https://go-review.googlesource.com/c/sys/+/177839
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
On AIX, Stat_t's fields dealing with time are of type StTimespec while
all other GOOS are using Timespec.
StTimespec and Timespec are the same on ppc but not in ppc64. Therefore,
values returned by ppc64 syscalls need to be adjusted in order to
allow the use of Timespec instead of StTimespec.
Fixesgolang/go#32073
Change-Id: I0c212bf1741a27c49e995bf928d4941b6d583e54
Reviewed-on: https://go-review.googlesource.com/c/sys/+/177838
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
As select is a keyword of Go, C.select cannot be used on gccgo files.
Therefore, select call is transformed into c_select.
Change-Id: Ic68a7ffa03dc5a5d70514876b5f6afb565691a4a
Reviewed-on: https://go-review.googlesource.com/c/sys/+/172739
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit ports unix package for aix/ppc64 with gc implementation.
In order to merge as much as possible gc and gccgo implementation, the
mksyscall_aix_ppc64.pl creates three files.
zsyscall_aix_ppc64.go is common for both implementation. It has the main
syscall function and handles the pointer creations, type conversions
and the error if needed. It calls a function "call..." which is
available for each implementation.
zsyscall_aix_ppc64_gc.go is the gc part. It implements "call..."
functions using //go:cgo_import_dynamic and //go:linkname. It is
based on syscall.syscall6 function.
zsyscall_aix_ppc64_gccgo.go is the gccgo part. It implements "call..."
functions using cgo and C functions.
Some unavailable syscalls were also removed from the previous
implementation.
For aix/ppc, the script is left unchanged as aix/ppc won't be
implemented inside gc.
Change-Id: I3701095df31517c66f95874ba8e682967993090b
Reviewed-on: https://go-review.googlesource.com/c/143117
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>