1
0
mirror of https://github.com/golang/go synced 2024-11-25 05:57:57 -07:00

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

R=rsc
CC=golang-dev
https://golang.org/cl/207071
This commit is contained in:
Giles Lean 2010-02-16 11:43:25 -08:00 committed by Russ Cox
parent 0b4d8c19af
commit 5aa3a8de6d
6 changed files with 14 additions and 14 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}