Use the https:// URLs to get syscalls.master for freebsd, openbsd and
dragonfly. For netbsd, keep using the http:// URL since HTTPS is not
supported.
Change-Id: Ibcbd19d5e3b4585552ea65dcdc742c2e7bfce944
Reviewed-on: https://go-review.googlesource.com/c/157057
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
The stat structure on linux/mips64x differ between C library and the kernel,
as described in the stat(2) man page.
Fstat, Lstat and Stat on linux/mips64x already converts the stat structure
using a fillStat_t function, very similar to __xstat_conv in GLIBC.
Doing the same for Fstatat before calling SYS_NEWFSTATAT fixes the
"Fstatat: returned stat does not match Stat/Lstat" error in TestFstatat.
Fixesgolang/go#29401
Change-Id: I0b2a7b274acc3c7c9fc7ae2afe722dd6225da383
Reviewed-on: https://go-review.googlesource.com/c/155747
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Previously the +build line was taken as a package comment, due to how Go
handles cases like the following:
// +build <foo>
package foo
And thus caused build failures because of package name conflict issues.
Fixes: https://golang.org/cl/152677
Change-Id: I7360ee100a739b00beaa1337b0408bb06fa240a6
GitHub-Last-Rev: b67a58691f3a5be12f2c5c510fbb4bd95fdd6e05
GitHub-Pull-Request: golang/sys#28
Reviewed-on: https://go-review.googlesource.com/c/155748
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Port mksysnum_{(open|net|free)bsd,dragonfly,darwin}.pl Perl
scripts to mksysnum.go.
mkall.sh script is modified to run mksysnum.go. Running
./mkall.sh generates no git diff besides command name and
function prototype in comments of generated files.
Updates golang/go#27779
Change-Id: I534734a9c7fda186ca133ba19e14481e55832be1
Reviewed-on: https://go-review.googlesource.com/c/152677
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
There wasn't one. I was mucking around with the Sendfile internals in
CL 154663 so I need one to make sure I didn't break anything.
Change-Id: I38b25de4995831680fdac440dfa7f26542d2624f
Reviewed-on: https://go-review.googlesource.com/c/154664
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Parallel to CL 151938 for package x/sys/unix instead of syscall.
iOS needs to use these functions without the "64" postfix.
(The functions do exist, but the App Store bans their use.)
Updates golang/go#28984
Change-Id: I6b82950700cc8a1afca612844b05fa007574e008
Reviewed-on: https://go-review.googlesource.com/c/154658
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Call into libSystem (Darwin's libc equivalent) to do system calls.
Raw syscalls are not a supported ABI on Darwin, they want us to use
libSystem calls instead.
The stdlib has already been converted to this new regime. This
package is vendored into the stdlib, so we need to fix it also, then
vendor it in again.
Because this package isn't tied to a Go release, we need to keep the
old code around and use the new code only for 1.12 and up.
Update golang/go#17490
Change-Id: Idbcacff096b5bfeac871aa75dfd971570ac93322
Reviewed-on: https://go-review.googlesource.com/c/154179
Reviewed-by: Ian Lance Taylor <iant@golang.org>
AIX doesn't provide a flock() syscall, it was previously emulated in
package syscall by using fcntl. This emulation was removed in CL 152397.
Since unix.Flock wraps syscall.Flock, the build currently fails on aix
without this change.
Change-Id: Ie887619cd64ae009ea43f00c74e450a5b8f998ac
Reviewed-on: https://go-review.googlesource.com/c/153938
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Clément Chigot <clement.chigot@atos.net>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
runtime.GOOS and runtime.GOARCH are constants, thus all comparisons are
evaluated at compile time.
Follow-up for CL 153619 to make the code consistent with the syscall
package, cf. CL 153837
Change-Id: I0520d88c1636c6ed2acad69fce85a28042eafe56
Reviewed-on: https://go-review.googlesource.com/c/153937
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
TryBot-Result: Gobot Gobot <gobot@golang.org>
The OpenBSD armv7 port requires 64-bit alignment for cmsgs.
Rework the cmsg alignment code to facilitate this.
Change-Id: Ie3eae1d367e2f3ac200fa8b78e97a2eb2eccae6a
Reviewed-on: https://go-review.googlesource.com/c/153619
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
ARM64 does this exact same thing, and in fact this is required on
Android 9, where Bionic now only allows lstat on 32-bit platforms
Folks are running into this when using Android on Chromebooks,
which are keeping AMD64 Android alive. So, we change the AMD64
behavior to model that of ARM64.
Change-Id: Id933cc22b42ab365c12980915557bdbf88661a4d
Reviewed-on: https://go-review.googlesource.com/c/153319
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Passing an empty iovs []Iovec slice to Vmsplice leads to an index out of
range panic. Fix this by passing an nil unsafe.Pointer to the underlying
syscall in case of an empty slice.
Change-Id: If1844c1b2eb0833de598aed7e79b9fcf061f7975
Reviewed-on: https://go-review.googlesource.com/c/153317
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Port mksyscall.pl Perl script to mksyscall.go.
mkall scripts are 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: I8c6eb852e6821f4a91dc03cc042d8d343f1bcf66
Reviewed-on: https://go-review.googlesource.com/c/150217
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
IoctlSetPointerInt is necessary for interacting with the PPP kernel
driver, which wants it passed as a pointer to int, rather than the
more conventional int cast as a pointer.
We can technically do this already with
IoctlSetInt(int(uintptr(unsafe.Pointer(&foo)))), but that's just
masking the operation we're trying to execute in the first place,
and relying on the internals of IoctlSetInt to do the right
inverse transformation.
Change-Id: I1e6a1dd6190c11f06c6f5393cd2cae453939878a
GitHub-Last-Rev: a88f56073d
GitHub-Pull-Request: golang/sys#25
Reviewed-on: https://go-review.googlesource.com/c/150321
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
After CL 136816 the bits member of the FdSet struct is no longer
exported. Make sure to retain it in mkpost.go and rename it to Bits
as on all other systems.
Change-Id: I860b307a80c7e29b4a75d9d916d879ee0a31c014
Reviewed-on: https://go-review.googlesource.com/c/149897
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Yuval Pavel Zholkover <paulzhol@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
When using -linkshared, the external linker on ppc64x cannot
always handle the direct branch to syscall.Syscall and similar
similar functions when the offset is too far. Instead it should
be done as a BL which can then be called through a procedure
linkage table entry.
This change removes functions Syscall, Syscall6,
RawSyscall, RawSyscall6 from asm_linux_ppc64x.s and instead
creates Go functions which call their corresponding
functions in the syscall package. As Go functions, they can be
inlined with the help of CL 147361.
Fixesgolang/go#16662
Change-Id: Ibd2b6ec15b0781c3d7db25e249a3ffc9e1c2884b
Reviewed-on: https://go-review.googlesource.com/c/146518
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Passing an empty data []byte to Fsetxattr/Setxattr/Lsetxattr leads
to an index out of range panic. Fix this by passing an nil
unsafe.Pointer to the underlying syscall in this case.
Change-Id: I5ef3983c6304c5317ed5b49afc4ed19791864dbb
Reviewed-on: https://go-review.googlesource.com/c/146198
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>