mass change from #ifdef i386 to #ifdef __i386__ to conform to ANSI

This commit is contained in:
Ben Byer 2007-10-14 18:07:03 -07:00
parent ec0fc012e9
commit 3d4eb17b38
19 changed files with 44 additions and 50 deletions

View File

@ -77,7 +77,7 @@ extern DeviceAssocRec mouse_assoc;
#include "picture.h" #include "picture.h"
#endif #endif
#if (defined(i386) || defined(__i386__)) && \ #if (defined(__i386__)) && \
(defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
defined(__NetBSD__) || defined(linux) || \ defined(__NetBSD__) || defined(linux) || \
(defined(SVR4) && !defined(sun)) || defined(__GNU__)) (defined(SVR4) && !defined(sun)) || defined(__GNU__))
@ -877,7 +877,7 @@ static OptionInfoRec FlagOptions[] = {
{0}, FALSE }, {0}, FALSE },
}; };
#if defined(i386) || defined(__i386__) #ifdef __i386__
static Bool static Bool
detectPC98(void) detectPC98(void)
{ {
@ -1164,7 +1164,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
xf86Info.pixmap24 = Pix24DontCare; xf86Info.pixmap24 = Pix24DontCare;
xf86Info.pix24From = X_DEFAULT; xf86Info.pix24From = X_DEFAULT;
} }
#if defined(i386) || defined(__i386__) #ifdef __i386__
if (xf86GetOptValBool(FlagOptions, FLAG_PC98, &value)) { if (xf86GetOptValBool(FlagOptions, FLAG_PC98, &value)) {
xf86Info.pc98 = value; xf86Info.pc98 = value;
if (value) { if (value) {

View File

@ -317,7 +317,7 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
} }
break; break;
#if !defined(__SOL8__) && !defined(sgi) && \ #if !defined(__SOL8__) && !defined(sgi) && \
(!defined(sun) || defined(i386)) && defined(VT_ACTIVATE) (!defined(sun) || defined(__i386__)) && defined(VT_ACTIVATE)
case ACTION_SWITCHSCREEN: case ACTION_SWITCHSCREEN:
if (VTSwitchEnabled && !xf86Info.dontVTSwitch && arg) { if (VTSwitchEnabled && !xf86Info.dontVTSwitch && arg) {
int vtno = *((int *) arg); int vtno = *((int *) arg);
@ -340,7 +340,7 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
#else #else
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno + 1) < 0) if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno + 1) < 0)
#endif #endif
#if defined (__SCO__) || (defined(sun) && defined (i386) && defined (SVR4)) || defined(__UNIXWARE__) #if defined (__SCO__) || (defined(sun) && defined (__i386__) && defined (SVR4)) || defined(__UNIXWARE__)
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, 0) < 0) if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, 0) < 0)
#else #else
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, 1) < 0) if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, 1) < 0)

View File

