Replace 'sun' with '__sun'
Globally replace #ifdef and #if defined usage of 'sun' with '__sun' such that strict ISO compiler modes such as -ansi or -std=c99 can be used. Signed-off-by: Richard PALO <richard@NetBSD.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
parent
44d0fd435a
commit
e6b106715f
|
@ -34,7 +34,7 @@
|
|||
#endif
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#ifdef sun
|
||||
#ifdef __sun
|
||||
#include <sys/file.h> /* needed for FNONBLOCK & FASYNC */
|
||||
#endif
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
#include "xf86sbusBus.h"
|
||||
#endif
|
||||
|
||||
#ifdef sun
|
||||
#ifdef __sun
|
||||
#include <sys/visual_io.h>
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
|
@ -202,7 +202,7 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
|
|||
#ifdef XSERVER_PLATFORM_BUS
|
||||
i = xf86PlatformMatchDriver(matches, nmatches);
|
||||
#endif
|
||||
#ifdef sun
|
||||
#ifdef __sun
|
||||
/* Check for driver type based on /dev/fb type and if valid, use
|
||||
it instead of PCI bus probe results */
|
||||
if (xf86Info.consoleFd >= 0 && (i < (nmatches - 1))) {
|
||||
|
@ -271,7 +271,7 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
|
|||
matches[i++] = xnfstrdup("modesetting");
|
||||
#endif
|
||||
|
||||
#if !defined(sun)
|
||||
#if !defined(__sun)
|
||||
/* Fallback to platform default frame buffer driver */
|
||||
if (i < (nmatches - 1)) {
|
||||
#if !defined(__linux__) && defined(__sparc__)
|
||||
|
@ -280,13 +280,13 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
|
|||
matches[i++] = xnfstrdup("fbdev");
|
||||
#endif
|
||||
}
|
||||
#endif /* !sun */
|
||||
#endif /* !__sun */
|
||||
|
||||
/* Fallback to platform default hardware */
|
||||
if (i < (nmatches - 1)) {
|
||||
#if defined(__i386__) || defined(__amd64__) || defined(__hurd__)
|
||||
matches[i++] = xnfstrdup("vesa");
|
||||
#elif defined(__sparc__) && !defined(sun)
|
||||
#elif defined(__sparc__) && !defined(__sun)
|
||||
matches[i++] = xnfstrdup("sunffb");
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ xf86InfoRec xf86Info = {
|
|||
.vtno = -1,
|
||||
.lastEventTime = -1,
|
||||
.vtRequestsPending = FALSE,
|
||||
#ifdef sun
|
||||
#ifdef __sun
|
||||
.vtPendingNum = -1,
|
||||
#endif
|
||||
.dontVTSwitch = FALSE,
|
||||
|
|
|
@ -55,7 +55,7 @@ typedef struct {
|
|||
/* event handler part */
|
||||
int lastEventTime;
|
||||
Bool vtRequestsPending;
|
||||
#ifdef sun
|
||||
#ifdef __sun
|
||||
int vtPendingNum;
|
||||
#endif
|
||||
Bool dontVTSwitch;
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <xorg-config.h>
|
||||
#endif
|
||||
|
||||
#if defined(_XOPEN_SOURCE) || defined(sun) && defined(__SVR4)
|
||||
#if defined(_XOPEN_SOURCE) || defined(__sun) && defined(__SVR4)
|
||||
#include <math.h>
|
||||
#else
|
||||
#define _XOPEN_SOURCE /* to get prototype for pow on some systems */
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#define OSNAME "openbsd"
|
||||
#elif defined(__GNU__)
|
||||
#define OSNAME "hurd"
|
||||
#elif defined(SVR4) && defined(sun)
|
||||
#elif defined(SVR4) && defined(__sun)
|
||||
#define OSNAME "solaris"
|
||||
#elif defined(SVR5)
|
||||
#define OSNAME "svr5"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
#ifdef sun
|
||||
#ifdef __sun
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
#include "xf86.h"
|
||||
|
@ -173,7 +173,7 @@ promIsP1275(void)
|
|||
break;
|
||||
}
|
||||
fclose(f);
|
||||
#elif defined(sun)
|
||||
#elif defined(__sun)
|
||||
struct utsname buffer;
|
||||
|
||||
if ((uname(&buffer) >= 0) && !strcmp(buffer.machine, "sun4u"))
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
/* SYSV386 (SVR3, SVR4), including Solaris */
|
||||
/**************************************************************************/
|
||||
#if (defined(SYSV) || defined(SVR4)) && \
|
||||
(defined(sun) || defined(__i386__))
|
||||
(defined(__sun) || defined(__i386__))
|
||||
#include <sys/ioctl.h>
|
||||
#include <signal.h>
|
||||
#include <termio.h>
|
||||
|
@ -94,21 +94,21 @@
|
|||
#include <errno.h>
|
||||
|
||||
#if defined(_NEED_SYSI86)
|
||||
#if !(defined (sun) && defined (SVR4))
|
||||
#if !(defined (__sun) && defined (SVR4))
|
||||
#include <sys/immu.h>
|
||||
#include <sys/region.h>
|
||||
#include <sys/proc.h>
|
||||
#endif
|
||||
#include <sys/tss.h>
|
||||
#include <sys/sysi86.h>
|
||||
#if defined(SVR4) && !defined(sun)
|
||||
#if defined(SVR4) && !defined(__sun)
|
||||
#include <sys/seg.h>
|
||||
#endif /* SVR4 && !sun */
|
||||
#endif /* SVR4 && !__sun */
|
||||
/* V86SC_IOPL was moved to <sys/sysi86.h> on Solaris 7 and later */
|
||||
#if !defined(V86SC_IOPL) /* Solaris 7 or later? */
|
||||
#include <sys/v86.h> /* Nope */
|
||||
#endif
|
||||
#if defined(sun) && (defined (__i386__) || defined(__i386) || defined(__x86)) && defined (SVR4)
|
||||
#if defined(__sun) && (defined (__i386__) || defined(__i386) || defined(__x86)) && defined (SVR4)
|
||||
#include <sys/psw.h>
|
||||
#endif
|
||||
#endif /* _NEED_SYSI86 */
|
||||
|
@ -122,14 +122,14 @@
|
|||
#include <sys/mmap.h> /* MMAP driver header */
|
||||
#endif
|
||||
|
||||
#if !defined(sun) || defined(HAVE_SYS_VT_H)
|
||||
#if !defined(__sun) || defined(HAVE_SYS_VT_H)
|
||||
#define HAS_USL_VTS
|
||||
#endif
|
||||
#if !defined(sun)
|
||||
#if !defined(__sun)
|
||||
#include <sys/emap.h>
|
||||
#endif
|
||||
#if defined(HAS_USL_VTS)
|
||||
#if !defined(sun)
|
||||
#if !defined(__sun)
|
||||
#include <sys/at_ansi.h>
|
||||
#endif
|
||||
#include <sys/kd.h>
|
||||
|
@ -139,7 +139,7 @@ extern _X_HIDDEN void xf86VTAcquire(int);
|
|||
extern _X_HIDDEN void xf86VTRelease(int);
|
||||
#endif
|
||||
|
||||
#if defined(sun)
|
||||
#if defined(__sun)
|
||||
#include <sys/fbio.h>
|
||||
extern _X_HIDDEN char xf86SolarisFbDev[PATH_MAX];
|
||||
|
||||
|
@ -156,7 +156,7 @@ extern _X_HIDDEN char xf86SolarisFbDev[PATH_MAX];
|
|||
#define LED_NUM LED_NUM_LOCK
|
||||
#define LED_SCR LED_SCROLL_LOCK
|
||||
#define LED_COMP LED_COMPOSE
|
||||
#endif /* sun */
|
||||
#endif /* __sun */
|
||||
|
||||
#if !defined(VT_ACKACQ)
|
||||
#define VT_ACKACQ 2
|
||||
|
@ -164,7 +164,7 @@ extern _X_HIDDEN char xf86SolarisFbDev[PATH_MAX];
|
|||
|
||||
#if defined(SVR4)
|
||||
#include <sys/mman.h>
|
||||
#if !(defined(sun) && defined (SVR4))
|
||||
#if !(defined(__sun) && defined (SVR4))
|
||||
#define DEV_MEM "/dev/pmem"
|
||||
#endif
|
||||
#define CLEARDTR_SUPPORT
|
||||
|
|
|
@ -112,7 +112,7 @@ SOFTWARE.
|
|||
|
||||
#ifdef HAVE_GETPEERUCRED
|
||||
#include <ucred.h>
|
||||
#ifdef sun
|
||||
#ifdef __sun
|
||||
#include <zone.h>
|
||||
#endif
|
||||
#endif
|
||||
|
@ -162,7 +162,7 @@ SOFTWARE.
|
|||
* Test for Solaris commented out -- TSI @ UQV 2003.06.13
|
||||
*/
|
||||
#ifdef SIOCGLIFCONF
|
||||
/* #if defined(sun) */
|
||||
/* #if defined(__sun) */
|
||||
#define USE_SIOCGLIFCONF
|
||||
/* #endif */
|
||||
#endif
|
||||
|
@ -383,7 +383,7 @@ AccessUsingXdmcp(void)
|
|||
LocalHostEnabled = FALSE;
|
||||
}
|
||||
|
||||
#if defined(SVR4) && !defined(sun) && defined(SIOCGIFCONF) && !defined(USE_SIOCGLIFCONF)
|
||||
#if defined(SVR4) && !defined(__sun) && defined(SIOCGIFCONF) && !defined(USE_SIOCGLIFCONF)
|
||||
|
||||
/* Deal with different SIOCGIFCONF ioctl semantics on these OSs */
|
||||
|
||||
|
@ -1145,7 +1145,7 @@ GetLocalClientCreds(ClientPtr client, LocalClientCredRec ** lccp)
|
|||
if (client == NULL)
|
||||
return -1;
|
||||
ci = ((OsCommPtr) client->osPrivate)->trans_conn;
|
||||
#if !(defined(sun) && defined(HAVE_GETPEERUCRED))
|
||||
#if !(defined(__sun) && defined(HAVE_GETPEERUCRED))
|
||||
/* Most implementations can only determine peer credentials for Unix
|
||||
* domain sockets - Solaris getpeerucred can work with a bit more, so
|
||||
* we just let it tell us if the connection type is supported or not
|
||||
|
|
|
@ -155,7 +155,7 @@ xorg_backtrace(void)
|
|||
|
||||
#else /* not glibc or glibc < 2.1 */
|
||||
|
||||
#if defined(sun) && defined(__SVR4)
|
||||
#if defined(__sun) && defined(__SVR4)
|
||||
#define HAVE_PSTACK
|
||||
#endif
|
||||
|
||||
|
|
2
os/io.c
2
os/io.c
|
@ -368,7 +368,7 @@ ReadRequestFromClient(ClientPtr client)
|
|||
oci->size - oci->bufcnt);
|
||||
if (result <= 0) {
|
||||
if ((result < 0) && ETEST(errno)) {
|
||||
#if defined(SVR4) && defined(__i386__) && !defined(sun)
|
||||
#if defined(SVR4) && defined(__i386__) && !defined(__sun)
|
||||
if (0)
|
||||
#endif
|
||||
{
|
||||
|
|
|
@ -46,7 +46,7 @@ from The Open Group.
|
|||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
#ifdef sun
|
||||
#ifdef __sun
|
||||
/* <rpc/auth.h> only includes this if _KERNEL is #defined... */
|
||||
extern bool_t xdr_opaque_auth(XDR *, struct opaque_auth *);
|
||||
#endif
|
||||
|
|
|
@ -60,7 +60,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#define LED_NUM 5
|
||||
#define PHYS_LEDS 0x1f
|
||||
#else
|
||||
#ifdef sun
|
||||
#ifdef __sun
|
||||
#define LED_NUM 1
|
||||
#define LED_SCROLL 2
|
||||
#define LED_COMPOSE 3
|
||||
|
|
Loading…
Reference in New Issue