diff options
author | Adam Jackson <ajax@redhat.com> | 2008-08-07 10:23:19 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2008-08-07 10:23:19 -0400 |
commit | 339ddc413559d4cb117a72f87b2a70dae6911c32 (patch) | |
tree | 913f8e391c8ba334794c779367e7aa0d6cdd8387 /Xtrans.c | |
parent | a78b9819cbbbddccb4a6bf364b88ec4f27d25c1f (diff) |
Massive ifdef cleanup, dropping a ton of unsupported platform code.
Diffstat (limited to 'Xtrans.c')
-rw-r--r-- | Xtrans.c | 54 |
1 files changed, 5 insertions, 49 deletions
@@ -101,9 +101,6 @@ Xtransport_table Xtransports[] = { #endif /* !LOCALCONN */ { &TRANS(SocketUNIXFuncs), TRANS_SOCKET_UNIX_INDEX }, #endif /* UNIXCONN */ -#if defined(OS2PIPECONN) - { &TRANS(OS2LocalFuncs), TRANS_LOCAL_LOCAL_INDEX }, -#endif /* OS2PIPECONN */ #if defined(LOCALCONN) { &TRANS(LocalFuncs), TRANS_LOCAL_LOCAL_INDEX }, #ifndef sun @@ -719,7 +716,7 @@ TRANS(SetOption) (XtransConnInfo ciptr, int option, int arg) break; case 1: /* Set to non-blocking mode */ -#if defined(O_NONBLOCK) && (!defined(ultrix) && !defined(hpux) && !defined(AIXV3) && !defined(uniosu) && !defined(__UNIXOS2__) && !defined(SCO325)) && !defined(__QNX__) +#if defined(O_NONBLOCK) && !defined(SCO325) ret = fcntl (fd, F_GETFL, 0); if (ret != -1) ret = fcntl (fd, F_SETFL, ret | O_NONBLOCK); @@ -731,7 +728,7 @@ TRANS(SetOption) (XtransConnInfo ciptr, int option, int arg) ret = ioctl (fd, FIOSNBIO, &arg); } #else -#if (defined(AIXV3) || defined(uniosu) || defined(WIN32) || defined(__UNIXOS2__) || defined(__QNX__)) && defined(FIONBIO) +#if defined(WIN32) { #ifdef WIN32 u_long arg; @@ -741,11 +738,7 @@ TRANS(SetOption) (XtransConnInfo ciptr, int option, int arg) arg = 1; /* IBM TCP/IP understands this option too well: it causes TRANS(Read) to fail * eventually with EWOULDBLOCK */ -#ifndef __UNIXOS2__ ret = ioctl (fd, FIONBIO, &arg); -#else -/* ret = ioctl(fd, FIONBIO, &arg, sizeof(int));*/ -#endif } #else ret = fcntl (fd, F_GETFL, 0); @@ -1292,45 +1285,8 @@ TRANS(MakeAllCLTSServerListeners) (char *port, int *partial, int *count_ret, * may be used by it. */ -#ifdef CRAY - -/* - * Cray UniCOS does not have readv and writev so we emulate - */ - -static int TRANS(ReadV) (XtransConnInfo ciptr, struct iovec *iov, int iovcnt) - -{ - struct msghdr hdr; - - hdr.msg_iov = iov; - hdr.msg_iovlen = iovcnt; - hdr.msg_accrights = 0; - hdr.msg_accrightslen = 0; - hdr.msg_name = 0; - hdr.msg_namelen = 0; - - return (recvmsg (ciptr->fd, &hdr, 0)); -} - -static int TRANS(WriteV) (XtransConnInfo ciptr, struct iovec *iov, int iovcnt) - -{ - struct msghdr hdr; - - hdr.msg_iov = iov; - hdr.msg_iovlen = iovcnt; - hdr.msg_accrights = 0; - hdr.msg_accrightslen = 0; - hdr.msg_name = 0; - hdr.msg_namelen = 0; - - return (sendmsg (ciptr->fd, &hdr, 0)); -} - -#endif /* CRAY */ -#if (defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__) +#if defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun) || defined(WIN32) /* * emulate readv @@ -1362,7 +1318,7 @@ static int TRANS(ReadV) (XtransConnInfo ciptr, struct iovec *iov, int iovcnt) #endif /* SYSV && __i386__ || WIN32 || __sxg__ */ -#if (defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__) +#if defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun) || defined(WIN32) /* * emulate writev @@ -1395,7 +1351,7 @@ static int TRANS(WriteV) (XtransConnInfo ciptr, struct iovec *iov, int iovcnt) #endif /* SYSV && __i386__ || WIN32 || __sxg__ */ -#if (defined(_POSIX_SOURCE) && !defined(AIXV3) && !defined(__QNX__)) || defined(hpux) || defined(USG) || defined(SVR4) || defined(__SCO__) +#if defined(_POSIX_SOURCE) || defined(USG) || defined(SVR4) || defined(__SCO__) #ifndef NEED_UTSNAME #define NEED_UTSNAME #endif |