diff options
-rw-r--r-- | Xtrans.c | 15 | ||||
-rw-r--r-- | Xtransint.h | 8 | ||||
-rw-r--r-- | Xtranslcl.c | 32 | ||||
-rw-r--r-- | Xtranssock.c | 12 |
4 files changed, 26 insertions, 41 deletions
@@ -100,15 +100,15 @@ Xtransport_table Xtransports[] = { #endif /* UNIXCONN */ #if defined(LOCALCONN) { &TRANS(LocalFuncs), TRANS_LOCAL_LOCAL_INDEX }, -#ifndef sun +#ifndef __sun { &TRANS(PTSFuncs), TRANS_LOCAL_PTS_INDEX }, -#endif /* sun */ +#endif /* __sun */ #if defined(SVR4) || defined(__SVR4) { &TRANS(NAMEDFuncs), TRANS_LOCAL_NAMED_INDEX }, #endif -#ifdef sun +#ifdef __sun { &TRANS(PIPEFuncs), TRANS_LOCAL_PIPE_INDEX }, -#endif /* sun */ +#endif /* __sun */ #if defined(__SCO__) || defined(__UNIXWARE__) { &TRANS(SCOFuncs), TRANS_LOCAL_SCO_INDEX }, #endif /* __SCO__ || __UNIXWARE__ */ @@ -1418,7 +1418,7 @@ TRANS(MakeAllCLTSServerListeners) (const char *port, int *partial, */ -#if defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun) || defined(WIN32) +#ifdef WIN32 /* * emulate readv @@ -1448,9 +1448,6 @@ static int TRANS(ReadV) (XtransConnInfo ciptr, struct iovec *iov, int iovcnt) return total; } -#endif /* SYSV && __i386__ || WIN32 || __sxg__ */ - -#if defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun) || defined(WIN32) /* * emulate writev @@ -1480,7 +1477,7 @@ static int TRANS(WriteV) (XtransConnInfo ciptr, struct iovec *iov, int iovcnt) return total; } -#endif /* SYSV && __i386__ || WIN32 || __sxg__ */ +#endif /* WIN32 */ #if defined(_POSIX_SOURCE) || defined(USG) || defined(SVR4) || defined(__SVR4) || defined(__SCO__) diff --git a/Xtransint.h b/Xtransint.h index 5ff824d..dd63e27 100644 --- a/Xtransint.h +++ b/Xtransint.h @@ -350,7 +350,7 @@ typedef struct _Xtransport_table { * systems, so they may be emulated. */ -#if defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun) || defined(WIN32) +#ifdef WIN32 #define READV(ciptr, iov, iovcnt) TRANS(ReadV)(ciptr, iov, iovcnt) @@ -364,10 +364,10 @@ static int TRANS(ReadV)( #define READV(ciptr, iov, iovcnt) readv(ciptr->fd, iov, iovcnt) -#endif /* CRAY || (SYSV && __i386__) || WIN32 || __sxg__ || */ +#endif /* WIN32 */ -#if defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun) || defined(WIN32) +#ifdef WIN32 #define WRITEV(ciptr, iov, iovcnt) TRANS(WriteV)(ciptr, iov, iovcnt) @@ -381,7 +381,7 @@ static int TRANS(WriteV)( #define WRITEV(ciptr, iov, iovcnt) writev(ciptr->fd, iov, iovcnt) -#endif /* CRAY || WIN32 || __sxg__ */ +#endif /* WIN32 */ static int is_numeric ( diff --git a/Xtranslcl.c b/Xtranslcl.c index 3217506..a8bbf10 100644 --- a/Xtranslcl.c +++ b/Xtranslcl.c @@ -78,7 +78,7 @@ from The Open Group. #if defined(SVR4) || defined(__SVR4) #include <sys/filio.h> #endif -#ifdef sun +#ifdef __sun # include <stropts.h> #else # include <sys/stropts.h> @@ -104,7 +104,7 @@ from The Open Group. * - named pipes * - SCO */ -#if !defined(sun) +#if !defined(__sun) # define LOCAL_TRANS_PTS #endif #if defined(SVR4) || defined(__SVR4) @@ -243,7 +243,7 @@ static void _dummy(int sig _X_UNUSED) } #endif /* LOCAL_TRANS_PTS */ -#ifndef sun +#ifndef __sun #define X_STREAMS_DIR "/dev/X" #define DEV_SPX "/dev/spx" #else @@ -259,17 +259,17 @@ static void _dummy(int sig _X_UNUSED) #if defined(X11_t) #define PTSNODENAME "/dev/X/server." -#ifdef sun +#ifdef __sun #define NAMEDNODENAME "/tmp/.X11-pipe/X" #else #define NAMEDNODENAME "/dev/X/Nserver." #define SCORNODENAME "/dev/X%1sR" #define SCOSNODENAME "/dev/X%1sS" -#endif /* !sun */ +#endif /* !__sun */ #endif #if defined(XIM_t) -#ifdef sun +#ifdef __sun #define NAMEDNODENAME "/tmp/.XIM-pipe/XIM" #else #define PTSNODENAME "/dev/X/XIM." @@ -279,7 +279,7 @@ static void _dummy(int sig _X_UNUSED) #endif #endif #if defined(FS_t) || defined (FONT_t) -#ifdef sun +#ifdef __sun #define NAMEDNODENAME "/tmp/.font-pipe/fs" #else /* @@ -293,7 +293,7 @@ static void _dummy(int sig _X_UNUSED) #endif #endif #if defined(ICE_t) -#ifdef sun +#ifdef __sun #define NAMEDNODENAME "/tmp/.ICE-pipe/" #else #define PTSNODENAME "/dev/X/ICE." @@ -303,7 +303,7 @@ static void _dummy(int sig _X_UNUSED) #endif #endif #if defined(TEST_t) -#ifdef sun +#ifdef __sun #define NAMEDNODENAME "/tmp/.Test-unix/test" #endif #define PTSNODENAME "/dev/X/transtest." @@ -678,7 +678,7 @@ TRANS(NAMEDOpenClient)(XtransConnInfo ciptr, const char *port) int fd; char server_path[64]; struct stat filestat; -# ifndef sun +# ifndef __sun extern int isastream(int); # endif #endif @@ -1610,7 +1610,7 @@ static LOCALtrans2dev LOCALtrans2devtab[] = { #endif /* TRANS_SERVER */ }, -#ifdef sun /* Alias "pipe" to named, since that's what Solaris called it */ +#ifdef __sun /* Alias "pipe" to named, since that's what Solaris called it */ {"pipe", #ifdef TRANS_CLIENT TRANS(NAMEDOpenClient), @@ -1633,7 +1633,7 @@ static LOCALtrans2dev LOCALtrans2devtab[] = { TRANS(NAMEDAccept) #endif /* TRANS_SERVER */ }, -#endif /* sun */ +#endif /* __sun */ #endif /* LOCAL_TRANS_NAMED */ @@ -1673,7 +1673,7 @@ static char *freeXLOCAL=NULL; #define DEF_XLOCAL "SCO:UNIX:PTS" #elif defined(__UNIXWARE__) #define DEF_XLOCAL "UNIX:PTS:NAMED:SCO" -#elif defined(sun) +#elif defined(__sun) #define DEF_XLOCAL "UNIX:NAMED" #else #define DEF_XLOCAL "UNIX:PTS:NAMED:SCO" @@ -2345,7 +2345,7 @@ static const char * local_aliases[] = { "pts", # endif "named", -# ifdef sun +# ifdef __sun "pipe", /* compatibility with Solaris Xlib */ # endif # ifdef LOCAL_TRANS_SCO @@ -2492,7 +2492,7 @@ Xtransport TRANS(NAMEDFuncs) = { TRANS(LocalCloseForCloning), }; -#ifdef sun +#ifdef __sun Xtransport TRANS(PIPEFuncs) = { /* Local Interface */ "pipe", @@ -2536,7 +2536,7 @@ Xtransport TRANS(PIPEFuncs) = { TRANS(LocalClose), TRANS(LocalCloseForCloning), }; -#endif /* sun */ +#endif /* __sun */ #endif /* LOCAL_TRANS_NAMED */ diff --git a/Xtranssock.c b/Xtranssock.c index 2c4f9f3..094f15c 100644 --- a/Xtranssock.c +++ b/Xtranssock.c @@ -112,14 +112,6 @@ from the copyright holders. #include <sys/filio.h> #endif -#if (defined(__i386__) && defined(SYSV)) && !defined(SCO325) && !defined(sun) -#include <net/errno.h> -#endif - -#if defined(__i386__) && defined(SYSV) -#include <sys/stropts.h> -#endif - #include <unistd.h> #else /* !WIN32 */ @@ -2113,11 +2105,7 @@ TRANS(SocketBytesReadable) (XtransConnInfo ciptr, BytesReadable_t *pend) return ret; } #else -#if defined(__i386__) && defined(SYSV) && !defined(SCO325) - return ioctl (ciptr->fd, I_NREAD, (char *) pend); -#else return ioctl (ciptr->fd, FIONREAD, (char *) pend); -#endif /* __i386__ && SYSV || _SEQUENT_ && _SOCKET_VERSION == 1 */ #endif /* WIN32 */ } |