Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-05-16 09:07:51 +0400
committerChristopher Faylor <me@cgf.cx>2001-05-16 09:07:51 +0400
commitd61b1993b36f3e7459c37db692c321654af3662e (patch)
tree0c7c4e6add1fd69120ce5cf969394e08ed72bb01 /winsup/cygwin/dtable.cc
parent2b0a111fcf0a2e7276f9c0f1cb9e56dc5d14361c (diff)
* 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.
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r--winsup/cygwin/dtable.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index 0e0942cde..4fb726e4d 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -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;