fix bootstrap on windows. here's an opportunity to use literals.
parent
31ce2252e7
commit
6ec73b2a2a
|
@ -46,7 +46,7 @@ M: winnt add-completion ( win32-handle -- )
|
||||||
{ [ dup integer? ] [ ] }
|
{ [ dup integer? ] [ ] }
|
||||||
{ [ dup array? ] [
|
{ [ dup array? ] [
|
||||||
first dup eof?
|
first dup eof?
|
||||||
[ drop 0 ] [ win32-error-string throw ] if
|
[ drop 0 ] [ n>win32-error-string throw ] if
|
||||||
] }
|
] }
|
||||||
} cond
|
} cond
|
||||||
] with-timeout ;
|
] with-timeout ;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
USING: alien.c-types kernel locals math math.bitwise
|
USING: alien.c-types kernel locals math math.bitwise
|
||||||
windows.kernel32 sequences byte-arrays unicode.categories
|
windows.kernel32 sequences byte-arrays unicode.categories
|
||||||
io.encodings.string io.encodings.utf16n alien.strings ;
|
io.encodings.string io.encodings.utf16n alien.strings
|
||||||
|
arrays ;
|
||||||
IN: windows.errors
|
IN: windows.errors
|
||||||
|
|
||||||
CONSTANT: ERROR_SUCCESS 0
|
CONSTANT: ERROR_SUCCESS 0
|
||||||
|
@ -731,13 +732,11 @@ ERROR: error-message-failed id ;
|
||||||
win32-error-string throw
|
win32-error-string throw
|
||||||
] when ;
|
] when ;
|
||||||
|
|
||||||
CONSTANT: expected-io-errors
|
: expected-io-errors ( -- seq )
|
||||||
{
|
|
||||||
ERROR_SUCCESS
|
ERROR_SUCCESS
|
||||||
ERROR_IO_INCOMPLETE
|
ERROR_IO_INCOMPLETE
|
||||||
ERROR_IO_PENDING
|
ERROR_IO_PENDING
|
||||||
WAIT_TIMEOUT
|
WAIT_TIMEOUT 4array ; foldable
|
||||||
}
|
|
||||||
|
|
||||||
: expected-io-error? ( error-code -- ? )
|
: expected-io-error? ( error-code -- ? )
|
||||||
expected-io-errors member? ;
|
expected-io-errors member? ;
|
||||||
|
|
Loading…
Reference in New Issue