Subject: Weird ifdefs
To: None <tech-x11@netbsd.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: tech-x11
Date: 08/23/2002 20:58:40
I'm trying to compile XFree86 (from xsrc) on sparc. Ifdefs in xfree
are really "special", but this one strikes me as most nonsential:
xsrc/xfree/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_video.c
Bool
xf86DisableInterrupts()
{
#if !defined(__mips__) && !defined(__arm32__) && !defined(__alpha__) && \
!defined(__powerpc__) && !defined(__arm__) && !defined(__sparc__)
#ifdef __GNUC__
__asm__ __volatile__("cli");
#else
asm("cli");
#endif /* __GNUC__ */
#endif /* __mips__ */
return(TRUE);
}
[where, the case for __sparc__ was added by me.]
Now does any one has any idea why an i386 asm statement is protected
with such a (literally) perverse conditional? Isn't defined(__i386__)
test enough? Unfortunately I cannot easily test compile on i386 at
the moment to verify that but see no reasons why it wouldn't.
SY, Uwe
--
uwe@ptc.spbu.ru | Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen