Граф коммитов

625 Коммитов

Автор SHA1 Сообщение Дата
Josh Bleecher Snyder 3b52091055 unix: add ClockGettime on darwin/amd64
Updates golang/go#25633

Change-Id: I20ff2d0cda642fb7b155d3ae06499e8c0ef0a2b2
Reviewed-on: https://go-review.googlesource.com/c/161721
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-02-09 17:36:11 +00:00
Josh Bleecher Snyder f54c5e0abf unix: update zsysnum_darwin_amd64 for macOS 10.14
Change-Id: I77f491029a8f2e37ffbda3d0f50795287d6cd641
Reviewed-on: https://go-review.googlesource.com/c/161720
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-02-09 17:35:27 +00:00
Josh Bleecher Snyder 446ad8e35c unix: require GOOS be set in mksyscall
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>
2019-02-09 17:34:53 +00:00
Tobias Klauser 41f3e65849 unix/linux: update Dockerfile to glibc 2.29 and Go 1.12beta2
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>
2019-02-04 20:37:06 +00:00
Jason A. Donenfeld 980327fe3c windows: Implement WaitForMultipleObjects
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>
2019-02-04 10:32:48 +00:00
Visweswara R 7ae0202eb7 unix: set 100644 mode on mksyscall_aix_ppc64.go
Change mode of mksyscall_aix_ppc64.go to 644.

Change-Id: Icebc0944a739b58111f5420ec2f0850b348f1fee
Reviewed-on: https://go-review.googlesource.com/c/160918
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-02-03 05:02:04 +00:00
Tobias Klauser afcc84fd75 unix: add RND* ioctl consts on Linux
Change-Id: I79c721d0f4fe097daf096dc7404675aa3048bf6a
Reviewed-on: https://go-review.googlesource.com/c/160757
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-02-01 15:26:29 +00:00
Tobias Klauser 2970a3744d cpu: detect RDRAND and RDSEED instructions on x86
Change-Id: I2d0094d64ba12f888758aeebdb43aed353ddeeb9
Reviewed-on: https://go-review.googlesource.com/c/160577
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-02-01 07:34:06 +00:00
Tobias Klauser aca44879d5 unix: add ioctl wrappers to get and set RTC time on Linux
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>
2019-01-30 15:09:45 +00:00
two 302c3dd5f1 unix: fix misspellings
Change-Id: I4e1facc318d87fdd2abca1de040fdcb25680339e
GitHub-Last-Rev: bfebe23528
GitHub-Pull-Request: golang/sys#30
Reviewed-on: https://go-review.googlesource.com/c/159597
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-01-29 07:53:46 +00:00
Tobias Klauser d57399882c unix: regenerate sysnum files for freebsd/arm64 and netbsd/arm64
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>
2019-01-29 07:23:52 +00:00
Tobias Klauser b90733256f unix: use glibc release branch in Dockerfile
It shouldn't make a difference for generating types and consts, but
let's use the glibc release branch anyway.

Fixes golang/go#29873

Change-Id: I15a3df250f5ae6181b2d036a10e0523ebe44ac3f
Reviewed-on: https://go-review.googlesource.com/c/158997
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-01-24 10:00:55 +00:00
Visweswara R c6b37f3e92 unix: replace "mksyscall_aix_ppc64.pl" script with a Go program
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>
2019-01-23 07:42:12 +00:00
Tobias Klauser 054c452bb7 unix: add socket error queue constants and types from linux/errqueue.h
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>
2019-01-22 07:17:31 +00:00
Maya Rashish 770c60269b unix: add netbsd/arm64 files.
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>
2019-01-21 09:02:51 +00:00
Tobias Klauser 11f53e0313 unix: use int8 for RawSockaddrUnix.Path on linux/riscv64
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>
2019-01-16 16:14:47 +00:00
Tobias Klauser e5ecc2a674 unix: use Renameat2 to implement Renameat on linux/riscv64
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>
2019-01-16 15:12:25 +00:00
Tobias Klauser 5552a988b7 unix: add Renameat on dragonfly
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>
2019-01-16 15:07:22 +00:00
Tobias Klauser a457fd0364 unix: add Signalfd on linux
Also add the SFD_* constants and SignalfdSiginfo type.

