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