diff options
author | Mike DePaulo <mikedep333@users.noreply.github.com> | 2015-04-16 18:30:39 -0400 |
---|---|---|
committer | Mike DePaulo <mikedep333@users.noreply.github.com> | 2015-04-16 18:30:39 -0400 |
commit | 8b1577599271da1ac50ebb38d7297769f6b1139c (patch) | |
tree | 7ece6e6befb03e6818f65687209df98cdb17307a /nx-X11/lib/xtrans | |
parent | 0d9217127f3e81fa19037f4923949b10443c5f1d (diff) | |
parent | ac9fbaabd6bdbca6dd1d94fa385aea41fdebf2c1 (diff) | |
download | nx-libs-8b1577599271da1ac50ebb38d7297769f6b1139c.tar.gz nx-libs-8b1577599271da1ac50ebb38d7297769f6b1139c.tar.bz2 nx-libs-8b1577599271da1ac50ebb38d7297769f6b1139c.zip |
Merge pull request #12 from sunweaver/pr/arch-cleanup.CRAY
arch cleanup (CRAY/WORD64) + X.Org CVE-2013-7439
Diffstat (limited to 'nx-X11/lib/xtrans')
-rw-r--r-- | nx-X11/lib/xtrans/Xtrans.c | 38 | ||||
-rw-r--r-- | nx-X11/lib/xtrans/Xtrans.h | 2 | ||||
-rw-r--r-- | nx-X11/lib/xtrans/Xtransint.h | 8 | ||||
-rw-r--r-- | nx-X11/lib/xtrans/Xtranssock.c | 16 | ||||
-rw-r--r-- | nx-X11/lib/xtrans/Xtransutil.c | 9 |
5 files changed, 5 insertions, 68 deletions
diff --git a/nx-X11/lib/xtrans/Xtrans.c b/nx-X11/lib/xtrans/Xtrans.c index a6bfbedc6..ef4d64aed 100644 --- a/nx-X11/lib/xtrans/Xtrans.c +++ b/nx-X11/lib/xtrans/Xtrans.c @@ -1265,44 +1265,6 @@ 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(WIN32) || defined(__sxg__) || defined(__UNIXOS2__) /* diff --git a/nx-X11/lib/xtrans/Xtrans.h b/nx-X11/lib/xtrans/Xtrans.h index e8d4bdfcd..ae808667e 100644 --- a/nx-X11/lib/xtrans/Xtrans.h +++ b/nx-X11/lib/xtrans/Xtrans.h @@ -198,7 +198,7 @@ typedef long BytesReadable_t; #endif -#if defined(WIN32) || (defined(USG) && !defined(CRAY) && !defined(umips) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__)) +#if defined(WIN32) || (defined(USG) && !defined(umips) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__)) /* * TRANS(Readv) and TRANS(Writev) use struct iovec, normally found diff --git a/nx-X11/lib/xtrans/Xtransint.h b/nx-X11/lib/xtrans/Xtransint.h index 5ca0d9328..60d3a9e60 100644 --- a/nx-X11/lib/xtrans/Xtransint.h +++ b/nx-X11/lib/xtrans/Xtransint.h @@ -384,7 +384,7 @@ typedef struct _Xtransport_table { * systems, so they may be emulated. */ -#if defined(CRAY) || (defined(SYSV) && defined(i386) && !defined(__SCO__)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__) +#if (defined(SYSV) && defined(i386) && !defined(__SCO__)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__) #define READV(ciptr, iov, iovcnt) TRANS(ReadV)(ciptr, iov, iovcnt) @@ -398,10 +398,10 @@ static int TRANS(ReadV)( #define READV(ciptr, iov, iovcnt) readv(ciptr->fd, iov, iovcnt) -#endif /* CRAY || (SYSV && i386) || WIN32 || __sxg__ || */ +#endif /* (SYSV && i386) || WIN32 || __sxg__ || */ -#if defined(CRAY) || (defined(SYSV) && defined(i386) && !defined(__SCO__)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__) +#if (defined(SYSV) && defined(i386) && !defined(__SCO__)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__) #define WRITEV(ciptr, iov, iovcnt) TRANS(WriteV)(ciptr, iov, iovcnt) @@ -415,7 +415,7 @@ static int TRANS(WriteV)( #define WRITEV(ciptr, iov, iovcnt) writev(ciptr->fd, iov, iovcnt) -#endif /* CRAY || WIN32 || __sxg__ */ +#endif /* WIN32 || __sxg__ */ static int is_numeric ( diff --git a/nx-X11/lib/xtrans/Xtranssock.c b/nx-X11/lib/xtrans/Xtranssock.c index 091fc1ccd..62feefed7 100644 --- a/nx-X11/lib/xtrans/Xtranssock.c +++ b/nx-X11/lib/xtrans/Xtranssock.c @@ -2359,26 +2359,10 @@ TRANS(SocketINETConnect) (XtransConnInfo ciptr, char *host, char *port) ESET(EPROTOTYPE); return TRANS_CONNECT_FAILED; } - -#if defined(CRAY) && defined(OLDTCP) - /* Only Cray UNICOS3 and UNICOS4 will define this */ - { - long t; - memcpy ((char *)&t, (char *) hostp->h_addr, sizeof (t)); - sockname.sin_addr = t; - } -#else memcpy ((char *) &sockname.sin_addr, (char *) hostp->h_addr, sizeof (sockname.sin_addr)); -#endif /* CRAY and OLDTCP */ - } else { -#if defined(CRAY) && defined(OLDTCP) - /* Only Cray UNICOS3 and UNICOS4 will define this */ - sockname.sin_addr = tmpaddr; -#else sockname.sin_addr.s_addr = tmpaddr; -#endif /* CRAY and OLDTCP */ } /* diff --git a/nx-X11/lib/xtrans/Xtransutil.c b/nx-X11/lib/xtrans/Xtransutil.c index 253e8b099..729e65caa 100644 --- a/nx-X11/lib/xtrans/Xtransutil.c +++ b/nx-X11/lib/xtrans/Xtransutil.c @@ -104,17 +104,8 @@ TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr **addrp) */ struct sockaddr_in saddr; -#ifdef CRAY -#ifdef OLDTCP - int len = sizeof(saddr.sin_addr); -#else - int len = SIZEOF_in_addr; -#endif /* OLDTCP */ - char *cp = (char *) &saddr.sin_addr; -#else /* else not CRAY */ int len = sizeof(saddr.sin_addr.s_addr); char *cp = (char *) &saddr.sin_addr.s_addr; -#endif /* CRAY */ memcpy (&saddr, *addrp, sizeof (struct sockaddr_in)); |