Change-Id: I3415c212b85c9d5a940ba2bf70f43739a2630d78
Reviewed-on: https://go-review.googlesource.com/c/157897
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-01-15 15:29:22 +00:00
Sebastian Schmidt 2be5172556 unix: add ClockNanosleep and TIMER_ABSTIME
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>
2019-01-14 13:03:36 +00:00
Tobias Klauser 48ac38b7c8 unix: get *BSD syscalls.master files using HTTPS
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>
2019-01-09 14:50:17 +00:00
Visweswara R 7fbe1cd0fc unix: replace "mksyscall_aix_ppc.pl" script with a Go program
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>
2019-01-08 10:45:31 +00:00
Carlos Eduardo Seo 20be8e55dc cpu: add linux/ppc64x
Port from Go internal/cpu.

Fixes golang/go#25185

Change-Id: Id3cac18da6ffec9d10df755c4032ce3068ab634d
Reviewed-on: https://go-review.googlesource.com/c/152938
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-01-07 17:34:14 +00:00
Visweswara R cb59ee3660 plan9: replace "mksyscall.pl" with Go program
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>
2019-01-07 07:01:47 +00:00
Keith Randall 1775db3f06 unix: make Fcntl* routines use libSystem on Darwin
Missed this one.

Update golang/go#17490.

Change-Id: I5ab2197f9981b712b37d3060f72209bebcadf291
Reviewed-on: https://go-review.googlesource.com/c/156346
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-01-06 19:24:25 +00:00
Visweswara R badf558520 plan9: remove "use" function and calls from generated code.
Update mksyscall.pl to skip generating calls to "use".

See issue https://golang.org/issue/16607
and CL https://golang.org/cl/36616

Change-Id: Id36614fce5d98a8538edf4f4a7276e650b99b839
Reviewed-on: https://go-review.googlesource.com/c/156437
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-01-05 16:57:16 +00:00
Tobias Klauser 82a175fd15 unix/linux: update Dockerfile to Linux Kernel 4.20
Change-Id: Iadc92b5afd18a5c1df0bc42b0d6f52f0b768b47a
Reviewed-on: https://go-review.googlesource.com/c/155979
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-01-02 15:56:01 +00:00
Tobias Klauser a91c4d227e unix: add support for freebsd/arm64
This wasn't actually generated on freebsd/arm64 yet. It's mostly a copy
of the amd64 files for now.

Updates golang/go#24715

Change-Id: If24c3c5803a4708f0b26d738f690cbea1694ca88
Reviewed-on: https://go-review.googlesource.com/c/155978
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-01-02 15:55:44 +00:00
Anthony Fok 9a3f9b0469 unix: fix Fstatat by using fillStat_t on linux/mips64x
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.

Fixes golang/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>
2018-12-28 14:41:15 +00:00
Aleksa Sarai c6cbdbf9e6 unix: mksysnum: correct +build restriction
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>
2018-12-28 12:02:56 +00:00
Visweswara R 367055b3f9 unix: replace mksysnum_*.pl scripts with Go program
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>
2018-12-28 11:21:25 +00:00
Tobias Klauser b4a75ba826 unix: generate linux/sparc64 go files using Docker
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>
2018-12-21 14:31:28 +00:00
itchyny a79f1b1907 unix: fix unused import in syscall_darwin_386.go
Fix a compile error due to unused import introduced by CL 154663.

Change-Id: I2a732380c35cd98dfff36289f5d72fd7d7222205
GitHub-Last-Rev: 5c7065d26c
GitHub-Pull-Request: golang/sys#26
Reviewed-on: https://go-review.googlesource.com/c/155460
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-12-21 13:50:38 +00:00
Keith Randall 8ff4e546d4 unix: add space to generated code
Change-Id: Iab98581ade90ffb6c9faa29d4a45558498fff82a
Reviewed-on: https://go-review.googlesource.com/c/155398
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-12-21 06:54:08 +00:00
Keith Randall 9fbf701fc3 unix: reverse default for 1.11/1.12 split
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>
2018-12-21 06:53:00 +00:00
Keith Randall 36ca6f176f unix: add Sendfile test
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>
2018-12-21 06:52:52 +00:00
Alberto Donizetti b00e65af1d unix/linux: set 100644 mode on mksysnum.go
Change mode of mksysnum.go to 644.

