diff --git a/os/Xtrans.c b/os/Xtrans.c index 4f2cd91b9..9194ee11c 100644 --- a/os/Xtrans.c +++ b/os/Xtrans.c @@ -1028,14 +1028,12 @@ int _XSERVTransMakeAllCOTSServerListeners (const char *port, int *partial, * may be used by it. */ - -#ifdef WIN32 - /* * emulate writev */ static int _XSERVTransWriteV (XtransConnInfo ciptr, struct iovec *iov, size_t iovcnt) { +#ifdef WIN32 int i, len, total; char *base; @@ -1055,6 +1053,7 @@ static int _XSERVTransWriteV (XtransConnInfo ciptr, struct iovec *iov, size_t io } } return total; +#else + return writev(ciptr->fd, iov, iovcnt); +#endif } - -#endif /* WIN32 */ diff --git a/os/Xtransint.h b/os/Xtransint.h index 86c230c2e..1a83fb1f0 100644 --- a/os/Xtransint.h +++ b/os/Xtransint.h @@ -249,18 +249,8 @@ typedef struct _Xtransport_table { #pragma clang diagnostic ignored "-Wunused-function" #endif -#ifdef WIN32 - -#define WRITEV(ciptr, iov, iovcnt) _XSERVTransWriteV(ciptr, iov, iovcnt) - static int _XSERVTransWriteV(XtransConnInfo ciptr, struct iovec *iov, size_t iovcnt); -#else - -#define WRITEV(ciptr, iov, iovcnt) writev(ciptr->fd, iov, iovcnt) - -#endif /* WIN32 */ - static int trans_mkdir ( const char *, /* path */ int /* mode */ diff --git a/os/Xtranslcl.c b/os/Xtranslcl.c index 8ad854958..0604217ee 100644 --- a/os/Xtranslcl.c +++ b/os/Xtranslcl.c @@ -765,7 +765,7 @@ static ssize_t _XSERVTransLocalWritev(XtransConnInfo ciptr, struct iovec *iov, s { prmsg(2,"LocalWritev(%d,%p,%d)\n", ciptr->fd, (const void *) iov, iovcnt); - return WRITEV(ciptr,iov,iovcnt); + return _XSERVTransWriteV(ciptr,iov,iovcnt); } static int _XSERVTransLocalDisconnect(XtransConnInfo ciptr) diff --git a/os/Xtranssock.c b/os/Xtranssock.c index 8455103c5..c32cc9b79 100644 --- a/os/Xtranssock.c +++ b/os/Xtranssock.c @@ -1377,7 +1377,7 @@ static ssize_t _XSERVTransSocketWritev ( return i; } #endif - return WRITEV (ciptr, iov, iovcnt); + return _XSERVTransWriteV(ciptr, iov, iovcnt); } static ssize_t _XSERVTransSocketWrite (