diff options
author | Ben Byer <bbyer@bbyer.local> | 2007-10-14 18:07:03 -0700 |
---|---|---|
committer | Ben Byer <bbyer@bbyer.local> | 2007-10-14 18:07:03 -0700 |
commit | 3d4eb17b38dcb1468493f3686dc5ea3623ef9a73 (patch) | |
tree | 8513b52c480f7e2fd8821d959a097c95ec67676c /hw/xfree86 | |
parent | ec0fc012e91e703bb399a380df2912f71957a220 (diff) |
mass change from #ifdef i386 to #ifdef __i386__ to conform to ANSI
Diffstat (limited to 'hw/xfree86')
-rw-r--r-- | hw/xfree86/common/xf86Config.c | 6 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Events.c | 4 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Globals.c | 2 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Helper.c | 2 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Privstr.h | 2 | ||||
-rw-r--r-- | hw/xfree86/os-support/assyntax.h | 2 | ||||
-rw-r--r-- | hw/xfree86/os-support/bus/Pci.h | 2 | ||||
-rw-r--r-- | hw/xfree86/os-support/solaris/sun_bios.c | 4 | ||||
-rw-r--r-- | hw/xfree86/os-support/solaris/sun_init.c | 12 | ||||
-rw-r--r-- | hw/xfree86/os-support/solaris/sun_vid.c | 14 | ||||
-rw-r--r-- | hw/xfree86/os-support/sysv/sysv_video.c | 4 | ||||
-rw-r--r-- | hw/xfree86/os-support/xf86_OSlib.h | 12 | ||||
-rw-r--r-- | hw/xfree86/utils/xorgconfig/xorgconfig.c | 2 | ||||
-rw-r--r-- | hw/xfree86/xf4bpp/vgaSolid.c | 6 |
14 files changed, 35 insertions, 39 deletions
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 9c54bf473..96fadc9dd 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -77,7 +77,7 @@ extern DeviceAssocRec mouse_assoc; #include "picture.h" #endif -#if (defined(i386) || defined(__i386__)) && \ +#if (defined(__i386__)) && \ (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ defined(__NetBSD__) || defined(linux) || \ (defined(SVR4) && !defined(sun)) || defined(__GNU__)) @@ -877,7 +877,7 @@ static OptionInfoRec FlagOptions[] = { {0}, FALSE }, }; -#if defined(i386) || defined(__i386__) +#ifdef __i386__ static Bool detectPC98(void) { @@ -1164,7 +1164,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) xf86Info.pixmap24 = Pix24DontCare; xf86Info.pix24From = X_DEFAULT; } -#if defined(i386) || defined(__i386__) +#ifdef __i386__ if (xf86GetOptValBool(FlagOptions, FLAG_PC98, &value)) { xf86Info.pc98 = value; if (value) { diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 91964c950..785815c6a 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -317,7 +317,7 @@ xf86ProcessActionEvent(ActionEvent action, void *arg) } break; #if !defined(__SOL8__) && !defined(sgi) && \ - (!defined(sun) || defined(i386)) && defined(VT_ACTIVATE) + (!defined(sun) || defined(__i386__)) && defined(VT_ACTIVATE) case ACTION_SWITCHSCREEN: if (VTSwitchEnabled && !xf86Info.dontVTSwitch && arg) { int vtno = *((int *) arg); @@ -340,7 +340,7 @@ xf86ProcessActionEvent(ActionEvent action, void *arg) #else if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno + 1) < 0) #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) #else if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, 1) < 0) diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c index 7dc45b75d..b3969b102 100644 --- a/hw/xfree86/common/xf86Globals.c +++ b/hw/xfree86/common/xf86Globals.c @@ -124,7 +124,7 @@ xf86InfoRec xf86Info = { PCIOsConfig, /* pciFlags */ Pix24DontCare, /* pixmap24 */ X_DEFAULT, /* pix24From */ -#if defined(i386) || defined(__i386__) +#ifdef __i386__ FALSE, /* pc98 */ #endif TRUE, /* pmFlag */ diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index b6fc6b629..1ef79730c 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -2341,7 +2341,7 @@ xf86GetAllowMouseOpenFail() _X_EXPORT Bool xf86IsPc98() { -#if defined(i386) || defined(__i386__) +#ifdef __i386__ return xf86Info.pc98; #else return FALSE; diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h index 09ebb0717..75d497471 100644 --- a/hw/xfree86/common/xf86Privstr.h +++ b/hw/xfree86/common/xf86Privstr.h @@ -109,7 +109,7 @@ typedef struct { PciProbeType pciFlags; Pix24Flags pixmap24; MessageType pix24From; -#if defined(i386) || defined(__i386__) +#ifdef __i386__ Bool pc98; #endif Bool pmFlag; diff --git a/hw/xfree86/os-support/assyntax.h b/hw/xfree86/os-support/assyntax.h index 718312cf0..d3e96e5fd 100644 --- a/hw/xfree86/os-support/assyntax.h +++ b/hw/xfree86/os-support/assyntax.h @@ -91,7 +91,7 @@ #define GNU_ASSEMBLER #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 #else #define CONCAT(x, y) x/**/y diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h index bb93260d1..6bd0eb7fc 100644 --- a/hw/xfree86/os-support/bus/Pci.h +++ b/hw/xfree86/os-support/bus/Pci.h @@ -210,7 +210,7 @@ # define ARCH_PCI_INIT ia64linuxPciInit # endif # define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper -#elif defined(__i386__) || defined(i386) +#elif defined(__i386__) # if defined(linux) # define ARCH_PCI_INIT linuxPciInit # else diff --git a/hw/xfree86/os-support/solaris/sun_bios.c b/hw/xfree86/os-support/solaris/sun_bios.c index 6a132f5a3..1223dcd68 100644 --- a/hw/xfree86/os-support/solaris/sun_bios.c +++ b/hw/xfree86/os-support/solaris/sun_bios.c @@ -26,7 +26,7 @@ #include <xorg-config.h> #endif -#ifdef i386 +#ifdef __i386__ #define _NEED_SYSI86 #endif #include "xf86.h" @@ -66,7 +66,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, Offset += Base & (psize - 1); Base &= ~(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) sprintf(solx86_vtname, "/dev/vt%02d", xf86Info.vtno); else diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c index 08d35c59c..c7fac524f 100644 --- a/hw/xfree86/os-support/solaris/sun_init.c +++ b/hw/xfree86/os-support/solaris/sun_init.c @@ -29,7 +29,7 @@ #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" -#if defined(__i386) || defined(__x86) +#if defined(__i386__) || defined(__x86) # include <sys/kd.h> #endif @@ -40,7 +40,7 @@ static int VTnum = -1; static int xf86StartVT = -1; #endif -#if defined(__SOL8__) || !defined(__i386) +#if defined(__SOL8__) || !defined(__i386__) static char fb_dev[PATH_MAX] = "/dev/fb"; #else static char fb_dev[PATH_MAX] = "/dev/console"; @@ -209,11 +209,11 @@ xf86CloseConsole(void) #ifdef HAS_USL_VTS struct vt_mode VT; #endif -#if defined(__SOL8__) || !defined(i386) +#if defined(__SOL8__) || !defined(__i386__) int tmp; #endif -#if !defined(i386) && !defined(__x86) +#if !defined(__i386__) && !defined(__x86) if (!xf86DoProbe && !xf86DoConfigure) { int fd; @@ -332,7 +332,7 @@ xf86ProcessArgument(int argc, char **argv, int i) #endif /* HAS_USL_VTS */ -#if defined(__SOL8__) || !defined(i386) +#if defined(__SOL8__) || !defined(__i386__) if ((i + 1) < argc) { if (!strcmp(argv[i], "-dev")) { @@ -352,7 +352,7 @@ void xf86UseMsg() #ifdef HAS_USL_VTS ErrorF("vtXX Use the specified VT number\n"); #endif -#if defined(__SOL8__) || !defined(i386) +#if defined(__SOL8__) || !defined(__i386__) ErrorF("-dev <fb> Framebuffer device\n"); #endif ErrorF("-keeptty Don't detach controlling tty\n"); diff --git a/hw/xfree86/os-support/solaris/sun_vid.c b/hw/xfree86/os-support/solaris/sun_vid.c index 4f2ab871f..494b2cfbf 100644 --- a/hw/xfree86/os-support/solaris/sun_vid.c +++ b/hw/xfree86/os-support/solaris/sun_vid.c @@ -28,7 +28,7 @@ #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 #endif #include "xf86.h" @@ -108,7 +108,7 @@ xf86MapVidMem(int ScreenNum, int Flags, unsigned long Base, unsigned long Size) * TSI - 2001.09 - SPARC changes */ -#if defined(i386) && !defined(__SOL8__) +#if defined(__i386__) && !defined(__SOL8__) if(Base < 0xFFFFF) sprintf(vtname, "/dev/vt%02d", xf86Info.vtno); else @@ -148,14 +148,14 @@ xf86UnMapVidMem(int ScreenNum, pointer Base, unsigned long Size) /* I/O Permissions section */ /***************************************************************************/ -#if defined(i386) || defined(__x86) +#if defined(__i386__) || defined(__x86) static Bool ExtendedEnabled = FALSE; #endif _X_EXPORT Bool xf86EnableIO(void) { -#if defined(i386) || defined(__x86) +#if defined(__i386__) || defined(__x86) if (ExtendedEnabled) return TRUE; @@ -171,7 +171,7 @@ xf86EnableIO(void) _X_EXPORT void xf86DisableIO(void) { -#if defined(i386) || defined(__x86) +#if defined(__i386__) || defined(__x86) if(!ExtendedEnabled) return; @@ -188,7 +188,7 @@ xf86DisableIO(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)) return FALSE; @@ -207,7 +207,7 @@ _X_EXPORT Bool xf86DisableInterrupts(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)) return; diff --git a/hw/xfree86/os-support/sysv/sysv_video.c b/hw/xfree86/os-support/sysv/sysv_video.c index 5811947bd..9972bcaa4 100644 --- a/hw/xfree86/os-support/sysv/sysv_video.c +++ b/hw/xfree86/os-support/sysv/sysv_video.c @@ -234,7 +234,7 @@ unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) 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 * 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->mapMem = mapVidMem; pVidMem->unmapMem = unmapVidMem; -#if defined(SVR4) && defined(i386) && !defined(sun) +#if defined(SVR4) && defined(__i386__) && !defined(sun) pVidMem->readSideEffects = readSideEffects; #endif pVidMem->initialised = TRUE; diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h index fcc79be38..662dbaace 100644 --- a/hw/xfree86/os-support/xf86_OSlib.h +++ b/hw/xfree86/os-support/xf86_OSlib.h @@ -100,7 +100,7 @@ typedef signed long xf86ssize_t; /**************************************************************************/ #if (defined(SYSV) || defined(SVR4)) && \ !defined(DGUX) && !defined(sgi) && \ - (defined(sun) || defined(i386)) + (defined(sun) || defined(__i386__)) # ifdef SCO325 # ifndef _SVID3 # define _SVID3 @@ -140,7 +140,7 @@ typedef signed long xf86ssize_t; # endif /* SVR4 && !sun */ /* V86SC_IOPL was moved to <sys/sysi86.h> on Solaris 7 and later */ # 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? */ # include <sys/v86.h> /* Nope */ # endif @@ -148,7 +148,7 @@ typedef signed long xf86ssize_t; # else # include <sys/v86.h> /* Not solaris */ # 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> # endif # endif /* _NEED_SYSI86 */ @@ -224,15 +224,11 @@ typedef signed long xf86ssize_t; # define POSIX_TTY # endif -# if defined(sun) && defined (i386) && defined (SVR4) && !defined(__SOL8__) +# if defined(sun) && defined (__i386__) && defined (SVR4) && !defined(__SOL8__) # define USE_VT_SYSREQ # define VT_SYSREQ_DEFAULT TRUE # endif -# if defined(ATT) && !defined(i386) -# define i386 /* not defined in ANSI C mode */ -# endif /* ATT && !i386 */ - # ifdef SYSV # if !defined(ISC) || defined(ISC202) || defined(ISC22) # define NEED_STRERROR diff --git a/hw/xfree86/utils/xorgconfig/xorgconfig.c b/hw/xfree86/utils/xorgconfig/xorgconfig.c index 8d9c03f5d..f50b4e225 100644 --- a/hw/xfree86/utils/xorgconfig/xorgconfig.c +++ b/hw/xfree86/utils/xorgconfig/xorgconfig.c @@ -631,7 +631,7 @@ mouse_configuration(void) { config_emulate3buttons = 0; 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, but PS/2 mice default to /dev/kdmouse */ if ((config_mousetype != M_AUTO) && (config_mousetype != M_VUID)) { diff --git a/hw/xfree86/xf4bpp/vgaSolid.c b/hw/xfree86/xf4bpp/vgaSolid.c index 501bd3db0..0ef18cfeb 100644 --- a/hw/xfree86/xf4bpp/vgaSolid.c +++ b/hw/xfree86/xf4bpp/vgaSolid.c @@ -54,7 +54,7 @@ static void fastFill { int stop_count = 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)); #else #define notZero ((unsigned char)(~0)) @@ -112,7 +112,7 @@ static void fastFillRMW { int stop_count = 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)); #endif register int tmp ; @@ -369,7 +369,7 @@ register unsigned int height ; /* MUST BE > 0 !! */ { int stop_count = wordwidth ; 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 ; #else #define notZero ( ~0 ) |