If you don't set GOOS and you try to regenerate
the darwin files, it appears to succeed.
However, because libc was not selected,
it generates broken code.
Change-Id: I20fb4f51dcc539a03b6c6ed03ce39b78d5987d41
Reviewed-on: https://go-review.googlesource.com/c/161719
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Drop the manually defined *_XDP constants which were added to glibc.
Install python3 instead of python because glibc's confugure script now
requires at least 3.4.
Change-Id: Ic19ff4d8aa4dbadeb5438e331ccafeafc2cc9925
Reviewed-on: https://go-review.googlesource.com/c/160957
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This is a very classic and highly useful Windows API that I'm surprised
it's still not here.
Change-Id: If54319099cd94dd727126c579dd5a681979321cd
Reviewed-on: https://go-review.googlesource.com/c/160937
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Add IoctlGetRTCTime and IoctlSetRTCTime to get and set the RTC time via
the RTC_RD_TIME and RTC_SET_TIME ioctls.
Change-Id: I63190026be39746599c2cd7116603d4a1d5bd695
Reviewed-on: https://go-review.googlesource.com/c/160397
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
The zsysnum_{freebsd,netbsd}_arm64.go files were generated before
mksysnum was converted to Go in CL 152677. Regenerate them to adjust the
comment specifying the command used for generation.
Change-Id: I8f00249848fe20e388f255e9e615da1e0727c140
Reviewed-on: https://go-review.googlesource.com/c/159778
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
It shouldn't make a difference for generating types and consts, but
let's use the glibc release branch anyway.
Fixesgolang/go#29873
Change-Id: I15a3df250f5ae6181b2d036a10e0523ebe44ac3f
Reviewed-on: https://go-review.googlesource.com/c/158997
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Port mksyscall_aix_ppc64.pl Perl script to mksyscall_aix_ppc64.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: Ie888c0df470dcfc75034faa12cf3422b2d426629
Reviewed-on: https://go-review.googlesource.com/c/158699
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Also add additional packet timestamping constants and types defined
in the same header.
Change-Id: I4280f925b46e229f4c3a83a7fee4612592314016
Reviewed-on: https://go-review.googlesource.com/c/158761
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This isn't a real generation, it's mostly a copy of the amd64
files, due to difficulties in generation.
There should be little to no differences between netbsd 64bit
archs.
Change-Id: I1c7b25cfef87220c827018e73695e5ca08987156
GitHub-Last-Rev: 043207b2c2
GitHub-Pull-Request: golang/sys#27
Reviewed-on: https://go-review.googlesource.com/c/155738
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
On linux/riscv64, char defaults to unsigned, so explicitly make
RawSockaddrUnix.Path signed.
Patch by Ryan O'Leary.
Updates golang/go#27532
Change-Id: If99a3953462ad98f61d8fafcda3ebb71b44e6018
Reviewed-on: https://go-review.googlesource.com/c/157900
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
On linux/riscv64, the renameat syscall no longer exists and has been
superseded by renameat2. Use Renameat2 to implement Renameat on
linux/riscv64.
Based on a patch by Ryan O'Leary.
Updates golang/go#27532
Change-Id: I7c60c7f824750408265f67397b8ac1fa7226f425
Reviewed-on: https://go-review.googlesource.com/c/157899
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Also add a test now that all unices have Renameat.
Change-Id: I9098662569e9910122dc686559bbd04be06328fa
Reviewed-on: https://go-review.googlesource.com/c/157898
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This adds the ClockNanosleep syscall and the TIMER_* constants;
currently only TIMER_ABSTIME for specifying an absolute timestamp.
Change-Id: Ic8d857eb92818529aadab569cd8646a19bb9c055
Reviewed-on: https://go-review.googlesource.com/c/157658
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
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>
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>
Modify unix/mksyscall.go to support plan9.
This does not generate any git diff besides the
command name in comments of generated files and
addition of +build tags.
Updates golang/go#27779
Change-Id: I359a80d1c08837d92a7095e5235867c29a2d2a60
Reviewed-on: https://go-review.googlesource.com/c/156157
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
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>
With cgo supporting sparc64 as of CL 102555 and CL 132155, the Docker
based build system can be used to generate file for linux/sparc64 as
well.
Updates golang/go#15282
Change-Id: I109e55f39d3229b24b0029c42074e439c6c54dc8
Reviewed-on: https://go-review.googlesource.com/c/102655
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Make 1.11 the explicitly named case, and 1.12 the default.
Change-Id: Ic3674860eb9e8a5bb1cf1da12c5ac583cc0b0633
Reviewed-on: https://go-review.googlesource.com/c/155397
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
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>
Use wevtutil.exe to query event log instead of powershell's Get-EventLog
command, which is not available on Windows IoT Core.
Updates golang/go#26148
Change-Id: Idc16d0b18d2826730d2b4062388b2a764c4886c6
Reviewed-on: https://go-review.googlesource.com/c/154817
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
pdh.dll is not available on Windows IoT core. Use netevent.dll instead.
Update golang/go#26148
Change-Id: I80c299ad030944954d5d7d182d91dc15e71341f9
Reviewed-on: https://go-review.googlesource.com/c/154560
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@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>
Use the arm_sync_file_range to implement SyncFileRange.
This is an alias for sync_file_range2 syscall which is already used to
implement SyncFileRange on ppc64x. These have the order of the flags and
offset arguments reversed in order to fit the syscall arguments within 6
registers.
For more information see:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=edd5cd4a9424f22b0fa08bef5e299d41befd5622
This makes TestSyncFileRange build and pass on linux/arm.
Change-Id: I1316328ebcf550a3fb70f9ce5ebf54d8bcaa932c
Reviewed-on: https://go-review.googlesource.com/c/153939
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@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>