Fixing Unix/Windows init-stdio
parent
72e15848bf
commit
a4963a9217
|
@ -182,7 +182,7 @@ M: unix-io io-multiplex ( ms -- )
|
|||
mx get-global wait-for-events ;
|
||||
|
||||
M: unix-io init-stdio ( -- )
|
||||
0 1 handle>duplex-stream io:stdio utf8 <encoded-duplex> set-global
|
||||
0 1 handle>duplex-stream utf8 <encoded-duplex> io:stdio set-global
|
||||
2 <writer> utf8 <encoded> io:stderr set-global ;
|
||||
|
||||
! mx io-task for embedding an fd-based mx inside another mx
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
USING: io.nonblocking io.windows threads.private kernel
|
||||
io.backend windows.winsock windows.kernel32 windows
|
||||
io.streams.duplex io namespaces alien.syntax system combinators
|
||||
io.buffers ;
|
||||
io.buffers io.encodings io.encodings.utf8 ;
|
||||
IN: io.windows.ce.backend
|
||||
|
||||
: port-errored ( port -- )
|
||||
|
@ -41,5 +41,5 @@ M: windows-ce-io init-stdio ( -- )
|
|||
] [
|
||||
0 _getstdfilex _fileno
|
||||
1 _getstdfilex _fileno
|
||||
] if <win32-duplex-stream>
|
||||
] if <win32-duplex-stream> utf8 <encoded-duplex>
|
||||
] with-variable stdio set-global ;
|
||||
|
|
Loading…
Reference in New Issue