The flags parameter was added in https://golang.org/cl/7917. In that CL
the reviewers discussed adding UnlinkAt and changing Unlinkat, and opted
for the latter.
Unfortunately, I then undid that in https://golang.org/cl/10032, which
was a backport of (among others) https://golang.org/cl/5837. I didn't
notice that in the syscall package 5837 removed Unlinkat with two
parameters, but the port to the x/sys/unix package removed Unlinkat with
three parameters. Argh.
This CL effectively restores 7917, by adding the parameter back.
Fixesgolang/go#9923.
Change-Id: I8fe218ac637d0eb0346b63b596666671374bd19f
Reviewed-on: https://go-review.googlesource.com/18981
Reviewed-by: Rob Pike <r@golang.org>
The existing code has no way to manipulate termios or winsize structures
on solaris. This change adds IoctlGetXXX and IoctlSetXXX functions for
int, termios, termio, and winsize. The embedded awk script in
mkerrors.sh has additional patterns to generate the needed ioctl
constants for these calls.
Fixesgolang/go#12574
Change-Id: Ic62a8c698d42c8ca379c90f71e9f27635e7d03b5
Reviewed-on: https://go-review.googlesource.com/14587
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
Various syscalls offered by x/sys/unix on Linux are not available on
Solaris and should be, such as Mkfifo, Getwd(), Futimes() and others.
In particular, all of the *at() variants of existing functions were
added where appropriate.
Getgroups() was fixed to use the correct value for its sanity check on
the maximum number of groups.
Utimesnano() was updated to use the native Solaris utimensat function
for setting nanosecond-precision time.
Utimes() was updated to have the same error semantics and checking as
other platforms.
Getgroups(), anysocktoaddr(), and Recvmsg() were fixed to check the
return value before assuming syscall failure instead of relying solely
on errno being set.
mksyscall_solaris.pl needed some updates to better match the output of
the one found in syscall.
mkerrors.sh needed some updates to work out of the box on Solaris,
matching those recently done to the one in syscall.
The signatures (names) of some function parameters were changed to be
consistent with other platforms for the sake of documentation.
Fixes#8609
Change-Id: I9e4e2fee6d3ecfad9f4d845a5702ffde5166e804
Reviewed-on: https://go-review.googlesource.com/14643
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
In preparation for issues such as #10180, Getpagesize() needs to be
fixed to return the actual system's page size instead of assuming it's
always 4096.
This is particularly important for future platform support on Solaris.
Fixes#12076
Change-Id: I78205165909529215fe93ed6ba56e9c3ee1c2abb
Reviewed-on: https://go-review.googlesource.com/14483
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
These are needed by boltdb.
Change-Id: Ie6afa51dbf6436bb014f53f6b56ee2de6a06827d
Reviewed-on: https://go-review.googlesource.com/13720
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
CL 9184 changed the runtime and syscall packages to link Solaris binaries
directly instead of using dlopen/dlsym but failed to update sys/unix to
reflect these changes. This changes the Solaris port to use direct linking
as supported by Go 1.5.
Fixesgolang/go#10086
Change-Id: I6747ed939775b18fd967f81853c7d84537aa3842
Reviewed-on: https://go-review.googlesource.com/13400
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
If we use a local type, it won't compare properly with errors from
the rest of the standard library. Errors are the one type from syscall
that propagates through the system, so it's important to have only
one type for them.
Ditto for syscall.Signal.
LGTM=dave
R=rsc, dave
CC=golang-codereviews
https://golang.org/cl/123490043
Semi-automatic migration from package syscall to package {plan9,windows,unix}.
No builds attempted yet, but this gets a lot of noise behind us so subsequent
CLs will be more concise and easier to follow.
Subsequent CLs will have semantic content.
LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/121520043
This CL copies to each package of go.sys the files from syscall it will need.
Different directories have different files, but these:
mkall.sh
str.go
syscall.go
mksyscall.pl
race.go
race0.go
syscall_test.go
are copied to all three.
No changes yet, these are just copies. They are not ready to use yet:
package names are wrong, for starters. But this clean copy will make
it easier to follow the changes as the packages are enabled.
LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/126960043