Commit 5aa3a8de authored by Giles Lean's avatar Giles Lean Committed by Russ Cox

syscall: make signature of Umask on OS X, FreeBSD match Linux.

R=rsc
CC=golang-dev
https://golang.org/cl/207071
parent 0b4d8c19
......@@ -552,7 +552,7 @@ func Kill(pid int, signum int) (errno int) { return kill(pid, signum, 1) }
//sys Symlink(path string, link string) (errno int)
//sys Sync() (errno int)
//sys Truncate(path string, length int64) (errno int)
//sys Umask(newmask int) (errno int)
//sys Umask(newmask int) (oldmask int)
//sys Undelete(path string) (errno int)
//sys Unlink(path string) (errno int)
//sys Unmount(path string, flags int) (errno int)
......
......@@ -549,7 +549,7 @@ func SysctlUint32(name string) (value uint32, errno int) {
//sys Symlink(path string, link string) (errno int)
//sys Sync() (errno int)
//sys Truncate(path string, length int64) (errno int)
//sys Umask(newmask int) (errno int)
//sys Umask(newmask int) (oldmask int)
//sys Undelete(path string) (errno int)
//sys Unlink(path string) (errno int)
//sys Unmount(path string, flags int) (errno int)
......
......@@ -623,9 +623,9 @@ func Truncate(path string, length int64) (errno int) {
return
}
func Umask(newmask int) (errno int) {
_, _, e1 := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
errno = int(e1)
func Umask(newmask int) (oldmask int) {
r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
oldmask = int(r0)
return
}
......
......@@ -623,9 +623,9 @@ func Truncate(path string, length int64) (errno int) {
return
}
func Umask(newmask int) (errno int) {
_, _, e1 := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
errno = int(e1)
func Umask(newmask int) (oldmask int) {
r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
oldmask = int(r0)
return
}
......
......@@ -623,9 +623,9 @@ func Truncate(path string, length int64) (errno int) {
return
}
func Umask(newmask int) (errno int) {
_, _, e1 := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
errno = int(e1)
func Umask(newmask int) (oldmask int) {
r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
oldmask = int(r0)
return
}
......
......@@ -623,9 +623,9 @@ func Truncate(path string, length int64) (errno int) {
return
}
func Umask(newmask int) (errno int) {
_, _, e1 := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
errno = int(e1)
func Umask(newmask int) (oldmask int) {
r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
oldmask = int(r0)
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment