diff options
author | Peter Mundy <go.peter.90@gmail.com> | 2010-06-29 09:11:02 +1000 |
---|---|---|
committer | Peter Mundy <go.peter.90@gmail.com> | 2010-06-29 09:11:02 +1000 |
commit | 9c97bd7654b9386bf964bc1466c213dbabaa1e62 (patch) | |
tree | 84f7f887c2c3cb9361be5bb494a929270fad53c5 /src | |
parent | 80cdeea7eb22e42adcab6110e46e6d77346c018b (diff) | |
download | golang-9c97bd7654b9386bf964bc1466c213dbabaa1e62.tar.gz |
syscall: Add syscall_bsd.go to zsycall_freebsd_386.go
Revision: 5885c9d10f created syscall_bsd.go for code used
by Darwin and other *BSDs, which should have included
FreeBSD. mksyscall.sh to generate new zsyscall_freebsd_386.go.
Fixes issue 862.
R=golang-dev, adg
CC=golang-dev
http://codereview.appspot.com/1701048
Committer: Andrew Gerrand <adg@golang.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/pkg/syscall/zsyscall_freebsd_386.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/pkg/syscall/zsyscall_freebsd_386.go b/src/pkg/syscall/zsyscall_freebsd_386.go index 9e2213418..96e9da6a4 100644 --- a/src/pkg/syscall/zsyscall_freebsd_386.go +++ b/src/pkg/syscall/zsyscall_freebsd_386.go @@ -1,4 +1,4 @@ -// mksyscall.sh -l32 syscall_freebsd.go syscall_freebsd_386.go +// mksyscall.sh -l32 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT package syscall @@ -121,6 +121,18 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) return } +func utimes(path string, timeval *[2]Timeval) (errno int) { + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(timeval)), 0) + errno = int(e1) + return +} + +func futimes(fd int, timeval *[2]Timeval) (errno int) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + errno = int(e1) + return +} + func fcntl(fd int, cmd int, arg int) (val int, errno int) { r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) val = int(r0) |