diff options
author | Alex Brainman <alex.brainman@gmail.com> | 2010-05-24 11:48:14 -0700 |
---|---|---|
committer | Alex Brainman <alex.brainman@gmail.com> | 2010-05-24 11:48:14 -0700 |
commit | b541a61638f5dd763cf697592aafcad5d0b3dfff (patch) | |
tree | dee8b57c2757a7f1b0e33f0cb0c62e179620965a /src/pkg/syscall/syscall_windows.go | |
parent | 9c8a2a45e6a8228bcc38101d1ba87b8e2a86d077 (diff) | |
download | golang-b541a61638f5dd763cf697592aafcad5d0b3dfff.tar.gz |
fix windows build
R=golang-dev, adg
CC=golang-dev
http://codereview.appspot.com/1209048
Committer: Andrew Gerrand <adg@golang.org>
Diffstat (limited to 'src/pkg/syscall/syscall_windows.go')
-rw-r--r-- | src/pkg/syscall/syscall_windows.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/pkg/syscall/syscall_windows.go b/src/pkg/syscall/syscall_windows.go index 401b0a51a..984459dae 100644 --- a/src/pkg/syscall/syscall_windows.go +++ b/src/pkg/syscall/syscall_windows.go @@ -70,6 +70,12 @@ func UTF16ToString(s []uint16) string { // the UTF-8 string s, with a terminating NUL added. 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 // implemented in ../pkg/runtime/windows/syscall.cgo @@ -376,6 +382,11 @@ func Gettimeofday(tv *Timeval) (errno int) { 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 const ( |