st-1.0-win32: I think I'm going cygwin...
Jeff <[email protected]> Thu, 03 Oct 2002 14:38:31 -0700
| Newsgroups | gmane.comp.lib.state-threads.devel |
|---|---|
| Message-ID | <[email protected]> |
After many hours of research I have come to two conclusions with respect
to running state threads on win32:
1. The current st-1.0-win32 won't work for file i/o
2. It's fairly large project to fix it to work for file i/o
The main trouble is the file descriptors and socket descriptors on win32
come from seperate number spaces. Which is to say that it is possible to
have an open socket descriptor and and open file descriptor with the
same value. This is due to the fact that posix i/o and socket i/o are
implemented separately. This means, for example, that you can't call
read() or close() on a socket.
The 1.0 "experimental" win32 port worked around this problem mostly by
ignoring the possibility of file descriptors. I say "mostly" because
the author went to the trouble of porting st_open() to work around the
errno problem (windows socket functions don't use errno) but apparently
didn't consider that there would be no way to use the result.
The right way to fix these problems and a few others I didn't mention
would be to create posix/sockets runtime to use as a replacement for
msvcrt.dll. Such a runtime already exists and it's called cygwin1.dll.
I'm going to port to that and see how it goes.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf