summaryrefslogtreecommitdiff
path: root/Xtranslcl.c
diff options
context:
space:
mode:
authorRichard PALO <richard@NetBSD.org>2015-11-17 07:02:27 +0100
committerAlan Coopersmith <alan.coopersmith@oracle.com>2015-11-28 12:47:11 -0800
commit3ba0b7a37b9053662ff42f0b4caa856856098475 (patch)
tree780b9627ff7781713c6c3bc12ef4601add797f8a /Xtranslcl.c
parent1d31b87e8045f3fc89b1914187a9a13861d35f2d (diff)
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> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'Xtranslcl.c')
-rw-r--r--Xtranslcl.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/Xtranslcl.c b/Xtranslcl.c
index 3217506..a8bbf10 100644
--- a/Xtranslcl.c
+++ b/Xtranslcl.c
@@ -78,7 +78,7 @@ from The Open Group.
#if defined(SVR4) || defined(__SVR4)
#include <sys/filio.h>
#endif
-#ifdef sun
+#ifdef __sun
# include <stropts.h>
#else
# include <sys/stropts.h>
@@ -104,7 +104,7 @@ from The Open Group.
* - named pipes
* - SCO
*/
-#if !defined(sun)
+#if !defined(__sun)
# define LOCAL_TRANS_PTS
#endif
#if defined(SVR4) || defined(__SVR4)
@@ -243,7 +243,7 @@ static void _dummy(int sig _X_UNUSED)
}
#endif /* LOCAL_TRANS_PTS */
-#ifndef sun
+#ifndef __sun
#define X_STREAMS_DIR "/dev/X"
#define DEV_SPX "/dev/spx"
#else
@@ -259,17 +259,17 @@ static void _dummy(int sig _X_UNUSED)
#if defined(X11_t)
#define PTSNODENAME "/dev/X/server."
-#ifdef sun
+#ifdef __sun
#define NAMEDNODENAME "/tmp/.X11-pipe/X"
#else
#define NAMEDNODENAME "/dev/X/Nserver."
#define SCORNODENAME "/dev/X%1sR"
#define SCOSNODENAME "/dev/X%1sS"
-#endif /* !sun */
+#endif /* !__sun */
#endif
#if defined(XIM_t)
-#ifdef sun
+#ifdef __sun
#define NAMEDNODENAME "/tmp/.XIM-pipe/XIM"
#else
#define PTSNODENAME "/dev/X/XIM."
@@ -279,7 +279,7 @@ static void _dummy(int sig _X_UNUSED)
#endif
#endif
#if defined(FS_t) || defined (FONT_t)
-#ifdef sun
+#ifdef __sun
#define NAMEDNODENAME "/tmp/.font-pipe/fs"
#else
/*
@@ -293,7 +293,7 @@ static void _dummy(int sig _X_UNUSED)
#endif
#endif
#if defined(ICE_t)
-#ifdef sun
+#ifdef __sun
#define NAMEDNODENAME "/tmp/.ICE-pipe/"
#else
#define PTSNODENAME "/dev/X/ICE."
@@ -303,7 +303,7 @@ static void _dummy(int sig _X_UNUSED)
#endif
#endif
#if defined(TEST_t)
-#ifdef sun
+#ifdef __sun
#define NAMEDNODENAME "/tmp/.Test-unix/test"
#endif
#define PTSNODENAME "/dev/X/transtest."
@@ -678,7 +678,7 @@ TRANS(NAMEDOpenClient)(XtransConnInfo ciptr, const char *port)
int fd;
char server_path[64];
struct stat filestat;
-# ifndef sun
+# ifndef __sun
extern int isastream(int);
# endif
#endif
@@ -1610,7 +1610,7 @@ static LOCALtrans2dev LOCALtrans2devtab[] = {
#endif /* TRANS_SERVER */
},
-#ifdef sun /* Alias "pipe" to named, since that's what Solaris called it */
+#ifdef __sun /* Alias "pipe" to named, since that's what Solaris called it */
{"pipe",
#ifdef TRANS_CLIENT
TRANS(NAMEDOpenClient),
@@ -1633,7 +1633,7 @@ static LOCALtrans2dev LOCALtrans2devtab[] = {
TRANS(NAMEDAccept)
#endif /* TRANS_SERVER */
},
-#endif /* sun */
+#endif /* __sun */
#endif /* LOCAL_TRANS_NAMED */
@@ -1673,7 +1673,7 @@ static char *freeXLOCAL=NULL;
#define DEF_XLOCAL "SCO:UNIX:PTS"
#elif defined(__UNIXWARE__)
#define DEF_XLOCAL "UNIX:PTS:NAMED:SCO"
-#elif defined(sun)
+#elif defined(__sun)
#define DEF_XLOCAL "UNIX:NAMED"
#else
#define DEF_XLOCAL "UNIX:PTS:NAMED:SCO"
@@ -2345,7 +2345,7 @@ static const char * local_aliases[] = {
"pts",
# endif
"named",
-# ifdef sun
+# ifdef __sun
"pipe", /* compatibility with Solaris Xlib */
# endif
# ifdef LOCAL_TRANS_SCO
@@ -2492,7 +2492,7 @@ Xtransport TRANS(NAMEDFuncs) = {
TRANS(LocalCloseForCloning),
};
-#ifdef sun
+#ifdef __sun
Xtransport TRANS(PIPEFuncs) = {
/* Local Interface */
"pipe",
@@ -2536,7 +2536,7 @@ Xtransport TRANS(PIPEFuncs) = {
TRANS(LocalClose),
TRANS(LocalCloseForCloning),
};
-#endif /* sun */
+#endif /* __sun */
#endif /* LOCAL_TRANS_NAMED */