From 2afc46f2b213336ca4ac1d518b9e9d4f6b5b0fbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslavas=20Po=C4=8Depko?= Date: Mon, 29 Aug 2011 15:38:12 -0400 Subject: [PATCH] doc/progs: fix windows/amd64 R=rsc CC=alex.brainman, golang-dev, vcc.163 https://golang.org/cl/4965050 --- doc/progs/file_windows.go | 2 +- doc/progs/run | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/progs/file_windows.go b/doc/progs/file_windows.go index 03003a3f71c..bfbac75ad08 100644 --- a/doc/progs/file_windows.go +++ b/doc/progs/file_windows.go @@ -15,7 +15,7 @@ type File struct { } func newFile(fd syscall.Handle, name string) *File { - if fd < 0 { + if fd == ^syscall.Handle(0) { return nil } return &File{fd, name} diff --git a/doc/progs/run b/doc/progs/run index 7bff2ccf4f1..9d56049a885 100755 --- a/doc/progs/run +++ b/doc/progs/run @@ -15,7 +15,7 @@ fi rm -f *.$O if [ "$GOOS" = "windows" ];then - $GC -o file.8 file_windows.go + $GC -o file.$O file_windows.go else $GC file.go fi