Skip to content

Commit

Permalink
syscall: fix prototype of Fchflags (API change)
Browse files Browse the repository at this point in the history
API change, but the old API is obviously wrong.

R=golang-dev, iant, r, rsc
CC=golang-dev
https://golang.org/cl/9157044
  • Loading branch information
minux committed May 6, 2013
1 parent a228e73 commit 6de184b
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 61 deletions.
6 changes: 6 additions & 0 deletions api/except.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
pkg net, func ListenUnixgram(string, *UnixAddr) (*UDPConn, error)
pkg syscall (darwin-386), func Fchflags(string, int) error
pkg syscall (darwin-386-cgo), func Fchflags(string, int) error
pkg syscall (darwin-amd64), func Fchflags(string, int) error
pkg syscall (darwin-amd64-cgo), func Fchflags(string, int) error
pkg syscall (freebsd-386), func Fchflags(string, int) error
pkg syscall (freebsd-amd64), func Fchflags(string, int) error
pkg text/template/parse, type DotNode bool
pkg text/template/parse, type Node interface { Copy, String, Type }
10 changes: 9 additions & 1 deletion doc/go1.1.html
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,15 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
</li>

<li>
The <a href="/pkg/syscall/"><code>syscall</code></a> package has received many updates to make it more inclusive of constants and system calls for each supported operating system.
The <a href="/pkg/syscall/"><code>syscall</code></a> package's
<a href="/pkg/syscall/#Fchflags"><code>Fchflags</code></a> function on various BSDs
(including Darwin) has changed signature.
It now takes an int as the first parameter instead of a string.
Since this API change fixes a bug, it is permitted by the Go 1 compatibility rules.
</li>
<li>
The <a href="/pkg/syscall/"><code>syscall</code></a> package also has received many updates
to make it more inclusive of constants and system calls for each supported operating system.
</li>

<li>
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/syscall/syscall_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func Kill(pid int, signum Signal) (err error) { return kill(pid, int(signum), 1)
//sys Exchangedata(path1 string, path2 string, options int) (err error)
//sys Exit(code int)
//sys Fchdir(fd int) (err error)
//sys Fchflags(path string, flags int) (err error)
//sys Fchflags(fd int, flags int) (err error)
//sys Fchmod(fd int, mode uint32) (err error)
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Flock(fd int, how int) (err error)
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/syscall/syscall_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
//sysnb Dup2(from int, to int) (err error)
//sys Exit(code int)
//sys Fchdir(fd int) (err error)
//sys Fchflags(path string, flags int) (err error)
//sys Fchflags(fd int, flags int) (err error)
//sys Fchmod(fd int, mode uint32) (err error)
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Flock(fd int, how int) (err error)
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/syscall/syscall_netbsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sysnb Dup2(from int, to int) (err error)
//sys Exit(code int)
//sys Fchdir(fd int) (err error)
//sys Fchflags(path string, flags int) (err error)
//sys Fchflags(fd int, flags int) (err error)
//sys Fchmod(fd int, mode uint32) (err error)
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Flock(fd int, how int) (err error)
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/syscall/syscall_openbsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sysnb Dup2(from int, to int) (err error)
//sys Exit(code int)
//sys Fchdir(fd int) (err error)
//sys Fchflags(path string, flags int) (err error)
//sys Fchflags(fd int, flags int) (err error)
//sys Fchmod(fd int, mode uint32) (err error)
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Flock(fd int, how int) (err error)
Expand Down
9 changes: 2 additions & 7 deletions src/pkg/syscall/zsyscall_darwin_386.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,13 +458,8 @@ func Fchdir(fd int) (err error) {

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

func Fchflags(path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
func Fchflags(fd int, flags int) (err error) {
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = e1
}
Expand Down
9 changes: 2 additions & 7 deletions src/pkg/syscall/zsyscall_darwin_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,13 +458,8 @@ func Fchdir(fd int) (err error) {

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

func Fchflags(path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
func Fchflags(fd int, flags int) (err error) {
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = e1
}
Expand Down
9 changes: 2 additions & 7 deletions src/pkg/syscall/zsyscall_freebsd_386.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,8 @@ func Fchdir(fd int) (err error) {

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

func Fchflags(path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
func Fchflags(fd int, flags int) (err error) {
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = e1
}
Expand Down
9 changes: 2 additions & 7 deletions src/pkg/syscall/zsyscall_freebsd_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,8 @@ func Fchdir(fd int) (err error) {

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

func Fchflags(path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
func Fchflags(fd int, flags int) (err error) {
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = e1
}
Expand Down
9 changes: 2 additions & 7 deletions src/pkg/syscall/zsyscall_netbsd_386.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,13 +435,8 @@ func Fchdir(fd int) (err error) {

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

func Fchflags(path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
func Fchflags(fd int, flags int) (err error) {
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = e1
}
Expand Down
9 changes: 2 additions & 7 deletions src/pkg/syscall/zsyscall_netbsd_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,13 +435,8 @@ func Fchdir(fd int) (err error) {

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

func Fchflags(path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
func Fchflags(fd int, flags int) (err error) {
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = e1
}
Expand Down
9 changes: 2 additions & 7 deletions src/pkg/syscall/zsyscall_openbsd_386.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,8 @@ func Fchdir(fd int) (err error) {

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

func Fchflags(path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
func Fchflags(fd int, flags int) (err error) {
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = e1
}
Expand Down
9 changes: 2 additions & 7 deletions src/pkg/syscall/zsyscall_openbsd_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,8 @@ func Fchdir(fd int) (err error) {

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

func Fchflags(path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
func Fchflags(fd int, flags int) (err error) {
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = e1
}
Expand Down

0 comments on commit 6de184b

Please sign in to comment.