diff options
author | Jeremy Huddleston <jeremy@tifa.local> | 2008-02-10 19:07:49 -0800 |
---|---|---|
committer | Jeremy Huddleston <jeremy@tifa.local> | 2008-02-10 19:07:49 -0800 |
commit | e4ad7a8080e4ac0b868fa7cf39bc5ad9a6e0bee1 (patch) | |
tree | 341863a5ab877c33fbe40c3cdb44338d34f380ac | |
parent | e49280c1c33622dbf288b0ac4f8324b01ff9b4aa (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.h | 2 | ||||
-rw-r--r-- | Xos_r.h | 2 | ||||
-rw-r--r-- | Xosdefs.h | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -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 @@ -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 */ @@ -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) |