Further work towards use of win32 file HANDLEs
authorDavid Lichteblau <david@lichteblau.com>
Mon, 5 Nov 2012 13:36:31 +0000 (14:36 +0100)
committerDavid Lichteblau <david@lichteblau.com>
Tue, 13 Nov 2012 17:07:15 +0000 (18:07 +0100)
commited1910efb36f71b5ebe33b5ffffd7195e15644de
treed883fabdf56b35bff2899db2266695791448249e
parentfd8e8143cf02ac767e2a46a2bc526933e68ef583
Further work towards use of win32 file HANDLEs

Expose the fact that we are working with file handles (not simulated
file descriptors), and directly store those handles in fd-streams.

Represent them as integers (not SAPs) to avoid needless
incompatibilities between POSIX and Windows builds.  However, adjust
types so as to remove fixnum assumptions.

Includes some further tweaks to file-related foreign definitions
(and run-program in particular), to remove remaining uses of CRT
when possible.

Does not add any `feature' to help user code distinguish between
this SBCL and versions prior to this change using read-time
conditionals, since the changes are, in principle, not considered
user-visible.  (We are now unconditionally running the equivalent of
what is marked #!+fds-are-windows-handles on the Windows branch.)

To avoid breaking any user code that might have learned to retrieve
handles from our streams previously, preserve "osf handle"
conversion functions as trivial identity definitions for a while.

Thanks to Anton Kovalenko.
12 files changed:
contrib/sb-bsd-sockets/win32-sockets.lisp
contrib/sb-simple-streams/file.lisp
contrib/sb-simple-streams/internal.lisp
package-data-list.lisp-expr
src/code/fd-stream.lisp
src/code/run-program.lisp
src/code/serve-event.lisp
src/code/unix.lisp
src/code/warm-mswin.lisp [new file with mode: 0644]
src/code/win32.lisp
src/cold/warm.lisp
src/runtime/win32-os.c