@ -124,7 +124,7 @@ xf86InfoRec xf86Info = {
PCIOsConfig, /* pciFlags */ PCIOsConfig, /* pciFlags */
Pix24DontCare, /* pixmap24 */ Pix24DontCare, /* pixmap24 */
X_DEFAULT, /* pix24From */ X_DEFAULT, /* pix24From */
#if defined(i386) || defined(__i386__) #ifdef __i386__
FALSE, /* pc98 */ FALSE, /* pc98 */
#endif #endif
TRUE, /* pmFlag */ TRUE, /* pmFlag */

View File

@ -2341,7 +2341,7 @@ xf86GetAllowMouseOpenFail()
_X_EXPORT Bool _X_EXPORT Bool
xf86IsPc98() xf86IsPc98()
{ {
#if defined(i386) || defined(__i386__) #ifdef __i386__
return xf86Info.pc98; return xf86Info.pc98;
#else #else
return FALSE; return FALSE;

View File

@ -109,7 +109,7 @@ typedef struct {
PciProbeType pciFlags; PciProbeType pciFlags;
Pix24Flags pixmap24; Pix24Flags pixmap24;
MessageType pix24From; MessageType pix24From;
#if defined(i386) || defined(__i386__) #ifdef __i386__
Bool pc98; Bool pc98;
#endif #endif
Bool pmFlag; Bool pmFlag;

View File

@ -91,7 +91,7 @@
#define GNU_ASSEMBLER #define GNU_ASSEMBLER
#endif #endif
#if (defined(__STDC__) && !defined(UNIXCPP)) || (defined (sun) && defined (i386) && defined (SVR4) && defined (__STDC__) && !defined (__GNUC__)) #if (defined(__STDC__) && !defined(UNIXCPP)) || (defined (sun) && defined (__i386__) && defined (SVR4) && defined (__STDC__) && !defined (__GNUC__))
#define CONCAT(x, y) x ## y #define CONCAT(x, y) x ## y
#else #else
#define CONCAT(x, y) x/**/y #define CONCAT(x, y) x/**/y

View File

@ -210,7 +210,7 @@
# define ARCH_PCI_INIT ia64linuxPciInit # define ARCH_PCI_INIT ia64linuxPciInit
# endif # endif
# define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper # define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper
#elif defined(__i386__) || defined(i386) #elif defined(__i386__)
# if defined(linux) # if defined(linux)
# define ARCH_PCI_INIT linuxPciInit # define ARCH_PCI_INIT linuxPciInit
# else # else

View File

@ -26,7 +26,7 @@
#include <xorg-config.h> #include <xorg-config.h>
#endif #endif
#ifdef i386 #ifdef __i386__
#define _NEED_SYSI86 #define _NEED_SYSI86
#endif #endif
#include "xf86.h" #include "xf86.h"
@ -66,7 +66,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
Offset += Base & (psize - 1); Offset += Base & (psize - 1);
Base &= ~(psize - 1); Base &= ~(psize - 1);
mlen = (Offset + Len + psize - 1) & ~(psize - 1); mlen = (Offset + Len + psize - 1) & ~(psize - 1);
#if defined(i386) && !defined(__SOL8__) #if defined(__i386__) && !defined(__SOL8__)
if (Base >= 0xA0000 && Base + mlen < 0xFFFFF && xf86Info.vtno >= 0) if (Base >= 0xA0000 && Base + mlen < 0xFFFFF && xf86Info.vtno >= 0)
sprintf(solx86_vtname, "/dev/vt%02d", xf86Info.vtno); sprintf(solx86_vtname, "/dev/vt%02d", xf86Info.vtno);
else else

View File

@ -29,7 +29,7 @@
#include "xf86.h" #include "xf86.h"
#include "xf86Priv.h" #include "xf86Priv.h"
#include "xf86_OSlib.h" #include "xf86_OSlib.h"
#if defined(__i386) || defined(__x86) #if defined(__i386__) || defined(__x86)
# include <sys/kd.h> # include <sys/kd.h>
#endif #endif
@ -40,7 +40,7 @@ static int VTnum = -1;
static int xf86StartVT = -1; static int xf86StartVT = -1;
#endif #endif
#if defined(__SOL8__) || !defined(__i386) #if defined(__SOL8__) || !defined(__i386__)
static char fb_dev[PATH_MAX] = "/dev/fb"; static char fb_dev[PATH_MAX] = "/dev/fb";
#else #else
static char fb_dev[PATH_MAX] = "/dev/console"; static char fb_dev[PATH_MAX] = "/dev/console";
@ -209,11 +209,11 @@ xf86CloseConsole(void)
#ifdef HAS_USL_VTS #ifdef HAS_USL_VTS
struct vt_mode VT; struct vt_mode VT;
#endif #endif
#if defined(__SOL8__) || !defined(i386) #if defined(__SOL8__) || !defined(__i386__)
int tmp; int tmp;
#endif #endif
#if !defined(i386) && !defined(__x86) #if !defined(__i386__) && !defined(__x86)
if (!xf86DoProbe && !xf86DoConfigure) { if (!xf86DoProbe && !xf86DoConfigure) {
int fd; int fd;
@ -332,7 +332,7 @@ xf86ProcessArgument(int argc, char **argv, int i)
#endif /* HAS_USL_VTS */ #endif /* HAS_USL_VTS */
#if defined(__SOL8__) || !defined(i386) #if defined(__SOL8__) || !defined(__i386__)
if ((i + 1) < argc) { if ((i + 1) < argc) {
if (!strcmp(argv[i], "-dev")) { if (!strcmp(argv[i], "-dev")) {
@ -352,7 +352,7 @@ void xf86UseMsg()
#ifdef HAS_USL_VTS #ifdef HAS_USL_VTS
ErrorF("vtXX Use the specified VT number\n"); ErrorF("vtXX Use the specified VT number\n");
#endif #endif
#if defined(__SOL8__) || !defined(i386) #if defined(__SOL8__) || !defined(__i386__)
ErrorF("-dev <fb> Framebuffer device\n"); ErrorF("-dev <fb> Framebuffer device\n");
#endif #endif
ErrorF("-keeptty Don't detach controlling tty\n"); ErrorF("-keeptty Don't detach controlling tty\n");

View File

@ -28,7 +28,7 @@
#include <sys/types.h> /* get __x86 definition if not set by compiler */ #include <sys/types.h> /* get __x86 definition if not set by compiler */
#if defined(i386) || defined(__x86) #if defined(__i386__) || defined(__x86)
#define _NEED_SYSI86 #define _NEED_SYSI86
#endif #endif
#include "xf86.h" #include "xf86.h"
@ -108,7 +108,7 @@ xf86MapVidMem(int ScreenNum, int Flags, unsigned long Base, unsigned long Size)
* TSI - 2001.09 - SPARC changes * TSI - 2001.09 - SPARC changes
*/ */
#if defined(i386) && !defined(__SOL8__) #if defined(__i386__) && !defined(__SOL8__)
if(Base < 0xFFFFF) if(Base < 0xFFFFF)
sprintf(vtname, "/dev/vt%02d", xf86Info.vtno); sprintf(vtname, "/dev/vt%02d", xf86Info.vtno);
else else
@ -148,14 +148,14 @@ xf86UnMapVidMem(int ScreenNum, pointer Base, unsigned long Size)
/* I/O Permissions section */ /* I/O Permissions section */
/***************************************************************************/ /***************************************************************************/
#if defined(i386) || defined(__x86) #if defined(__i386__) || defined(__x86)
static Bool ExtendedEnabled = FALSE; static Bool ExtendedEnabled = FALSE;
#endif #endif
_X_EXPORT Bool _X_EXPORT Bool
xf86EnableIO(void) xf86EnableIO(void)
{ {
#if defined(i386) || defined(__x86) #if defined(__i386__) || defined(__x86)
if (ExtendedEnabled) if (ExtendedEnabled)
return TRUE; return TRUE;
@ -171,7 +171,7 @@ xf86EnableIO(void)
_X_EXPORT void _X_EXPORT void
xf86DisableIO(void) xf86DisableIO(void)
{ {
#if defined(i386) || defined(__x86) #if defined(__i386__) || defined(__x86)
if(!ExtendedEnabled) if(!ExtendedEnabled)
return; return;
@ -188,7 +188,7 @@ xf86DisableIO(void)
_X_EXPORT Bool xf86DisableInterrupts(void) _X_EXPORT Bool xf86DisableInterrupts(void)
{ {
#if defined(i386) || defined(__x86) #if defined(__i386__) || defined(__x86)
if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0)) if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0))
return FALSE; return FALSE;
@ -207,7 +207,7 @@ _X_EXPORT Bool xf86DisableInterrupts(void)
_X_EXPORT void xf86EnableInterrupts(void) _X_EXPORT void xf86EnableInterrupts(void)
{ {
#if defined(i386) || defined(__x86) #if defined(__i386__) || defined(__x86)
if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0)) if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0))
return; return;

View File

@ -234,7 +234,7 @@ unmapVidMem(int ScreenNum, pointer Base, unsigned long Size)
return; return;
} }
#if defined(SVR4) && defined(i386) && !defined(sun) #if defined(SVR4) && defined(__i386__) && !defined(sun)
/* /*
* For some SVR4 versions, a 32-bit read is done for the first location * For some SVR4 versions, a 32-bit read is done for the first location
* in each page when the page is first mapped. If this is done while * in each page when the page is first mapped. If this is done while
@ -270,7 +270,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
pVidMem->linearSupported = linearVidMem(); pVidMem->linearSupported = linearVidMem();
pVidMem->mapMem = mapVidMem; pVidMem->mapMem = mapVidMem;
pVidMem->unmapMem = unmapVidMem; pVidMem->unmapMem = unmapVidMem;
#if defined(SVR4) && defined(i386) && !defined(sun) #if defined(SVR4) && defined(__i386__) && !defined(sun)
pVidMem->readSideEffects = readSideEffects; pVidMem->readSideEffects = readSideEffects;
#endif #endif
pVidMem->initialised = TRUE; pVidMem->initialised = TRUE;

View File

@ -100,7 +100,7 @@ typedef signed long xf86ssize_t;
/**************************************************************************/ /**************************************************************************/
#if (defined(SYSV) || defined(SVR4)) && \ #if (defined(SYSV) || defined(SVR4)) && \
!defined(DGUX) && !defined(sgi) && \ !defined(DGUX) && !defined(sgi) && \
(defined(sun) || defined(i386)) (defined(sun) || defined(__i386__))
# ifdef SCO325 # ifdef SCO325
# ifndef _SVID3 # ifndef _SVID3
# define _SVID3 # define _SVID3
@ -140,7 +140,7 @@ typedef signed long xf86ssize_t;
# endif /* SVR4 && !sun */ # endif /* SVR4 && !sun */
/* V86SC_IOPL was moved to <sys/sysi86.h> on Solaris 7 and later */ /* V86SC_IOPL was moved to <sys/sysi86.h> on Solaris 7 and later */
# if defined(sun) && defined (SVR4) /* Solaris? */ # if defined(sun) && defined (SVR4) /* Solaris? */
# if defined(i386) || defined(__x86) /* on x86 or x64? */ # if defined(__i386__) || defined(__x86) /* on x86 or x64? */
# if !defined(V86SC_IOPL) /* Solaris 7 or later? */ # if !defined(V86SC_IOPL) /* Solaris 7 or later? */
# include <sys/v86.h> /* Nope */ # include <sys/v86.h> /* Nope */
# endif # endif
@ -148,7 +148,7 @@ typedef signed long xf86ssize_t;
# else # else
# include <sys/v86.h> /* Not solaris */ # include <sys/v86.h> /* Not solaris */
# endif /* sun && i386 && SVR4 */ # endif /* sun && i386 && SVR4 */
# if defined(sun) && (defined (i386) || defined(__x86)) && defined (SVR4) # if defined(sun) && (defined (__i386__) || defined(__x86)) && defined (SVR4)
# include <sys/psw.h> # include <sys/psw.h>
# endif # endif
# endif /* _NEED_SYSI86 */ # endif /* _NEED_SYSI86 */
@ -224,15 +224,11 @@ typedef signed long xf86ssize_t;
# define POSIX_TTY # define POSIX_TTY
# endif # endif
# if defined(sun) && defined (i386) && defined (SVR4) && !defined(__SOL8__) # if defined(sun) && defined (__i386__) && defined (SVR4) && !defined(__SOL8__)
# define USE_VT_SYSREQ # define USE_VT_SYSREQ
# define VT_SYSREQ_DEFAULT TRUE # define VT_SYSREQ_DEFAULT TRUE
# endif # endif
# if defined(ATT) && !defined(i386)
# define i386 /* not defined in ANSI C mode */
# endif /* ATT && !i386 */
# ifdef SYSV # ifdef SYSV
# if !defined(ISC) || defined(ISC202) || defined(ISC22) # if !defined(ISC) || defined(ISC202) || defined(ISC22)
# define NEED_STRERROR # define NEED_STRERROR

View File

@ -631,7 +631,7 @@ mouse_configuration(void) {
config_emulate3buttons = 0; config_emulate3buttons = 0;
printf("\n"); printf("\n");
#if (defined(sun) && (defined(__i386) || defined(__x86))) #if (defined(sun) && (defined(__i386__) || defined(__x86)))
/* SPARC & USB mice (VUID or AUTO protocols) default to /dev/mouse, /* SPARC & USB mice (VUID or AUTO protocols) default to /dev/mouse,
but PS/2 mice default to /dev/kdmouse */ but PS/2 mice default to /dev/kdmouse */
if ((config_mousetype != M_AUTO) && (config_mousetype != M_VUID)) { if ((config_mousetype != M_AUTO) && (config_mousetype != M_VUID)) {

View File

@ -54,7 +54,7 @@ static void fastFill
{ {
int stop_count = bytewidth ; int stop_count = bytewidth ;
register int row_jump = bytes_per_line - bytewidth ; register int row_jump = bytes_per_line - bytewidth ;
#if !defined(OLDHC) && defined(BSDrt) && !defined(i386) #if !defined(OLDHC) && defined(BSDrt) && !defined(__i386__)
register const unsigned int notZero = ((unsigned char)(~0x0)); register const unsigned int notZero = ((unsigned char)(~0x0));
#else #else
#define notZero ((unsigned char)(~0)) #define notZero ((unsigned char)(~0))
@ -112,7 +112,7 @@ static void fastFillRMW
{ {
int stop_count = bytewidth ; int stop_count = bytewidth ;
register int row_jump = bytes_per_line - bytewidth ; register int row_jump = bytes_per_line - bytewidth ;
#if !defined(OLDHC) && defined(BSDrt) && !defined(i386) #if !defined(OLDHC) && defined(BSDrt) && !defined(__i386__)
register const unsigned int notZero = ((unsigned char)(~0x0)); register const unsigned int notZero = ((unsigned char)(~0x0));
#endif #endif
register int tmp ; register int tmp ;
@ -369,7 +369,7 @@ register unsigned int height ; /* MUST BE > 0 !! */
{ {
int stop_count = wordwidth ; int stop_count = wordwidth ;
register int row_jump = bytes_per_line - wordwidth*2 ; register int row_jump = bytes_per_line - wordwidth*2 ;
#if !defined(OLDHC) && defined(BSDrt) && !defined(i386) && 0 #if !defined(OLDHC) && defined(BSDrt) && !defined(__i386__) && 0
register const int notZero = ~0x0 ; register const int notZero = ~0x0 ;
#else #else
#define notZero ( ~0 ) #define notZero ( ~0 )

View File

@ -260,7 +260,7 @@ SOFTWARE.
#if defined(ibm032) || defined (ibm) #if defined(ibm032) || defined (ibm)
#ifdef i386 #ifdef __i386__
# define IMAGE_BYTE_ORDER LSBFirst /* Value for PS/2 only */ # define IMAGE_BYTE_ORDER LSBFirst /* Value for PS/2 only */
#else #else
# define IMAGE_BYTE_ORDER MSBFirst /* Values for the RT only*/ # define IMAGE_BYTE_ORDER MSBFirst /* Values for the RT only*/
@ -270,7 +270,7 @@ SOFTWARE.
#define GETLEFTBITS_ALIGNMENT 4 #define GETLEFTBITS_ALIGNMENT 4
/* ibm pcc doesn't understand pragmas. */ /* ibm pcc doesn't understand pragmas. */
#ifdef i386 #ifdef __i386__
#define BITMAP_SCANLINE_UNIT 8 #define BITMAP_SCANLINE_UNIT 8
#endif #endif
@ -444,10 +444,9 @@ SOFTWARE.
#endif /* luna */ #endif /* luna */
#if (defined(SVR4) && defined(i386)) || \ #if (defined(SVR4) && defined(__i386__)) || \
defined(__alpha__) || defined(__alpha) || \ defined(__alpha__) || defined(__alpha) || \
defined(__i386__) || defined(__i386) || \ defined(__i386__) || defined(__QNX__) || \
defined(__QNX__) || \
defined(__s390x__) || defined(__s390__) defined(__s390x__) || defined(__s390__)
#ifndef IMAGE_BYTE_ORDER #ifndef IMAGE_BYTE_ORDER

View File

@ -46,8 +46,7 @@
#if defined(mips) || defined(sgi) || \ #if defined(mips) || defined(sgi) || \
defined(sparc) || defined(__sparc64__) || \ defined(sparc) || defined(__sparc64__) || \
defined(__alpha) || defined(__alpha__) || \ defined(__alpha) || defined(__alpha__) || \
defined(__i386__) || defined(i386) || \ defined(__i386__) || defined(__ia64__) || \
defined(__ia64__) || defined(ia64) || \
defined(__s390x__) || defined(__s390__) || \ defined(__s390x__) || defined(__s390__) || \
defined(__amd64__) || defined(amd64) || defined(__amd64) defined(__amd64__) || defined(amd64) || defined(__amd64)
#define GetHighWord(x) (((int) (x)) >> 16) #define GetHighWord(x) (((int) (x)) >> 16)

View File

@ -119,10 +119,10 @@ SOFTWARE.
# include <net/if.h> # include <net/if.h>
# endif # endif
#else #else
#if defined(SVR4) || (defined(SYSV) && defined(i386)) || defined(__GNU__) #if defined(SVR4) || (defined(SYSV) && defined(__i386__)) || defined(__GNU__)
# include <sys/utsname.h> # include <sys/utsname.h>
#endif #endif
#if defined(SYSV) && defined(i386) #if defined(SYSV) && defined(__i386__)
# include <sys/stream.h> # include <sys/stream.h>
# ifdef ISC # ifdef ISC
# include <sys/stropts.h> # include <sys/stropts.h>

View File

@ -356,7 +356,7 @@ ReadRequestFromClient(ClientPtr client)
{ {
if ((result < 0) && ETEST(errno)) if ((result < 0) && ETEST(errno))
{ {
#if defined(SVR4) && defined(i386) && !defined(sun) #if defined(SVR4) && defined(__i386__) && !defined(sun)
if (0) if (0)
#endif #endif
{ {

View File

@ -211,7 +211,7 @@ extern Bool Must_have_memory;
fclose(f); \ fclose(f); \
} \ } \
} }
#if defined(linux) && defined(i386) #if defined(linux) && defined(__i386__)
#define LOG_ALLOC(_fun, _size, _ret) \ #define LOG_ALLOC(_fun, _size, _ret) \
{ unsigned long *from; \ { unsigned long *from; \
__asm__("movl %%ebp,%0" : /*OUT*/ "=r" (from) : /*IN*/ ); \ __asm__("movl %%ebp,%0" : /*OUT*/ "=r" (from) : /*IN*/ ); \