From e6b106715f24112d1dc7a84c6e37df4b5debb2d0 Mon Sep 17 00:00:00 2001 From: Richard PALO Date: Tue, 17 Nov 2015 07:02:07 +0100 Subject: 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 Reviewed-by: Alan Coopersmith --- os/access.c | 8 ++++---- os/backtrace.c | 2 +- os/io.c | 2 +- os/rpcauth.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'os') diff --git a/os/access.c b/os/access.c index 2499a9f12..10a48c37d 100644 --- a/os/access.c +++ b/os/access.c @@ -112,7 +112,7 @@ SOFTWARE. #ifdef HAVE_GETPEERUCRED #include -#ifdef sun +#ifdef __sun #include #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 diff --git a/os/backtrace.c b/os/backtrace.c index fd129ef21..9e3e38edf 100644 --- a/os/backtrace.c +++ b/os/backtrace.c @@ -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 diff --git a/os/io.c b/os/io.c index 96a243d8c..55644eaf3 100644 --- a/os/io.c +++ b/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 { diff --git a/os/rpcauth.c b/os/rpcauth.c index 413cc6118..5680489f7 100644 --- a/os/rpcauth.c +++ b/os/rpcauth.c @@ -46,7 +46,7 @@ from The Open Group. #include -#ifdef sun +#ifdef __sun /* only includes this if _KERNEL is #defined... */ extern bool_t xdr_opaque_auth(XDR *, struct opaque_auth *); #endif -- cgit v1.2.3