From 95042f17151885064403698e4fac324916e97363 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Sun, 28 Sep 2014 22:42:43 -0700 Subject: [PATCH] fix win64 test failures from #8420 --- base/file.jl | 2 +- base/stream.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base/file.jl b/base/file.jl index 798b754565f04..c5cf1f68ab055 100644 --- a/base/file.jl +++ b/base/file.jl @@ -133,7 +133,7 @@ end seed::Uint32 = rand(Uint32) dir = tempdir() while true - if uint16(seed) == 0 + if (seed & typemax(Uint16)) == 0 seed += 1 end filename = tempname(dir, seed) diff --git a/base/stream.jl b/base/stream.jl index 87813926d16a1..a91f0b5907eec 100644 --- a/base/stream.jl +++ b/base/stream.jl @@ -932,7 +932,7 @@ for (x,writable,unix_fd,c_symbol) in ((:STDIN,false,0,:jl_uv_stdin),(:STDOUT,tru function ($_f)(stream) global $x @windows? ( - ccall(:SetStdHandle,stdcall,Int32,(Uint32,Ptr{Void}), + ccall(:SetStdHandle,stdcall,Int32,(Int32,Ptr{Void}), $(-10-unix_fd),_get_osfhandle(_fd(stream)).handle) : dup(_fd(stream), RawFD($unix_fd)) ) $x = stream