Commit 2a1ee42e authored by Alex Brainman's avatar Alex Brainman Committed by Andrew Gerrand

fix windows build

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/1209048
parent 2d8aee45
...@@ -70,6 +70,12 @@ func UTF16ToString(s []uint16) string { ...@@ -70,6 +70,12 @@ func UTF16ToString(s []uint16) string {
// the UTF-8 string s, with a terminating NUL added. // the UTF-8 string s, with a terminating NUL added.
func StringToUTF16Ptr(s string) *uint16 { return &StringToUTF16(s)[0] } func StringToUTF16Ptr(s string) *uint16 { return &StringToUTF16(s)[0] }
func NsecToTimeval(nsec int64) (tv Timeval) {
tv.Sec = int32(nsec / 1e9)
tv.Usec = int32(nsec % 1e9 / 1e3)
return
}
// dll helpers // dll helpers
// implemented in ../pkg/runtime/windows/syscall.cgo // implemented in ../pkg/runtime/windows/syscall.cgo
...@@ -376,6 +382,11 @@ func Gettimeofday(tv *Timeval) (errno int) { ...@@ -376,6 +382,11 @@ func Gettimeofday(tv *Timeval) (errno int) {
return 0 return 0
} }
// TODO(brainman): implement Utimes, or rewrite os.file.Chtimes() instead
func Utimes(path string, tv []Timeval) (errno int) {
return EWINDOWS
}
// TODO(brainman): fix all needed for os // TODO(brainman): fix all needed for os
const ( const (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment