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

Jeremy Huddleston jeremyhu at freedesktop.org
Mon Feb 11 18:08:21 PST 2008


Yeah... it was just a bit of an eye-sore to me seeing that ifdef.  I  
was letting it go, but then someone else mentioned it to me as well,  
so I decided to make the switch.

On Feb 11, 2008, at 17:57, Alan Coopersmith wrote:

> 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
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3040 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20080211/043c1856/attachment.bin>


More information about the xorg mailing list