diff options
author | Jeremy Huddleston <jeremy@tifa.local> | 2008-02-10 19:04:40 -0800 |
---|---|---|
committer | Jeremy Huddleston <jeremy@tifa.local> | 2008-02-10 19:04:40 -0800 |
commit | c8ed67f16f71042ef134a4d2189c20dd200a0648 (patch) | |
tree | 1bb827388804b5e86a3aecc52920eef0a3bc4494 /Xtranssock.c | |
parent | 9970b5b6f8237685267b7972282319cf266661ea (diff) |
Fixed #ifdef checks that were using i386 to use __i386__
"""
It's simply obsolete, sloppy, compiler namespace pollution. The
compiler is not allowed to predefine symbols that might conflict with
ordinary identifiers. For backwards compatibility gcc currently
predefines i386 when compiling for x86 32-bit (but not 64-bit), but that
will go away. It is also not defined if you specify -ansi when invoking
the compiler, because then it is seriously standards compliant. Other
compilers shouldn't define it either. Correct code shouldn't rely on it
being defined. However __i386__ is safe and proper.
"""
Diffstat (limited to 'Xtranssock.c')
-rw-r--r-- | Xtranssock.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Xtranssock.c b/Xtranssock.c index b7a601b..646d634 100644 --- a/Xtranssock.c +++ b/Xtranssock.c @@ -98,11 +98,11 @@ from the copyright holders. #include <sys/filio.h> #endif -#if (defined(i386) && defined(SYSV)) && !defined(SCO325) && !defined(sun) +#if (defined(__i386__) && defined(SYSV)) && !defined(SCO325) && !defined(sun) #include <net/errno.h> #endif -#if (defined(i386) && defined(SYSV)) && (!defined(ISC) || !defined(I_NREAD) || defined(SCO325)) || defined(_SEQUENT_) +#if (defined(__i386__) && defined(SYSV)) && (!defined(ISC) || !defined(I_NREAD) || defined(SCO325)) || defined(_SEQUENT_) #include <sys/stropts.h> #endif @@ -2166,7 +2166,7 @@ TRANS(SocketBytesReadable) (XtransConnInfo ciptr, BytesReadable_t *pend) return ret; } #else -#if (defined(i386) && defined(SYSV) && !defined(SCO325)) || (defined(_SEQUENT_) && _SOCKET_VERSION == 1) +#if (defined(__i386__) && defined(SYSV) && !defined(SCO325)) || (defined(_SEQUENT_) && _SOCKET_VERSION == 1) return ioctl (ciptr->fd, I_NREAD, (char *) pend); #else #if defined(__UNIXOS2__) @@ -2174,7 +2174,7 @@ TRANS(SocketBytesReadable) (XtransConnInfo ciptr, BytesReadable_t *pend) #else return ioctl (ciptr->fd, FIONREAD, (char *) pend); #endif /* __UNIXOS2__ */ -#endif /* i386 && SYSV || _SEQUENT_ && _SOCKET_VERSION == 1 */ +#endif /* __i386__ && SYSV || _SEQUENT_ && _SOCKET_VERSION == 1 */ #endif /* WIN32 */ } |