summaryrefslogtreecommitdiff
path: root/missing/nt.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-01-16 12:19:22 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-01-16 12:19:22 +0000
commitfd1d8cdc09ed86e4a0812120a17ff0d7b04adcaf (patch)
tree341289a84a427f1e92425c7ebf82d2f1733e9a40 /missing/nt.c
parentf12baed5df6d3c213dd75d2f0d9f36bb179fb843 (diff)
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/RUBY@11 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing/nt.c')
-rw-r--r--missing/nt.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/missing/nt.c b/missing/nt.c
index 1cd81fd28c1..703556cad77 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;
}