From fd1d8cdc09ed86e4a0812120a17ff0d7b04adcaf Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 16 Jan 1998 12:19:22 +0000 Subject: *** empty log message *** git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/RUBY@11 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- missing/nt.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'missing/nt.c') diff --git a/missing/nt.c b/missing/nt.c index 1cd81fd28c..703556cad7 100644 --- a/missing/nt.c +++ b/missing/nt.c @@ -149,8 +149,8 @@ flock(int fd, int oper) #undef LK_LEN -#undef const -FILE *fdopen(int, const char *); +//#undef const +//FILE *fdopen(int, const char *); #if 0 void @@ -185,7 +185,7 @@ NtInitialize(int *argc, char ***argv) { tzset(); // Initialize Winsock - // StartSockets(); + StartSockets(); } @@ -501,7 +501,6 @@ mypopen (char *cmd, char *mode) return fp; } - fRet = CreatePipe(&hInFile, &hOutFile, &sa, 2048L); if (!fRet) Fatal("cannot open pipe \"%s\" (%s)", cmd, strerror(errno)); @@ -1572,7 +1571,7 @@ valid_filename(char *s) // FILE * -fdopen (int fd, const char *mode) +myfdopen (int fd, const char *mode) { FILE *fp; char sockbuf[80]; @@ -1580,6 +1579,8 @@ fdopen (int fd, const char *mode) int retval; extern int errno; + //fprintf(stderr, "myfdopen()\n"); + retval = getsockopt((SOCKET)fd, SOL_SOCKET, SO_TYPE, sockbuf, &optlen); if (retval == SOCKET_ERROR) { int iRet; @@ -1951,8 +1952,10 @@ mysocket (int af, int type, int protocol) if (!NtSocketsInitialized++) { StartSockets(); } - if ((s = socket (af, type, protocol)) == INVALID_SOCKET) + if ((s = socket (af, type, protocol)) == INVALID_SOCKET) { errno = WSAGetLastError(); + //fprintf(stderr, "socket fail (%d)", WSAGetLastError()); + } return s; } -- cgit v1.2.3