libxtrans: Fixed #ifdef checks that were using i386 to use __i386__

Alan Coopersmith Alan.Coopersmith at Sun.COM
Mon Feb 11 17:57:31 PST 2008


This change makes no sense to me - the only places you changed in libxtrans
were checks for ancient platforms that are probably using their own compiler,
not gcc - checks such as:

-#if (defined(i386) && defined(SYSV)) && !defined(SCO325) && !defined(sun)
+#if (defined(__i386__) && defined(SYSV)) && !defined(SCO325) && !defined(sun)

If it's System V on i386, but not SCO nor Solaris, there's little chance
modern X builds on it anyway, but then it would seem better to junk the
code rather than leaving it around in a state no one can get it to build.

	-Alan Coopersmith-           alan.coopersmith at sun.com
	 Sun Microsystems, Inc. - X Window System Engineering

Jeremy Huddleston wrote:
>  Xtrans.c     |    8 ++++----
>  Xtransint.h  |    6 +++---
>  Xtranssock.c |    8 ++++----
>  3 files changed, 11 insertions(+), 11 deletions(-)
> 
> New commits:
> commit c8ed67f16f71042ef134a4d2189c20dd200a0648
> Author: Jeremy Huddleston <jeremy at tifa.local>
> Date:   Sun Feb 10 19:04:40 2008 -0800
> 
>     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.
>     
>     """
> 
> _______________________________________________
> xorg-commit mailing list
> xorg-commit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg-commit




More information about the xorg mailing list