From: Adam Dickmeiss Date: Mon, 1 Sep 1997 08:49:14 +0000 (+0000) Subject: New windows NT/95 port using MSV5.0. Minor changes only. X-Git-Tag: YAZ.1.8~633 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=6438b1afb3455d2b0aba71e90c873e3b8a6d5e54 New windows NT/95 port using MSV5.0. Minor changes only. --- diff --git a/comstack/comstack.c b/comstack/comstack.c index 5526fce..1242998 100644 --- a/comstack/comstack.c +++ b/comstack/comstack.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: comstack.c,v $ - * Revision 1.2 1995-09-29 17:01:48 quinn + * Revision 1.3 1997-09-01 08:49:14 adam + * New windows NT/95 port using MSV5.0. Minor changes only. + * + * Revision 1.2 1995/09/29 17:01:48 quinn * More Windows work * * Revision 1.1 1995/06/14 09:58:20 quinn @@ -19,6 +22,8 @@ * */ +#include + const char *cs_errlist[] = { "No error or unspecified error", diff --git a/comstack/tcpip.c b/comstack/tcpip.c index 31e6290..3cbf108 100644 --- a/comstack/tcpip.c +++ b/comstack/tcpip.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: tcpip.c,v $ - * Revision 1.15 1997-05-14 06:53:33 adam + * Revision 1.16 1997-09-01 08:49:14 adam + * New windows NT/95 port using MSV5.0. Minor changes only. + * + * Revision 1.15 1997/05/14 06:53:33 adam * C++ support. * * Revision 1.14 1997/05/01 15:06:32 adam @@ -415,7 +418,7 @@ COMSTACK tcpip_accept(COMSTACK h) return 0; } #ifdef WINDOWS - if (!cnew->blocking && ioctlsocket(new->iofile, FIONBIO, &tru) < 0) + if (!cnew->blocking && ioctlsocket(cnew->iofile, FIONBIO, &tru) < 0) #else if (!cnew->blocking && fcntl(cnew->iofile, F_SETFL, O_NONBLOCK) < 0) #endif @@ -557,10 +560,11 @@ int tcpip_close(COMSTACK h) tcpip_state *sp = h->cprivate; TRC(fprintf(stderr, "tcpip_close\n")); + if (h->iofile != -1) #ifdef WINDOWS - closesocket(h->iofile); + closesocket(h->iofile); #else - close(h->iofile); + close(h->iofile); #endif if (sp->altbuf) xfree(sp->altbuf);