]> gitweb.factorcode.org Git - factor.git/commitdiff
fix bootstrap on windows. here's an opportunity to use literals.
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 30 Apr 2009 18:47:49 +0000 (13:47 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 30 Apr 2009 18:47:49 +0000 (13:47 -0500)
basis/io/backend/windows/nt/nt.factor
basis/windows/errors/errors.factor

index bb5c115549c9c24cb7c9c2846ab78e08f92df62c..4dfe02d651e31964dcba5453441b0a58d92e4206 100755 (executable)
@@ -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 ;
index 34fd019889fdcdda7937bd8d854b14e98a3f78d8..e08704d46970102f21a3e48e639834417b1a13ec 100644 (file)
@@ -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? ;