mirror of
https://github.com/golang/go
synced 2024-11-22 02:04:40 -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:
parent
0b4d8c19af
commit
5aa3a8de6d
@ -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 Symlink(path string, link string) (errno int)
|
||||||
//sys Sync() (errno int)
|
//sys Sync() (errno int)
|
||||||
//sys Truncate(path string, length int64) (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 Undelete(path string) (errno int)
|
||||||
//sys Unlink(path string) (errno int)
|
//sys Unlink(path string) (errno int)
|
||||||
//sys Unmount(path string, flags int) (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 Symlink(path string, link string) (errno int)
|
||||||
//sys Sync() (errno int)
|
//sys Sync() (errno int)
|
||||||
//sys Truncate(path string, length int64) (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 Undelete(path string) (errno int)
|
||||||
//sys Unlink(path string) (errno int)
|
//sys Unlink(path string) (errno int)
|
||||||
//sys Unmount(path string, flags int) (errno int)
|
//sys Unmount(path string, flags int) (errno int)
|
||||||
|
@ -623,9 +623,9 @@ func Truncate(path string, length int64) (errno int) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func Umask(newmask int) (errno int) {
|
func Umask(newmask int) (oldmask int) {
|
||||||
_, _, e1 := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
|
r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
|
||||||
errno = int(e1)
|
oldmask = int(r0)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -623,9 +623,9 @@ func Truncate(path string, length int64) (errno int) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func Umask(newmask int) (errno int) {
|
func Umask(newmask int) (oldmask int) {
|
||||||
_, _, e1 := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
|
r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
|
||||||
errno = int(e1)
|
oldmask = int(r0)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -623,9 +623,9 @@ func Truncate(path string, length int64) (errno int) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func Umask(newmask int) (errno int) {
|
func Umask(newmask int) (oldmask int) {
|
||||||
_, _, e1 := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
|
r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
|
||||||
errno = int(e1)
|
oldmask = int(r0)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -623,9 +623,9 @@ func Truncate(path string, length int64) (errno int) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func Umask(newmask int) (errno int) {
|
func Umask(newmask int) (oldmask int) {
|
||||||
_, _, e1 := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
|
r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
|
||||||
errno = int(e1)
|
oldmask = int(r0)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user