From: Ian Lance Taylor Date: Wed, 5 Jan 2011 06:28:31 +0000 (-0800) Subject: syscall: Make Access second argument consistently uint32. X-Git-Tag: weekly.2011-01-06~19 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e9c4f09985f064ffb9fc37dd28f207a4c13bb093;p=gostls13.git syscall: Make Access second argument consistently uint32. Fixes #1377. R=rsc, adg, r CC=golang-dev https://golang.org/cl/3868041 --- diff --git a/src/pkg/syscall/syscall_darwin.go b/src/pkg/syscall/syscall_darwin.go index 25606c1122..ab83af5c15 100644 --- a/src/pkg/syscall/syscall_darwin.go +++ b/src/pkg/syscall/syscall_darwin.go @@ -25,7 +25,7 @@ func Kill(pid int, signum int) (errno int) { return kill(pid, signum, 1) } /* * Exposed directly */ -//sys Access(path string, flags int) (errno int) +//sys Access(path string, mode uint32) (errno int) //sys Adjtime(delta *Timeval, olddelta *Timeval) (errno int) //sys Chdir(path string) (errno int) //sys Chflags(path string, flags int) (errno int) diff --git a/src/pkg/syscall/syscall_freebsd.go b/src/pkg/syscall/syscall_freebsd.go index 051e1145bc..ee947be200 100644 --- a/src/pkg/syscall/syscall_freebsd.go +++ b/src/pkg/syscall/syscall_freebsd.go @@ -17,7 +17,7 @@ const OS = "freebsd" /* * Exposed directly */ -//sys Access(path string, flags int) (errno int) +//sys Access(path string, mode uint32) (errno int) //sys Adjtime(delta *Timeval, olddelta *Timeval) (errno int) //sys Chdir(path string) (errno int) //sys Chflags(path string, flags int) (errno int) diff --git a/src/pkg/syscall/zsyscall_darwin_386.go b/src/pkg/syscall/zsyscall_darwin_386.go index 8f0bf34992..9718e5def4 100644 --- a/src/pkg/syscall/zsyscall_darwin_386.go +++ b/src/pkg/syscall/zsyscall_darwin_386.go @@ -196,8 +196,8 @@ func kill(pid int, signum int, posix int) (errno int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Access(path string, flags int) (errno int) { - _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0) +func Access(path string, mode uint32) (errno int) { + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0) errno = int(e1) return } diff --git a/src/pkg/syscall/zsyscall_darwin_amd64.go b/src/pkg/syscall/zsyscall_darwin_amd64.go index 02d677b7a9..6dca1987c9 100644 --- a/src/pkg/syscall/zsyscall_darwin_amd64.go +++ b/src/pkg/syscall/zsyscall_darwin_amd64.go @@ -196,8 +196,8 @@ func kill(pid int, signum int, posix int) (errno int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Access(path string, flags int) (errno int) { - _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0) +func Access(path string, mode uint32) (errno int) { + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0) errno = int(e1) return } diff --git a/src/pkg/syscall/zsyscall_freebsd_386.go b/src/pkg/syscall/zsyscall_freebsd_386.go index 844ea2b8e8..627a9a24d8 100644 --- a/src/pkg/syscall/zsyscall_freebsd_386.go +++ b/src/pkg/syscall/zsyscall_freebsd_386.go @@ -188,8 +188,8 @@ func fcntl(fd int, cmd int, arg int) (val int, errno int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Access(path string, flags int) (errno int) { - _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0) +func Access(path string, mode uint32) (errno int) { + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0) errno = int(e1) return } diff --git a/src/pkg/syscall/zsyscall_freebsd_amd64.go b/src/pkg/syscall/zsyscall_freebsd_amd64.go index 571bfea636..8872367b14 100644 --- a/src/pkg/syscall/zsyscall_freebsd_amd64.go +++ b/src/pkg/syscall/zsyscall_freebsd_amd64.go @@ -188,8 +188,8 @@ func fcntl(fd int, cmd int, arg int) (val int, errno int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Access(path string, flags int) (errno int) { - _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0) +func Access(path string, mode uint32) (errno int) { + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0) errno = int(e1) return }