]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: Add syscall_bsd.go to zsycall_freebsd_386.go
authorPeter Mundy <go.peter.90@gmail.com>
Mon, 28 Jun 2010 23:11:02 +0000 (09:11 +1000)
committerAndrew Gerrand <adg@golang.org>
Mon, 28 Jun 2010 23:11:02 +0000 (09:11 +1000)
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 #862.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/1701048

src/pkg/syscall/zsyscall_freebsd_386.go

index 9e22134180cf898d16a77f6728f39afc6d51515c..96e9da6a49ee9c7dd7242d4bbb1206ab9f19d2f4 100644 (file)
@@ -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)