From 6ec73b2a2a8cff35a1c6f705efab29a01b9ae3e0 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Thu, 30 Apr 2009 13:47:49 -0500 Subject: [PATCH] fix bootstrap on windows. here's an opportunity to use literals. --- basis/io/backend/windows/nt/nt.factor | 2 +- basis/windows/errors/errors.factor | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/basis/io/backend/windows/nt/nt.factor b/basis/io/backend/windows/nt/nt.factor index bb5c115549..4dfe02d651 100755 --- a/basis/io/backend/windows/nt/nt.factor +++ b/basis/io/backend/windows/nt/nt.factor @@ -46,7 +46,7 @@ M: winnt add-completion ( win32-handle -- ) { [ dup integer? ] [ ] } { [ dup array? ] [ first dup eof? - [ drop 0 ] [ win32-error-string throw ] if + [ drop 0 ] [ n>win32-error-string throw ] if ] } } cond ] with-timeout ; diff --git a/basis/windows/errors/errors.factor b/basis/windows/errors/errors.factor index 34fd019889..e08704d469 100644 --- a/basis/windows/errors/errors.factor +++ b/basis/windows/errors/errors.factor @@ -1,6 +1,7 @@ USING: alien.c-types kernel locals math math.bitwise 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 CONSTANT: ERROR_SUCCESS 0 @@ -731,13 +732,11 @@ ERROR: error-message-failed id ; win32-error-string throw ] when ; -CONSTANT: expected-io-errors - { - ERROR_SUCCESS - ERROR_IO_INCOMPLETE - ERROR_IO_PENDING - WAIT_TIMEOUT - } +: expected-io-errors ( -- seq ) + ERROR_SUCCESS + ERROR_IO_INCOMPLETE + ERROR_IO_PENDING + WAIT_TIMEOUT 4array ; foldable : expected-io-error? ( error-code -- ? ) expected-io-errors member? ;