summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremy@tifa.local>2008-02-10 19:07:49 -0800
committerJeremy Huddleston <jeremy@tifa.local>2008-02-10 19:07:49 -0800
commite4ad7a8080e4ac0b868fa7cf39bc5ad9a6e0bee1 (patch)
tree341863a5ab877c33fbe40c3cdb44338d34f380ac
parente49280c1c33622dbf288b0ac4f8324b01ff9b4aa (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. """
-rw-r--r--Xos.h2
-rw-r--r--Xos_r.h2
-rw-r--r--Xosdefs.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/Xos.h b/Xos.h
index b6b93a5..67bf679 100644
--- a/Xos.h
+++ b/Xos.h
@@ -149,7 +149,7 @@ extern int sys_nerr;
*/
#if defined(X_NOT_POSIX)
#include <fcntl.h>
-#if defined(USL) || defined(CRAY) || defined(MOTOROLA) || (defined(i386) && (defined(SYSV) || defined(SVR4))) || defined(__sxg__)
+#if defined(USL) || defined(CRAY) || defined(MOTOROLA) || (defined(__i386__) && (defined(SYSV) || defined(SVR4))) || defined(__sxg__)
#include <unistd.h>
#endif
#ifdef WIN32
diff --git a/Xos_r.h b/Xos_r.h
index f52bde7..7ce72ac 100644
--- a/Xos_r.h
+++ b/Xos_r.h
@@ -237,7 +237,7 @@ extern void XtProcessUnlock(
#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)
/* Use regular, unsafe API. */
-# if defined(X_NOT_POSIX) && !defined(i386) && !defined(SYSV)
+# if defined(X_NOT_POSIX) && !defined(__i386__) && !defined(SYSV)
extern struct passwd *getpwuid(), *getpwnam();
# endif
typedef int _Xgetpwparams; /* dummy */
diff --git a/Xosdefs.h b/Xosdefs.h
index be90d5e..14971c4 100644
--- a/Xosdefs.h
+++ b/Xosdefs.h
@@ -86,7 +86,7 @@ in this Software without prior written authorization from The Open Group.
#endif
#endif
-#ifdef i386
+#ifdef __i386__
#ifdef SYSV
#if !defined(ISC) && !defined(__SCO__) && !defined(_SEQUENT_) && \
!defined(__UNIXWARE__) && !defined(sun)