aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/xtrans/Xtranssock.c
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremy@tifa.local>2008-02-10 19:04:40 -0800
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-11-02 19:46:36 +0100
commitf686bc3ebed90b7fb8bbbf8cce3d894971e42ca5 (patch)
tree941929eff16ad18fe7c0a6f8c1a4463649f86976 /nx-X11/lib/xtrans/Xtranssock.c
parent64d51869fcc6ae4dd4c8d3e1d924fa2e4ccc75af (diff)
downloadnx-libs-f686bc3ebed90b7fb8bbbf8cce3d894971e42ca5.tar.gz
nx-libs-f686bc3ebed90b7fb8bbbf8cce3d894971e42ca5.tar.bz2
nx-libs-f686bc3ebed90b7fb8bbbf8cce3d894971e42ca5.zip
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. """ Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib/xtrans/Xtranssock.c')
-rw-r--r--nx-X11/lib/xtrans/Xtranssock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nx-X11/lib/xtrans/Xtranssock.c b/nx-X11/lib/xtrans/Xtranssock.c
index f87b40a87..a7d8b499a 100644
--- a/nx-X11/lib/xtrans/Xtranssock.c
+++ b/nx-X11/lib/xtrans/Xtranssock.c
@@ -133,11 +133,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
@@ -2812,11 +2812,11 @@ 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
return ioctl (ciptr->fd, FIONREAD, (char *) pend);
-#endif /* i386 && SYSV || _SEQUENT_ && _SOCKET_VERSION == 1 */
+#endif /* __i386__ && SYSV || _SEQUENT_ && _SOCKET_VERSION == 1 */
#endif /* WIN32 */
}