I also checked all the other files with 755 mode, to verify that no
other Go file has this issue. After this change, only .sh and .pl
files are executable:

  $ git ls-files -s * | grep 100755
  100755 9f73c60660 0	plan9/mkall.sh
  100755 85309c4a5b 0	plan9/mkerrors.sh
  100755 252e89e14d 0	plan9/mksyscall.pl
  100755 3c3ab05810 0	plan9/mksysnum_plan9.sh
  100755 f8dab7511d 0	unix/mkall.sh
  100755 955dd50f9a 0	unix/mkerrors.sh
  100755 c44de8d310 0	unix/mksyscall_aix_ppc.pl
  100755 53df26bb93 0	unix/mksyscall_aix_ppc64.pl
  100755 a354df5a6b 0	unix/mksyscall_solaris.pl
  100755 20632e1460 0	unix/mksysctl_openbsd.pl
  100755 5453c53b19 0	unix/mksysnum_darwin.pl
  100755 6804f41216 0	unix/mksysnum_dragonfly.pl
  100755 198993d095 0	unix/mksysnum_freebsd.pl
  100755 85988b140b 0	unix/mksysnum_netbsd.pl
  100755 84edf60ca1 0	unix/mksysnum_openbsd.pl

Fixes golang/go#29369

Change-Id: I66eae4cec07806ea6289e229819aef8dbbad9335
Reviewed-on: https://go-review.googlesource.com/c/155417
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2018-12-20 20:41:20 +00:00
Keith Randall 7c4c994c65 unix: remove raw syscall from Sendfile
Update golang/go#17490

Change-Id: Iaec54b8ffda1a24d4c8b5671185d570fb8683155
Reviewed-on: https://go-review.googlesource.com/c/154663
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-12-20 18:20:59 +00:00
Keith Randall 8588221f65 unix: remove raw syscall from getAttrList
Update golang/go#17490

Change-Id: I55ea10ce2eb5fb1c0518a57900e78e5f0a29b893
Reviewed-on: https://go-review.googlesource.com/c/154662
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-12-20 18:20:16 +00:00
Keith Randall 22c30cd1f7 unix: remove raw syscall from getattrlistTimes
Update golang/go#17490

Change-Id: I29feed5ddea976b39bd4c43bd1ff5942f47df083
Reviewed-on: https://go-review.googlesource.com/c/154661
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-12-20 18:19:19 +00:00
Keith Randall 4dcd0b7660 unix: remove raw syscall from Getfsstat
Use libc version instead.

Update golang/go#17490

Change-Id: Ibcedccb9715961904d12fc85f69a7139b6c26658
Reviewed-on: https://go-review.googlesource.com/c/154660
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-12-20 18:18:36 +00:00
Keith Randall 54d2441686 unix: remove Getdirentries on iOS
This system call doesn't exist on iOS.

Update golang/go#28984

Change-Id: I92eb6fd3eb263863a31338bc18c9826a2242434b
Reviewed-on: https://go-review.googlesource.com/c/154659
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-12-20 18:17:18 +00:00
Keith Randall 8b8312acd2 unix: avoid "64"-postfixed libSystem calls on iOS
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>
2018-12-20 18:15:54 +00:00
Keith Randall 45d26eb94b unix: convert Darwin syscalls from raw to libSystem
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>
2018-12-20 18:13:18 +00:00
Tobias Klauser 97b4c2a929 unix: update Dockerfile to Go 1.12beta1
The removed paddings are expected behavior resulting from CL 150602.

Change-Id: I2c80405e20f92cca4890230c6f0644b724a8076e
Reviewed-on: https://go-review.googlesource.com/c/155257
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-12-20 15:53:39 +00:00
Jordan Rhee 074acd46bc windows/svc: use wevtutil.exe instead of powershell for windows/arm
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>
2018-12-18 19:26:12 +00:00
Jordan Rhee dcdaa6325b windows: use netevent.dll in TestFormatMessage for windows/arm
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>
2018-12-17 22:35:16 +00:00
Tobias Klauser 4d1cda033e unix: remove Flock syscall for aix
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>
2018-12-13 20:03:52 +00:00
Tobias Klauser 586ba8c9bb unix: add SyncFileRange on linux/arm
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>
2018-12-13 15:07:53 +00:00
Tobias Klauser 73d4af5aa0 unix: evaluate cmsg alignment in cmsgAlignOf at compile time
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>
2018-12-13 08:13:44 +00:00