* autoload.h: Eliminate.

* autoload.cc: Pull in autoload.h.  Eliminate many macros.  Rewrite to avoid
necessity of initialization routines.  Just use a standard one.
(wsock_init): New function.  Moved from net.cc.
* net.cc (wsock_init): Move to autoload.cc.
(wsadata): Make global.
* dtable.cc (dtable::build_fhandler): Use more reliable method for checking if
net stuff has been loaded.
This commit is contained in:
Christopher Faylor
2001-05-16 05:07:51 +00:00
parent 2b0a111fcf
commit d61b1993b3
5 changed files with 299 additions and 239 deletions

View File

@@ -217,6 +217,7 @@ dtable::build_fhandler (int fd, const char *name, HANDLE handle)
{
int unit;
DWORD devn;
extern bool wsock_started;
if ((devn = get_device_number (name, unit)) == FH_BAD)
{
@@ -231,7 +232,7 @@ dtable::build_fhandler (int fd, const char *name, HANDLE handle)
devn = FH_CONIN;
else if (GetConsoleScreenBufferInfo (handle, &cinfo))
devn= FH_CONOUT;
else if (wsock32_handle && getpeername ((SOCKET) handle, &sa, &sal))
else if (wsock_started && getpeername ((SOCKET) handle, &sa, &sal))
devn = FH_SOCKET;
else if (GetFileType (handle) == FILE_TYPE_PIPE)
devn = FH_PIPE;