Also enable TestFstatat for all Unices now that they all implement
Fstatat.
Change-Id: I9722437042d5fc0df4a27d3a6a2be3d124c60057
Reviewed-on: https://go-review.googlesource.com/100617
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
All BSDs provide the SYS___GETCWD syscall which can be used to implement
Getwd.
Also add a test based on TestChdirAndGetwd from os/os_test.go
Change-Id: I243eae3e02a40e92afad317eb1f8a28b6032c131
Reviewed-on: https://go-review.googlesource.com/83755
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Add IoctlGetInt/IoctlSetInt, IoctlGetTermios/IoctlSetTermios and
IoctlGetWinsize/IoctlSetWinsize on OpenBSD. These are similar to the
already existing implementations on Linux, Darwin and Solaris.
Change-Id: I99e9434fa50338a0b5d825490513e9383539727d
Reviewed-on: https://go-review.googlesource.com/75791
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Now that all BSD flavors support Poll, move the common implementation
into syscall_bsd.go
Change-Id: Id62a6163d41ef24e33f96540b661002b095a2fa1
Reviewed-on: https://go-review.googlesource.com/74290
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Tested with TestPoll extracted from syscall_linux_test.go. Once Poll is
supported on all OSes this test can be moved to syscall_unix_test.go.
Change-Id: Ic7ad2e749039e2e81612c2085d6fab73581d59f9
Reviewed-on: https://go-review.googlesource.com/73872
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Make Madvice, Mlock, Mlockall, Mprotect, Msync, Munlock and Munlockall
available equally on all BSD flavors. NetBSD was previously lacking
SYS_MSYNC, so add it.
Reorder the //sys function prototype alphabetically and clean up already
implemented syscalls everywhere.
Also add tests for Mprotect, Msync and Madvice - now that they're
available on all unix platforms.
Fixesgolang/go#18513
Change-Id: I0eb502d72c7e991f191fb96225ef04e8297d8b8d
Reviewed-on: https://go-review.googlesource.com/56172
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Follow golang.org/cl/55130 and add the utimensat syscall on *BSD. Use it
in UtimesNano and UtimesNanoAt (which is added on *BSD, akin to the
already existing implementation on Linux and Solaris).
Also add AT_FDCWD and AT_SYMLINK_NOFOLLOW where they are missing. These
might be used with UtimesNanoAt.
In order to be able to generate the syscalls, also add two missing
$GOOS_$GOARCH patterns to mkall.sh. As a side effect, some additional
syscalls are added for openbsd/arm.
Change-Id: I85351098002209f8454ec328cef0cfe9d12c5214
Reviewed-on: https://go-review.googlesource.com/55071
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This copies over some files from the main repo to make the
GOOS=openbsd GOARCH=arm go install and go test -c work.
No clue whether it actually works or not, though. We don't have
builders anymore for this port.
But once this compiles, we'll at least be able to use constants from
the x/sys/unix package from x/net without regressing x/net's support
for openbsd/arm. (If anybody uses openbsd/arm)
Fixesgolang/go#10826
Change-Id: Id821e2011bcd2d3720652be44ac09e4ce4d2a3a3
Reviewed-on: https://go-review.googlesource.com/54053
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Joel Sing <joel@sing.id.au>