On aix, the fsync syscall doesn't work on read-only files. Use
fsync_range instead to allow Fsync to work on any file.
Follow CL 254657 which did the same in package syscall.
For golang/go#41372
Change-Id: Ibc55ecf5c43e27a04281af1a204f847eeafeea63
Reviewed-on: https://go-review.googlesource.com/c/sys/+/362274
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
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>
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 is the x/sys/unix patch of CL 170537.
This patches has regenerated some files which have been therefore
updated. That's why Getsystemcfg is also added in zsyscall_aix_ppc.go
Change-Id: I4aade3e0e2e29cef13b1c8018a57100712eabb50
Reviewed-on: https://go-review.googlesource.com/c/sys/+/172259
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Port mksyscall_aix_ppc.pl Perl script to mksyscall_aix_ppc.go.
mkall.sh script is modified to run mksyscall.go. Running
mkall.sh does not generate any git diff besides the command
name in comments of generated files.
Updates golang/go#27779
Change-Id: I57b0e5f9fe44dadd96d0e512046bb63e8e1b9f66
Reviewed-on: https://go-review.googlesource.com/c/156778
Reviewed-by: Clément Chigot <clement.chigot@atos.net>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@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>
These changes add Termio/Winsize/Statfs_t for AIX, constants TC[GS]ET and the syscalls Mkdir and Mknod.
It also changes the comments for AIX which still were talking about Linux and glibc.
Change-Id: I64325330328d6e16cff540f103fdfa533b7d8f5b
Reviewed-on: https://go-review.googlesource.com/136295
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>