From: chase Date: Thu, 24 May 2018 21:24:41 +0000 (-0500) Subject: Use POSIX macros for linux X-Git-Tag: 2.2.4a~30 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4f5e7fe5e3b8ef48be3b7129d0a4411c2a100170;p=oweals%2Fcde.git Use POSIX macros for linux --- diff --git a/cde/config/cf/linux.cf b/cde/config/cf/linux.cf index 5b5624f1..2a375a63 100644 --- a/cde/config/cf/linux.cf +++ b/cde/config/cf/linux.cf @@ -261,7 +261,7 @@ TIRPCINC = # define StandardCppDefines -traditional #endif /* Mc68020Architecture */ -#define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines +#define StandardDefines -D__linux__ LinuxMachineDefines LinuxSourceDefines #define ConnectionFlags -DUNIXCONN -DTCPCONN diff --git a/cde/config/imake/imakemdep.h b/cde/config/imake/imakemdep.h index 83101d2f..aa897b4a 100644 --- a/cde/config/imake/imakemdep.h +++ b/cde/config/imake/imakemdep.h @@ -300,7 +300,7 @@ char *cpp_argv[ARGUMENTS] = { #ifdef unix "-Uunix", /* remove unix symbol so that filename unix.c okay */ #endif -#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(MACH) || defined(ISC) || defined(linux) || defined(__hpux__) || defined(__vxworks) +#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(MACH) || defined(ISC) || defined(__linux__) || defined(__hpux__) || defined(__vxworks) # ifdef __i386__ "-D__i386__", # endif @@ -502,7 +502,7 @@ char *cpp_argv[ARGUMENTS] = { #endif #ifdef linux "-traditional", - "-Dlinux", + "-D__linux__", #endif #ifdef __sxg__ "-D__sxg__", @@ -567,7 +567,7 @@ char *cpp_argv[ARGUMENTS] = { # define DEFAULT_OS_MINOR_REV "r %[0-9]" /* No information available to generate default OSTeenyVersion value. */ # define DEFAULT_OS_NAME "srvm %[^\n]" -#elif defined(sun) || defined(sgi) || defined(ultrix) || defined(linux) || defined(sony) +#elif defined(sun) || defined(sgi) || defined(ultrix) || defined(__linux__) || defined(sony) /* uname -r returns "x.y[.z]", e.g. "5.4" or "4.1.3" */ # define DEFAULT_OS_MAJOR_REV "r %[0-9]" # define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]" @@ -689,7 +689,7 @@ struct symtab predefs[] = { #ifdef mc68020 {"mc68020", "1"}, #endif -#if defined(__GNUC__) && !defined(linux) +#if defined(__GNUC__) && !defined(__linux__) {"__GNUC__", DEF_STRINGIFY(__GNUC__)}, #endif #ifdef __GNUC_MINOR__ diff --git a/cde/include/EUSCompat.h b/cde/include/EUSCompat.h index f292eea4..469fc0ab 100644 --- a/cde/include/EUSCompat.h +++ b/cde/include/EUSCompat.h @@ -59,7 +59,7 @@ extern "C" { ** System V R4 based systems define the stuff we need in ** sys/types.h. Include that and then we are done. */ -#if defined(HPUX) || defined(linux) || defined(SunOS) +#if defined(HPUX) || defined(__linux__) || defined(SunOS) #include #endif @@ -110,7 +110,7 @@ typedef enum {B_FALSE, B_TRUE} boolean_t; #endif /* HPUX */ -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) typedef enum {B_FALSE, B_TRUE} boolean_t; #define MAXNAMELEN 256 diff --git a/cde/lib/DtHelp/CanvasOs.c b/cde/lib/DtHelp/CanvasOs.c index 3a09457c..de7cefc0 100644 --- a/cde/lib/DtHelp/CanvasOs.c +++ b/cde/lib/DtHelp/CanvasOs.c @@ -141,7 +141,7 @@ _DtCvRunInterp( * write the data to file. */ result = -1; -#if defined(linux) +#if defined(__linux__) myFd = open(fileName, O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU | S_IRWXG | S_IRWXO); #else myFd = open(fileName, O_WRONLY | O_CREAT | O_TRUNC); diff --git a/cde/lib/DtHelp/StringFuncs.c b/cde/lib/DtHelp/StringFuncs.c index 30e48e36..bbb64199 100644 --- a/cde/lib/DtHelp/StringFuncs.c +++ b/cde/lib/DtHelp/StringFuncs.c @@ -58,7 +58,7 @@ #include "CvStringI.h" /* for string functions used by Canvas Engine */ #include "StringFuncsI.h" /* for _CEStrcollProc */ -#if !defined(linux) +#if !defined(__linux__) # include #else # define iconv_t int diff --git a/cde/lib/DtSearch/Search.h b/cde/lib/DtSearch/Search.h index cf4291b7..57c35dee 100644 --- a/cde/lib/DtSearch/Search.h +++ b/cde/lib/DtSearch/Search.h @@ -62,11 +62,11 @@ #include #include -#if defined(linux) +#if defined(__linux__) # define __SVR4_I386_ABI_L1__ #endif #include -#if defined(linux) +#if defined(__linux__) # undef __SVR4_I386_ABI_L1__ # ifndef WORD_BIT # define WORD_BIT 32 diff --git a/cde/lib/DtSearch/SearchP.h b/cde/lib/DtSearch/SearchP.h index 90b806fc..f6f7cea7 100644 --- a/cde/lib/DtSearch/SearchP.h +++ b/cde/lib/DtSearch/SearchP.h @@ -871,7 +871,7 @@ extern LLIST *sort_llist (LLIST *list_header); extern char *teskey_parser (PARG *parg); extern DtSrObjdate tm2objdate (struct tm *tmptr); -#if !defined(linux) +#if !defined(__linux__) #ifndef _ALL_SOURCE extern char *strdup (const char *s); #endif diff --git a/cde/lib/DtSearch/raima/vista.h b/cde/lib/DtSearch/raima/vista.h index b9041b34..ee9a39fe 100644 --- a/cde/lib/DtSearch/raima/vista.h +++ b/cde/lib/DtSearch/raima/vista.h @@ -82,11 +82,11 @@ * - Prefix all vista utility names with "dt...", also to deconfuse. * */ -#if defined(linux) +#if defined(__linux__) # define __SVR4_I386_ABI_L1__ #endif #include /* pickup WORD_BIT, LONG_BIT */ -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) # undef __SVR4_I386_ABI_L1__ # ifndef WORD_BIT # define WORD_BIT 32 diff --git a/cde/lib/DtSvc/DtEncap/local.c b/cde/lib/DtSvc/DtEncap/local.c index f6423aab..a8f4dbe7 100644 --- a/cde/lib/DtSvc/DtEncap/local.c +++ b/cde/lib/DtSvc/DtEncap/local.c @@ -202,7 +202,7 @@ void local_channel_object_input_handler(void * client_data, timeout.tv_sec = 0; timeout.tv_usec = 0; -#if defined(SVR4) || defined(__hpux) || defined(__OpenBSD__) || defined(linux) +#if defined(SVR4) || defined(__hpux) || defined(__OpenBSD__) || defined(__linux__) select(max_fds, (fd_set*)&read_fd_vect, NULL, (fd_set*)&except_fd_vect, &timeout); #else /* UX has select defined with int*, not fd_set* parms */ diff --git a/cde/lib/DtSvc/DtEncap/spc-termio.c b/cde/lib/DtSvc/DtEncap/spc-termio.c index bf12c7e7..26d4e9dd 100644 --- a/cde/lib/DtSvc/DtEncap/spc-termio.c +++ b/cde/lib/DtSvc/DtEncap/spc-termio.c @@ -36,7 +36,7 @@ #include #include -#if !defined(linux) && !defined(CSRG_BASED) +#if !defined(__linux__) && !defined(CSRG_BASED) #include #endif #include diff --git a/cde/lib/DtSvc/DtUtil1/DtsInit.c b/cde/lib/DtSvc/DtUtil1/DtsInit.c index 68b1d2c5..aade879f 100644 --- a/cde/lib/DtSvc/DtUtil1/DtsInit.c +++ b/cde/lib/DtSvc/DtUtil1/DtsInit.c @@ -73,7 +73,7 @@ #include
#include "DtSvcLock.h" -#if !defined(linux) +#if !defined(__linux__) extern char *strdup(const char *); #endif diff --git a/cde/lib/DtSvc/DtUtil1/DtsSort.c b/cde/lib/DtSvc/DtUtil1/DtsSort.c index ebcd96df..76f7dac9 100644 --- a/cde/lib/DtSvc/DtUtil1/DtsSort.c +++ b/cde/lib/DtSvc/DtUtil1/DtsSort.c @@ -58,7 +58,7 @@ #include "Dt/DtsDb.h" #include "Dt/Dts.h" -#if !defined(linux) +#if !defined(__linux__) extern char *strdup(const char *); #endif diff --git a/cde/lib/DtSvc/DtUtil1/Saver.c b/cde/lib/DtSvc/DtUtil1/Saver.c index a29fd288..5e7db00e 100644 --- a/cde/lib/DtSvc/DtUtil1/Saver.c +++ b/cde/lib/DtSvc/DtUtil1/Saver.c @@ -167,7 +167,7 @@ _DtSaverStart( */ if (saver_list.serial == 0) { -#if !defined(linux) && !defined(CSRG_BASED) +#if !defined(__linux__) && !defined(CSRG_BASED) /* JET - how can this ever work anyway? */ putenv(envdata); envdata[0] = '\0'; @@ -214,7 +214,7 @@ _DtSaverStart( sprintf(pe, " %lx", XtWindow(drawArea[i])); } -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) putenv(envdata); #endif diff --git a/cde/lib/DtSvc/DtUtil1/strtab.c b/cde/lib/DtSvc/DtUtil1/strtab.c index 6bfa5004..34969776 100644 --- a/cde/lib/DtSvc/DtUtil1/strtab.c +++ b/cde/lib/DtSvc/DtUtil1/strtab.c @@ -68,7 +68,7 @@ struct strtab_build { static void inc_it (int * a, int * b, unsigned char * key); static void build_it(int a, struct strtab_build * ptr, unsigned char * key); -#if !defined(linux) +#if !defined(__linux__) extern char * strdup(const char *); #endif typedef int (*des_func)(void *); diff --git a/cde/lib/DtSvc/DtUtil2/EnvControl.c b/cde/lib/DtSvc/DtUtil2/EnvControl.c index af26588c..13ca8c1e 100644 --- a/cde/lib/DtSvc/DtUtil2/EnvControl.c +++ b/cde/lib/DtSvc/DtUtil2/EnvControl.c @@ -426,7 +426,7 @@ _DtEnvControl( if ((ptr = strstr(tempString, "/usr/openwin/bin"))) #elif defined(CSRG_BASED) if ((ptr = strstr(tempString, "/usr/X11R6/bin"))) -#elif defined(linux) +#elif defined(__linux__) if ((ptr = strstr(tempString, "/usr/bin"))) #else if ((ptr = strstr(tempString, "/usr/bin/X11"))) @@ -821,7 +821,7 @@ static void _EnvAdd { _DtSvcProcessLock(); if (envBitVector & bv_flag) { -#if defined(CSRG_BASED) || defined(linux) +#if defined(CSRG_BASED) || defined(__linux__) setenv(envVar, envVarSetting + strlen(envVar) + 1, 1); #else @@ -928,7 +928,7 @@ _DtEnvRemove( && ( p[len] == '=' ) && !strncmp(p, str, len)) { -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) /* JET - 2/19/99 It seems much safer to let libc worry about this rather than try to do it ourselves. diff --git a/cde/lib/DtSvc/DtUtil2/XlationSvc.c b/cde/lib/DtSvc/DtUtil2/XlationSvc.c index a7c6b22b..c7b2540b 100644 --- a/cde/lib/DtSvc/DtUtil2/XlationSvc.c +++ b/cde/lib/DtSvc/DtUtil2/XlationSvc.c @@ -49,7 +49,7 @@ $END$ #include /* MAXPATHLEN */ /* for RADIXCHAR and nl_langinfo */ -#if defined(linux) +#if defined(__linux__) # define RADIXCHAR MON_DECIMAL_POINT #endif #include @@ -2199,7 +2199,7 @@ int _DtXlateGetXlateEnv( /* then look up version number of execution host */ if (ret_AppExecEnvVersion) { -#if defined(sun) || defined(_AIX) || defined(linux) || defined(CSRG_BASED) +#if defined(sun) || defined(_AIX) || defined(__linux__) || defined(CSRG_BASED) char version[SYS_NMLN+SYS_NMLN+2]; #else char version[UTSLEN+UTSLEN+2]; @@ -2252,7 +2252,7 @@ int _DtXlateGetXlateEnv( #error OSMAJORVERSION and/or OSMINORVERSION not defined #endif -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) sprintf(buf,"%s%s%s", STR(OSMAJORVERSION), nl_langinfo('.'), STR(OSMINORVERSION)); #else diff --git a/cde/lib/DtSvc/include/bms/sbport.h b/cde/lib/DtSvc/include/bms/sbport.h index edac3ecd..a9587002 100644 --- a/cde/lib/DtSvc/include/bms/sbport.h +++ b/cde/lib/DtSvc/include/bms/sbport.h @@ -255,7 +255,7 @@ /* about above. So, declare them only if we don't already have them */ /* ----------------------------------------------------------------- */ -#if defined(_HPUX_SOURCE) || defined(__sun) || defined(_INCLUDE_BSD_SOURCE) || defined(__aix) || defined(linux) +#if defined(_HPUX_SOURCE) || defined(__sun) || defined(_INCLUDE_BSD_SOURCE) || defined(__aix) || defined(__linux__) /* the "u_types" are defined in standard files */ # undef _INCLUDE_BSD_SOURCE #else diff --git a/cde/lib/DtSvc/include/bms/sbstdinc.h b/cde/lib/DtSvc/include/bms/sbstdinc.h index 21500071..10c15be2 100644 --- a/cde/lib/DtSvc/include/bms/sbstdinc.h +++ b/cde/lib/DtSvc/include/bms/sbstdinc.h @@ -62,7 +62,7 @@ #if !(defined(apollo) && defined(__bsd)) && !defined(CSRG_BASED) #if defined(__STDC__) -#if !defined(linux) && !defined(_XFUNCS_H_) && !defined(sun) +#if !defined(__linux__) && !defined(_XFUNCS_H_) && !defined(sun) extern void bcopy(char *b1, char *b2, int length); extern int bcmp(char *b1, char *b2, int length); extern void bzero(char *b, int length); @@ -70,7 +70,7 @@ extern void bzero(char *b, int length); extern char *mktemp(char *tmplate); #elif ! defined(__cplusplus) -#if !defined(linux) && !defined(_XFUNCS_H_) +#if !defined(__linux__) && !defined(_XFUNCS_H_) extern void bcopy(); extern int bcmp(); extern void bzero(); diff --git a/cde/lib/DtSvc/include/codelibs/dynarray.h b/cde/lib/DtSvc/include/codelibs/dynarray.h index 31a05dd6..78560639 100644 --- a/cde/lib/DtSvc/include/codelibs/dynarray.h +++ b/cde/lib/DtSvc/include/codelibs/dynarray.h @@ -36,10 +36,10 @@ #ifndef __DYNARRAY_H_ #define __DYNARRAY_H_ -#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #include #endif -#if defined(sun) || defined(linux) || defined(CSRG_BASED) +#if defined(sun) || defined(__linux__) || defined(CSRG_BASED) #define _DELETE_ARRAY(sz) delete[] #else #define _DELETE_ARRAY(sz) delete[(sz)] diff --git a/cde/lib/DtSvc/include/codelibs/privbuf.h b/cde/lib/DtSvc/include/codelibs/privbuf.h index f5ceaa3d..ad88b9c0 100644 --- a/cde/lib/DtSvc/include/codelibs/privbuf.h +++ b/cde/lib/DtSvc/include/codelibs/privbuf.h @@ -48,7 +48,7 @@ typedef void (*privbuf_func)(void *v); #include #include -#if defined(sun) || defined(linux) || defined(CSRG_BASED) +#if defined(sun) || defined(__linux__) || defined(CSRG_BASED) // Rejects valid inline declarations, claiming they have both internal and // external linkage. #else diff --git a/cde/lib/DtSvc/include/codelibs/stringx.h b/cde/lib/DtSvc/include/codelibs/stringx.h index f339b2b0..e243dddd 100644 --- a/cde/lib/DtSvc/include/codelibs/stringx.h +++ b/cde/lib/DtSvc/include/codelibs/stringx.h @@ -73,7 +73,7 @@ extern "C" #ifdef __cplusplus char *strtokx(char *&ptr, const char *sep); -# if !defined(linux) && !defined(sun) && !defined(CSRG_BASED) +# if !defined(__linux__) && !defined(sun) && !defined(CSRG_BASED) char **strsep(const char *str, const char *sep, boolean whsp = TRUE, int *num = NULL); const char *strcmbn(const char **vec, const char *sep = " "); @@ -81,7 +81,7 @@ extern "C" #else /* __STDC__ */ char *strtokx(char **ptr, const char *sep); -# if !defined(linux) && !defined(sun) && !defined(CSRG_BASED) +# if !defined(__linux__) && !defined(sun) && !defined(CSRG_BASED) char **strsep(const char *str, const char *sep, boolean whsp, int *num); #endif @@ -119,7 +119,7 @@ extern size_t nl_strlen(); /* __OBSOLETE */ #if defined(__cplusplus) } -#if defined(apollo) || defined(__aix) || defined(linux) || defined(CSRG_BASED) +#if defined(apollo) || defined(__aix) || defined(__linux__) || defined(CSRG_BASED) #include #else #include diff --git a/cde/lib/DtTerm/TermPrim/TermHeader.h b/cde/lib/DtTerm/TermPrim/TermHeader.h index 2590b0cc..b1206dd6 100644 --- a/cde/lib/DtTerm/TermPrim/TermHeader.h +++ b/cde/lib/DtTerm/TermPrim/TermHeader.h @@ -44,7 +44,7 @@ #include #include -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) #define _NFILE FOPEN_MAX #endif diff --git a/cde/lib/DtTerm/TermPrim/TermPrim.c b/cde/lib/DtTerm/TermPrim/TermPrim.c index 4c8aabac..9c7081a3 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrim.c +++ b/cde/lib/DtTerm/TermPrim/TermPrim.c @@ -81,7 +81,7 @@ extern char * _DtTermPrimGetMessage( char *filename, int set, int n, char *s ); #include #include #include -#if defined(linux) || defined(hpV4) +#if defined(__linux__) || defined(hpV4) # include /* For FD_* macros. */ # include /* For select() prototype. */ #else diff --git a/cde/lib/DtTerm/TermPrim/TermPrimDebug.c b/cde/lib/DtTerm/TermPrim/TermPrimDebug.c index 1f2273fa..42fe1780 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimDebug.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimDebug.c @@ -39,7 +39,7 @@ static char rcs_id[] = "$XConsortium: TermPrimDebug.c /main/4 1996/11/21 19:58:1 #include #include #include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) # include #else # include diff --git a/cde/lib/DtTerm/TermPrim/TermPrimGetPty-clone.c b/cde/lib/DtTerm/TermPrim/TermPrimGetPty-clone.c index c7573d4c..e0bfa6f3 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimGetPty-clone.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimGetPty-clone.c @@ -49,7 +49,7 @@ static char rcs_id[] = "$TOG: TermPrimGetPty-clone.c /main/7 1998/04/03 17:11:08 #if defined(__AIX) # define PTY_CLONE_DEVICE "/dev/ptc" -#elif defined(linux) +#elif defined(__linux__) # define PTY_CLONE_DEVICE "/dev/ptyc" #endif /* __AIX */ @@ -72,7 +72,7 @@ GetPty(char **ptySlave, char **ptyMaster) if ((ptyFd = open(*ptyMaster, O_RDWR, 0))) { _Xttynameparams tty_buf; -#if defined(linux) +#if defined(__linux__) if (c = _XTtyname(ptyFd)) { #else if (c = _XTtyname(ptyFd, tty_buf)) { diff --git a/cde/lib/DtTerm/TermPrim/TermPrimGetPty-svr4.c b/cde/lib/DtTerm/TermPrim/TermPrimGetPty-svr4.c index 8ee0d650..5a00d59d 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimGetPty-svr4.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimGetPty-svr4.c @@ -43,14 +43,14 @@ static char rcs_id[] = "$XConsortium: TermPrimGetPty-svr4.c /main/1 1996/04/21 1 #include "TermPrimOSDepI.h" #include "TermPrimDebug.h" #include "TermHeader.h" -#if !defined(linux) +#if !defined(__linux__) #include #include #include #endif #include -#if defined(linux) +#if defined(__linux__) #undef USE_STREAMS_BUFMOD #endif @@ -260,7 +260,7 @@ SetupPty(char *ptySlave, int ptyFd) * they don't seem to stick after the file is closed on * SVR4.2. Not sure where else this applies. */ -#if !defined(linux) +#if !defined(__linux__) if (ioctl(ptyFd, I_PUSH, "ptem") == -1) { (void) perror("Error pushing ptem"); /* exit the subprocess */ diff --git a/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c b/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c index 81612822..0f60111a 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c @@ -385,7 +385,7 @@ UtmpEntryCreate(Widget w, pid_t pid, char *utmpLine) (void) strncpy(utPtr->ut_id, utmpLine, sizeof(utPtr->ut_id)); #else /* __AIX */ -#if defined(linux) || defined(sun) +#if defined(__linux__) || defined(sun) if (c = strchr(utmpLine, '/')) { c++; } else { @@ -401,7 +401,7 @@ UtmpEntryCreate(Widget w, pid_t pid, char *utmpLine) /* set up the new entry... */ utPtr->ut_type = USER_PROCESS; -#if !defined(linux) +#if !defined(__linux__) utPtr->ut_exit.e_termination = 0; utPtr->ut_exit.e_exit = 2; #endif @@ -528,7 +528,7 @@ UtmpEntryDestroy(Widget w, char *utmpLine) (void) setutent(); if (utPtr = getutline(&ut)) { utPtr->ut_type = DEAD_PROCESS; -#if !defined(linux) +#if !defined(__linux__) utPtr->ut_exit.e_termination = 0; utPtr->ut_exit.e_exit = 0; #endif diff --git a/cde/lib/DtWidget/Editor.c b/cde/lib/DtWidget/Editor.c index 68887301..983d61e7 100644 --- a/cde/lib/DtWidget/Editor.c +++ b/cde/lib/DtWidget/Editor.c @@ -62,7 +62,7 @@ # include # endif # include -#elif defined(linux) +#elif defined(__linux__) # include # define NO_putwc #elif defined(CSRG_BASED) diff --git a/cde/lib/csa/agent.c b/cde/lib/csa/agent.c index 7db5e50b..888bdf39 100644 --- a/cde/lib/csa/agent.c +++ b/cde/lib/csa/agent.c @@ -34,7 +34,7 @@ #include #include #include -#if !defined(linux) && !defined(CSRG_BASED) +#if !defined(__linux__) && !defined(CSRG_BASED) # include #endif #if defined(SunOS) @@ -200,7 +200,7 @@ _DtCm_destroy_agent() extern void _DtCm_process_updates() { -#if defined(CSRG_BASED) || defined(linux) +#if defined(CSRG_BASED) || defined(__linux__) int i, nfd; fd_set rpc_bits; diff --git a/cde/lib/csa/debug.c b/cde/lib/csa/debug.c index df2d9942..62891773 100644 --- a/cde/lib/csa/debug.c +++ b/cde/lib/csa/debug.c @@ -33,11 +33,11 @@ #define X_INCLUDE_TIME_H #define XOS_USE_NO_LOCKING -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include -#if defined(linux) +#if defined(__linux__) #define SVR4 #endif diff --git a/cde/lib/csa/iso8601.c b/cde/lib/csa/iso8601.c index 11686455..75b8111a 100644 --- a/cde/lib/csa/iso8601.c +++ b/cde/lib/csa/iso8601.c @@ -174,7 +174,7 @@ _csa_tick_to_iso8601(time_t tick, char *buf_out) } /* JET. This is horrible. */ -#if !defined(linux) && !defined(CSRG_BASED) +#if !defined(__linux__) && !defined(CSRG_BASED) if (getenv("TZ")) { strncpy(tz_orig, getenv("TZ"), sizeof(tz_orig)); diff --git a/cde/lib/csa/lutil.c b/cde/lib/csa/lutil.c index e3750120..c7eb6b51 100644 --- a/cde/lib/csa/lutil.c +++ b/cde/lib/csa/lutil.c @@ -42,15 +42,15 @@ #endif #define X_INCLUDE_PWD_H #define XOS_USE_XT_LOCKING -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include -#if defined(linux) +#if defined(__linux__) #define SVR4 #endif -#if !defined(linux) +#if !defined(__linux__) extern char * strdup(const char *); #endif diff --git a/cde/lib/tt/bin/dbck/options.C b/cde/lib/tt/bin/dbck/options.C index 1a6846e8..98393be4 100644 --- a/cde/lib/tt/bin/dbck/options.C +++ b/cde/lib/tt/bin/dbck/options.C @@ -37,7 +37,7 @@ #include #include #include "util/copyright.h" -#if defined(linux) || defined(sgi) || defined(CSRG_BASED) +#if defined(__linux__) || defined(sgi) || defined(CSRG_BASED) #include #endif #include "dbck.h" diff --git a/cde/lib/tt/bin/shell/mover.C b/cde/lib/tt/bin/shell/mover.C index 29d18e63..4b3dcbe7 100644 --- a/cde/lib/tt/bin/shell/mover.C +++ b/cde/lib/tt/bin/shell/mover.C @@ -35,7 +35,7 @@ #include "tt_options.h" #include #include -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) #include #else #if !defined(sun) diff --git a/cde/lib/tt/bin/shell/remover.C b/cde/lib/tt/bin/shell/remover.C index ae71ac02..c01918e3 100644 --- a/cde/lib/tt/bin/shell/remover.C +++ b/cde/lib/tt/bin/shell/remover.C @@ -35,7 +35,7 @@ #include "tt_options.h" #include #include -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) #include #else #if !defined(sun) diff --git a/cde/lib/tt/bin/tt_type_comp/frozen.mp_types_lex.C b/cde/lib/tt/bin/tt_type_comp/frozen.mp_types_lex.C index 027752e8..2c0e8e60 100644 --- a/cde/lib/tt/bin/tt_type_comp/frozen.mp_types_lex.C +++ b/cde/lib/tt/bin/tt_type_comp/frozen.mp_types_lex.C @@ -68,7 +68,7 @@ extern "C" { #ifdef __cplusplus extern "C" { #endif -#if !defined(linux) +#if !defined(__linux__) void exit(int); #endif #ifdef __cplusplus diff --git a/cde/lib/tt/bin/tt_type_comp/mp_type_comp.C b/cde/lib/tt/bin/tt_type_comp/mp_type_comp.C index 98f95bac..6f4b2cbd 100644 --- a/cde/lib/tt/bin/tt_type_comp/mp_type_comp.C +++ b/cde/lib/tt/bin/tt_type_comp/mp_type_comp.C @@ -39,7 +39,7 @@ #include #include #include -#if defined(linux) +#if defined(__linux__) #include #endif #if defined(sgi) || defined(CSRG_BASED) diff --git a/cde/lib/tt/bin/ttauth/ttauth.h b/cde/lib/tt/bin/ttauth/ttauth.h index 986551cc..c12ef084 100644 --- a/cde/lib/tt/bin/ttauth/ttauth.h +++ b/cde/lib/tt/bin/ttauth/ttauth.h @@ -58,7 +58,7 @@ typedef int Bool; extern char *ProgramName; -#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) extern char *malloc(), *realloc(); #endif int process_command(), auth_initialize(), auth_finalize(); diff --git a/cde/lib/tt/bin/ttdbserverd/db_server_svc.C b/cde/lib/tt/bin/ttdbserverd/db_server_svc.C index f5f6590a..ab32ee47 100644 --- a/cde/lib/tt/bin/ttdbserverd/db_server_svc.C +++ b/cde/lib/tt/bin/ttdbserverd/db_server_svc.C @@ -217,7 +217,7 @@ main(int argc, char** argv, char **envp) #if defined(HPUX) int asize = sizeof(saddr); #else -# if defined(linux) || defined(CSRG_BASED) || defined(sun) +# if defined(__linux__) || defined(CSRG_BASED) || defined(sun) socklen_t asize = sizeof(saddr); # else size_t asize = sizeof(saddr); diff --git a/cde/lib/tt/bin/tttar/tttar.C b/cde/lib/tt/bin/tttar/tttar.C index f154f25e..1a66e83e 100644 --- a/cde/lib/tt/bin/tttar/tttar.C +++ b/cde/lib/tt/bin/tttar/tttar.C @@ -37,7 +37,7 @@ #include #include #include -#if defined(linux) || defined(sun) || defined(CSRG_BASED) +#if defined(__linux__) || defined(sun) || defined(CSRG_BASED) #include #else #if !defined(sun) diff --git a/cde/lib/tt/bin/tttar/tttar_api.C b/cde/lib/tt/bin/tttar/tttar_api.C index fa04c0b3..f24af18a 100644 --- a/cde/lib/tt/bin/tttar/tttar_api.C +++ b/cde/lib/tt/bin/tttar/tttar_api.C @@ -33,7 +33,7 @@ */ #include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/lib/tt/bin/tttar/tttar_file_utils.C b/cde/lib/tt/bin/tttar/tttar_file_utils.C index 2184fefc..b616bcbc 100644 --- a/cde/lib/tt/bin/tttar/tttar_file_utils.C +++ b/cde/lib/tt/bin/tttar/tttar_file_utils.C @@ -360,7 +360,7 @@ append_real_subtrees( _Tt_string_list_ptr realtrees, _Tt_string path ) /* * basename() - Return the last component of a pathname. */ -#if !defined(linux) +#if !defined(__linux__) char *basename( char *pathname ) { char *the_basename; diff --git a/cde/lib/tt/bin/tttar/tttar_spec.C b/cde/lib/tt/bin/tttar/tttar_spec.C index fd32e386..cf357461 100644 --- a/cde/lib/tt/bin/tttar/tttar_spec.C +++ b/cde/lib/tt/bin/tttar/tttar_spec.C @@ -32,7 +32,7 @@ * */ -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/lib/tt/bin/tttrace/tttrace.C b/cde/lib/tt/bin/tttrace/tttrace.C index 3e5335b3..346bfc93 100644 --- a/cde/lib/tt/bin/tttrace/tttrace.C +++ b/cde/lib/tt/bin/tttrace/tttrace.C @@ -38,7 +38,7 @@ #include #include #include -#if defined(linux) +#if defined(__linux__) # include #else # include diff --git a/cde/lib/tt/lib/api/c/api_typecb.h b/cde/lib/tt/lib/api/c/api_typecb.h index 267d7300..293cb5c9 100644 --- a/cde/lib/tt/lib/api/c/api_typecb.h +++ b/cde/lib/tt/lib/api/c/api_typecb.h @@ -44,7 +44,7 @@ #include "api/c/tt_c.h" #include "api/c/api_handle.h" -#if defined(linux) +#if defined(__linux__) // Avoid g++ compiler errors on linux. #define typename typenm #endif diff --git a/cde/lib/tt/lib/mp/mp_desktop.C b/cde/lib/tt/lib/mp/mp_desktop.C index f03adbd6..522673e4 100644 --- a/cde/lib/tt/lib/mp/mp_desktop.C +++ b/cde/lib/tt/lib/mp/mp_desktop.C @@ -47,7 +47,7 @@ #include #include #include -#if defined(__STDC__) && !defined(linux) && !defined(CSRG_BASED) +#if defined(__STDC__) && !defined(__linux__) && !defined(CSRG_BASED) extern "C" { extern int ioctl (int, int, ...) ; }; #endif #include "util/tt_global_env.h" diff --git a/cde/lib/tt/lib/mp/mp_message.C b/cde/lib/tt/lib/mp/mp_message.C index da68b245..bd7182c9 100644 --- a/cde/lib/tt/lib/mp/mp_message.C +++ b/cde/lib/tt/lib/mp/mp_message.C @@ -118,7 +118,7 @@ base_constructor() _Tt_message:: _Tt_message() -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) : _pattern_id(), _object(), _file(), _op(), _otype(), _sender_ptype(), _handler_ptype(), _api_id(), _status_string() diff --git a/cde/lib/tt/lib/mp/mp_rpc.h b/cde/lib/tt/lib/mp/mp_rpc.h index 2a4ef014..107a7b9b 100644 --- a/cde/lib/tt/lib/mp/mp_rpc.h +++ b/cde/lib/tt/lib/mp/mp_rpc.h @@ -37,11 +37,11 @@ #define _TT_MP_RPC #include "tt_options.h" -#if defined(linux) +#if defined(__linux__) # define __SVR4_I386_ABI_L1__ #endif #include -#if defined(linux) +#if defined(__linux__) # undef __SVR4_I386_ABI_L1__ #endif diff --git a/cde/lib/tt/lib/mp/mp_rpc_client.C b/cde/lib/tt/lib/mp/mp_rpc_client.C index 76dbe48d..c393a488 100644 --- a/cde/lib/tt/lib/mp/mp_rpc_client.C +++ b/cde/lib/tt/lib/mp/mp_rpc_client.C @@ -212,7 +212,7 @@ init(_Tt_host_ptr &host, int program, int version, // Set close-on-exec bit so a libtt client which forks and execs won't // be short some fd's in the child. -#if defined(linux) +#if defined(__linux__) // JET - for linux, we need to do this properly - I don't know // how the original code below can be correct, so we'll do it // differently. diff --git a/cde/lib/tt/lib/mp/mp_stream_socket.C b/cde/lib/tt/lib/mp/mp_stream_socket.C index caab9e0a..c3bb1a15 100644 --- a/cde/lib/tt/lib/mp/mp_stream_socket.C +++ b/cde/lib/tt/lib/mp/mp_stream_socket.C @@ -34,7 +34,7 @@ #include "tt_options.h" #include #include "mp/mp_stream_socket.h" -#if defined(linux) +#if defined(__linux__) #include #else #include @@ -170,7 +170,7 @@ init(int init_as_source) return 0; } #else -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) socklen_t len; #else int len; @@ -437,7 +437,7 @@ accept() { if (_msgsock == -1) { #ifndef OPT_TLI -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) socklen_t addrlen = sizeof(sockaddr_in); #else int addrlen = sizeof(sockaddr_in); diff --git a/cde/lib/tt/lib/tt_options.h b/cde/lib/tt/lib/tt_options.h index d72f6116..0bbbef18 100644 --- a/cde/lib/tt/lib/tt_options.h +++ b/cde/lib/tt/lib/tt_options.h @@ -408,7 +408,7 @@ # undef OPT_TAR_HAS_EXCLUDE_OPTION # define OPT_BUG_RPCINTR -#elif defined(linux) +#elif defined(__linux__) # undef OPT_UNIX_SOCKET_RPC # undef OPT_TLI diff --git a/cde/lib/tt/lib/tttk/tttk.C b/cde/lib/tt/lib/tttk/tttk.C index 1c4312dc..8ce2be41 100644 --- a/cde/lib/tt/lib/tttk/tttk.C +++ b/cde/lib/tt/lib/tttk/tttk.C @@ -25,7 +25,7 @@ //%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. //%% (c) Copyright 1993, 1994 Novell, Inc. //%% $TOG: tttk.C /main/5 1999/09/14 13:00:44 mgreess $ -#if defined(linux) +#if defined(__linux__) # include #else # include diff --git a/cde/lib/tt/lib/util/tt_entry_pt.C b/cde/lib/tt/lib/util/tt_entry_pt.C index 7468bdcc..d043a10a 100644 --- a/cde/lib/tt/lib/util/tt_entry_pt.C +++ b/cde/lib/tt/lib/util/tt_entry_pt.C @@ -449,7 +449,7 @@ _Tt_string _tt_entrypt_to_string(_Tt_entry_pt fun) return "tt_feature_enabled"; case TT_FEATURE_REQUIRED : return "tt_feature_required"; -#if defined(linux) +#if defined(__linux__) case TT_API_CALL_LAST: return (char *) NULL; #elif defined(OPT_CONST_CORRECT) case TT_API_CALL_LAST: return (const char *) NULL; diff --git a/cde/lib/tt/lib/util/tt_file_system.C b/cde/lib/tt/lib/util/tt_file_system.C index 85bd445c..e30c73d7 100644 --- a/cde/lib/tt/lib/util/tt_file_system.C +++ b/cde/lib/tt/lib/util/tt_file_system.C @@ -47,7 +47,7 @@ #include #include #include -#if defined(linux) +#if defined(__linux__) # include #else # include diff --git a/cde/lib/tt/lib/util/tt_gettext.C b/cde/lib/tt/lib/util/tt_gettext.C index f8cbff30..bce28adb 100644 --- a/cde/lib/tt/lib/util/tt_gettext.C +++ b/cde/lib/tt/lib/util/tt_gettext.C @@ -48,11 +48,11 @@ # endif #elif defined(OPT_CATGETS) -# if defined(linux) +# if defined(__linux__) extern "C" { # endif # include -# if defined(linux) +# if defined(__linux__) } # endif # if !defined(NL_CAT_LOCALE) diff --git a/cde/lib/tt/lib/util/tt_host.C b/cde/lib/tt/lib/util/tt_host.C index 780a1d94..f73fd4ba 100644 --- a/cde/lib/tt/lib/util/tt_host.C +++ b/cde/lib/tt/lib/util/tt_host.C @@ -45,7 +45,7 @@ extern "C" in_addr_t inet_addr(const char *); #include #include #include -#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #include #endif diff --git a/cde/lib/tt/lib/util/tt_host_equiv.C b/cde/lib/tt/lib/util/tt_host_equiv.C index 092d0dcf..b0eac0da 100644 --- a/cde/lib/tt/lib/util/tt_host_equiv.C +++ b/cde/lib/tt/lib/util/tt_host_equiv.C @@ -36,12 +36,12 @@ #define X_INCLUDE_NETDB_H #define XOS_USE_XT_LOCKING -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) #define index #define rindex #endif #include -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) #undef index #undef rindex #endif diff --git a/cde/lib/tt/lib/util/tt_iostream.C b/cde/lib/tt/lib/util/tt_iostream.C index 161f2fd7..9a0b526c 100644 --- a/cde/lib/tt/lib/util/tt_iostream.C +++ b/cde/lib/tt/lib/util/tt_iostream.C @@ -225,7 +225,7 @@ _Tt_ostream::operator <<( return *this; } -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) // This operator is being added to take care of uid_t and gid_t const _Tt_ostream & _Tt_ostream::operator <<( diff --git a/cde/lib/tt/lib/util/tt_iostream.h b/cde/lib/tt/lib/util/tt_iostream.h index ab1b35fd..e56915bf 100644 --- a/cde/lib/tt/lib/util/tt_iostream.h +++ b/cde/lib/tt/lib/util/tt_iostream.h @@ -86,7 +86,7 @@ class _Tt_ostream : public virtual _Tt_allocated { const _Tt_ostream &operator <<( int n ) const; -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) const _Tt_ostream &operator <<( unsigned int n ) const; diff --git a/cde/lib/tt/lib/util/tt_log.C b/cde/lib/tt/lib/util/tt_log.C index 86289dd6..aaf4e1f3 100644 --- a/cde/lib/tt/lib/util/tt_log.C +++ b/cde/lib/tt/lib/util/tt_log.C @@ -34,7 +34,7 @@ #include #include -#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #include #endif diff --git a/cde/lib/tt/lib/util/tt_path.C b/cde/lib/tt/lib/util/tt_path.C index a2900619..6aebf77f 100644 --- a/cde/lib/tt/lib/util/tt_path.C +++ b/cde/lib/tt/lib/util/tt_path.C @@ -49,12 +49,12 @@ /* Included after "util/tt_string.h" to avoid index/strchr conflicts. */ #define X_INCLUDE_DIRENT_H #define XOS_USE_NO_LOCKING -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) #define index #define rindex #endif #include -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) #undef index #undef rindex #endif diff --git a/cde/lib/tt/lib/util/tt_string.C b/cde/lib/tt/lib/util/tt_string.C index 5b5c4f32..23113d47 100644 --- a/cde/lib/tt/lib/util/tt_string.C +++ b/cde/lib/tt/lib/util/tt_string.C @@ -54,7 +54,7 @@ #endif #include #include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #endif #include "util/tt_string.h" diff --git a/cde/lib/tt/lib/util/tt_string_map.C b/cde/lib/tt/lib/util/tt_string_map.C index 142a0188..75f1c377 100644 --- a/cde/lib/tt/lib/util/tt_string_map.C +++ b/cde/lib/tt/lib/util/tt_string_map.C @@ -45,12 +45,12 @@ /* Included after "util/tt_string.h" to avoid index/strchr conflicts. */ #define X_INCLUDE_STRING_H #define XOS_USE_NO_LOCKING -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) #define index #define rindex #endif #include -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) #undef index #undef rindex #endif diff --git a/cde/lib/tt/lib/util/tt_tracefile_parse.C b/cde/lib/tt/lib/util/tt_tracefile_parse.C index e96d93a2..f3386350 100644 --- a/cde/lib/tt/lib/util/tt_tracefile_parse.C +++ b/cde/lib/tt/lib/util/tt_tracefile_parse.C @@ -41,7 +41,7 @@ #include "util/tt_trace_parser.h" #include "util/tt_entry_pt_names.h" -#if defined (_AIX) || defined(hpux) || defined(linux) || defined(CSRG_BASED) +#if defined (_AIX) || defined(hpux) || defined(__linux__) || defined(CSRG_BASED) #include #endif diff --git a/cde/lib/tt/mini_isam/iscntl.c b/cde/lib/tt/mini_isam/iscntl.c index 83da9e2d..780eec56 100644 --- a/cde/lib/tt/mini_isam/iscntl.c +++ b/cde/lib/tt/mini_isam/iscntl.c @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)iscntl.c 1.8 94/11/17"; * Generic control function */ -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include @@ -79,7 +79,7 @@ static char sccsid[] = "@(#)iscntl.c 1.8 94/11/17"; typedef int (* intfunc)(); -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) int iscntl(int isfd, int func, ...) #else @@ -94,7 +94,7 @@ iscntl(isfd, func, va_alist) va_list pvar; int ret; -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) va_start(pvar, func); #else va_start(pvar); diff --git a/cde/lib/tt/slib/mp_otype.C b/cde/lib/tt/slib/mp_otype.C index a923b8a0..58847f71 100644 --- a/cde/lib/tt/slib/mp_otype.C +++ b/cde/lib/tt/slib/mp_otype.C @@ -31,7 +31,7 @@ * Copyright (c) 1990 by Sun Microsystems, Inc. */ #include -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) /*# include */ #else # include diff --git a/cde/lib/tt/slib/mp_ptype.C b/cde/lib/tt/slib/mp_ptype.C index 0f0e2012..46bc03bc 100644 --- a/cde/lib/tt/slib/mp_ptype.C +++ b/cde/lib/tt/slib/mp_ptype.C @@ -26,7 +26,7 @@ //%% (c) Copyright 1993, 1994 Novell, Inc. //%% $TOG: mp_ptype.C /main/4 1998/03/20 14:27:56 mgreess $ #include -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) /*# include */ #else # include diff --git a/cde/lib/tt/slib/mp_rpc_implement.C b/cde/lib/tt/slib/mp_rpc_implement.C index 93c377ee..9ce5d47a 100644 --- a/cde/lib/tt/slib/mp_rpc_implement.C +++ b/cde/lib/tt/slib/mp_rpc_implement.C @@ -49,7 +49,7 @@ #include #include #include -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) /*# include */ #else # include diff --git a/cde/lib/tt/slib/mp_rpc_server.C b/cde/lib/tt/slib/mp_rpc_server.C index f85e3a3d..37336f65 100644 --- a/cde/lib/tt/slib/mp_rpc_server.C +++ b/cde/lib/tt/slib/mp_rpc_server.C @@ -350,7 +350,7 @@ gettransient(int proto, int vers, int *sockp) #ifndef OPT_TLI int found; int s; -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) socklen_t len; #else int len; @@ -399,7 +399,7 @@ gettransient(int proto, int vers, int *sockp) } int optval = 0; -#if !defined(linux) +#if !defined(__linux__) if (setsockopt(s, SOL_SOCKET, SO_USELOOPBACK, (char *)&optval, sizeof(optval)) == -1) { } diff --git a/cde/lib/tt/slib/mp_signature.C b/cde/lib/tt/slib/mp_signature.C index 8b3daca4..1c76a4eb 100644 --- a/cde/lib/tt/slib/mp_signature.C +++ b/cde/lib/tt/slib/mp_signature.C @@ -35,7 +35,7 @@ * a procedure. */ #include -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) /*# include */ #else # include diff --git a/cde/lib/tt/slib/mp_typedb.C b/cde/lib/tt/slib/mp_typedb.C index 3834d212..bfa63975 100644 --- a/cde/lib/tt/slib/mp_typedb.C +++ b/cde/lib/tt/slib/mp_typedb.C @@ -39,7 +39,7 @@ // databases. // #include -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) /*# include */ #else # include diff --git a/cde/programs/dtaction/Main.c b/cde/programs/dtaction/Main.c index eb1bc4e2..34da1dc3 100644 --- a/cde/programs/dtaction/Main.c +++ b/cde/programs/dtaction/Main.c @@ -49,7 +49,7 @@ #include #include /* for MAXPATHLEN and MAXHOSTNAMELEN */ -#if defined(sun) || defined(linux) +#if defined(sun) || defined(__linux__) #include #include #endif @@ -403,7 +403,7 @@ SetGidUid ( unsigned short rgid, unsigned short ruid ) /* fix process gid */ #if defined(SVR4) || defined(_AIX) setgid(rgid); -#elif defined(linux) || defined(CSRG_BASED) +#elif defined(__linux__) || defined(CSRG_BASED) if(-1 == setregid(rgid, rgid)) { fprintf(stderr, "SetGidUid: setregid failed on %d\n", rgid); } @@ -416,7 +416,7 @@ SetGidUid ( unsigned short rgid, unsigned short ruid ) /* fix process uid */ #if defined (SVR4) || defined (_AIX) setuid(ruid); -#elif defined(linux) || defined(CSRG_BASED) +#elif defined(__linux__) || defined(CSRG_BASED) if(-1 == setreuid(ruid, ruid)) { fprintf(stderr, "SetGidUid: setreuid failed on %d\n", ruid); } diff --git a/cde/programs/dtappbuilder/src/ab/brws_mthds.c b/cde/programs/dtappbuilder/src/ab/brws_mthds.c index 5a63873c..471be74d 100644 --- a/cde/programs/dtappbuilder/src/ab/brws_mthds.c +++ b/cde/programs/dtappbuilder/src/ab/brws_mthds.c @@ -65,7 +65,7 @@ #define BRWS_DASH_WIDTH 3 #define BRWS_NUM_DASHES 3 -#if !defined(linux) +#if !defined(__linux__) /* * Somehow the compiler is not picking up strdup() * from string.h properly... diff --git a/cde/programs/dtappbuilder/src/abmf/abmf.c b/cde/programs/dtappbuilder/src/abmf/abmf.c index 74fbf3d0..b5587b34 100644 --- a/cde/programs/dtappbuilder/src/abmf/abmf.c +++ b/cde/programs/dtappbuilder/src/abmf/abmf.c @@ -64,7 +64,7 @@ #include "abmf.h" /* glibc considers CLK_TCK obsolete */ -#if defined(linux) && !defined(CLK_TCK) +#if defined(__linux__) && !defined(CLK_TCK) #define CLK_TCK CLOCKS_PER_SEC #endif diff --git a/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c b/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c index ac796e50..c8816297 100644 --- a/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c +++ b/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c @@ -279,7 +279,7 @@ printf_setval(GenCodeInfo genCodeInfo, ABObj obj, ...) { int return_value = 0; File codeFile = genCodeInfo->code_file; -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) /* Define va_list in as structure of char ** and int * Sun define va_list as void * */ va_list paramList = { 0, 0 }; diff --git a/cde/programs/dtappbuilder/src/abmf/write_c.c b/cde/programs/dtappbuilder/src/abmf/write_c.c index 6e66fe3e..f991f606 100644 --- a/cde/programs/dtappbuilder/src/abmf/write_c.c +++ b/cde/programs/dtappbuilder/src/abmf/write_c.c @@ -350,7 +350,7 @@ write_func_def_params( va_list va_params ) { -#if defined(__ppc) || defined(linux) +#if defined(__ppc) || defined(__linux__) #define va_start_params() __va_copy(params, va_params) #elif defined(CSRG_BASED) #define va_start_params() va_copy(params, va_params) diff --git a/cde/programs/dtappbuilder/src/libAButil/util.h b/cde/programs/dtappbuilder/src/libAButil/util.h index 52f42154..aceedbd0 100644 --- a/cde/programs/dtappbuilder/src/libAButil/util.h +++ b/cde/programs/dtappbuilder/src/libAButil/util.h @@ -66,7 +66,7 @@ extern "C" { #endif -#if !defined(linux) +#if !defined(__linux__) extern char *strdup(const char *); #endif diff --git a/cde/programs/dtcm/dtcm/MonthPanel.c b/cde/programs/dtcm/dtcm/MonthPanel.c index 5154e3d1..210b9fa0 100644 --- a/cde/programs/dtcm/dtcm/MonthPanel.c +++ b/cde/programs/dtcm/dtcm/MonthPanel.c @@ -70,7 +70,7 @@ #define XOS_USE_XT_LOCKING #define X_INCLUDE_TIME_H -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/dtcm/RFCMIME.c b/cde/programs/dtcm/dtcm/RFCMIME.c index fd2b18ac..bfc6bd18 100644 --- a/cde/programs/dtcm/dtcm/RFCMIME.c +++ b/cde/programs/dtcm/dtcm/RFCMIME.c @@ -57,7 +57,7 @@ static char sccsid[] = "$TOG: RFCMIME.c /main/11 1999/06/30 12:08:55 mgreess $"; #include /* Iconv not defined for linux. Use the EUSCompat stubs instead. */ -#if !defined(linux) +#if !defined(__linux__) # include #endif #include diff --git a/cde/programs/dtcm/dtcm/calendarA.c b/cde/programs/dtcm/dtcm/calendarA.c index c14ef6d5..8e73e752 100644 --- a/cde/programs/dtcm/dtcm/calendarA.c +++ b/cde/programs/dtcm/dtcm/calendarA.c @@ -132,7 +132,7 @@ static char sccsid[] = "@(#)calendarA.c 1.196 95/04/12 Copyr 1991 Sun Microsyst #include "cmtt.h" #endif -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/dtcm/cm_i18n.c b/cde/programs/dtcm/dtcm/cm_i18n.c index 75a3c279..dbb7beda 100644 --- a/cde/programs/dtcm/dtcm/cm_i18n.c +++ b/cde/programs/dtcm/dtcm/cm_i18n.c @@ -71,7 +71,7 @@ should be fixed in the future. #include /* Iconv not defined for linux. Use the EUSCompat stubs instead. */ -#if !defined(linux) +#if !defined(__linux__) # include #endif #include diff --git a/cde/programs/dtcm/dtcm/dayglance.c b/cde/programs/dtcm/dtcm/dayglance.c index ff3e79e8..294ff0c7 100644 --- a/cde/programs/dtcm/dtcm/dayglance.c +++ b/cde/programs/dtcm/dtcm/dayglance.c @@ -81,7 +81,7 @@ static char sccsid[] = "@(#)dayglance.c 1.76 95/04/24 Copyr 1991 Sun Microsystem #define XOS_USE_XT_LOCKING #define X_INCLUDE_TIME_H -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/dtcm/dnd.c b/cde/programs/dtcm/dtcm/dnd.c index 903d4623..8c71090f 100644 --- a/cde/programs/dtcm/dtcm/dnd.c +++ b/cde/programs/dtcm/dtcm/dnd.c @@ -72,7 +72,7 @@ static Bool lookForButton(Display *, XEvent *, XPointer); -#if !defined(linux) && !defined(CSRG_BASED) +#if !defined(__linux__) && !defined(CSRG_BASED) extern char *sys_errlist[]; #endif diff --git a/cde/programs/dtcm/dtcm/find.c b/cde/programs/dtcm/dtcm/find.c index f5c5d980..0db05d87 100644 --- a/cde/programs/dtcm/dtcm/find.c +++ b/cde/programs/dtcm/dtcm/find.c @@ -60,7 +60,7 @@ #define XOS_USE_XT_LOCKING #define X_INCLUDE_TIME_H -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/dtcm/format.c b/cde/programs/dtcm/dtcm/format.c index 360ec0fa..46735472 100644 --- a/cde/programs/dtcm/dtcm/format.c +++ b/cde/programs/dtcm/dtcm/format.c @@ -69,7 +69,7 @@ static char sccsid[] = "@(#)format.c 1.27 95/01/19 Copyr 1991 Sun Microsystems, #define XOS_USE_XT_LOCKING #define X_INCLUDE_TIME_H -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/dtcm/monthglance.c b/cde/programs/dtcm/dtcm/monthglance.c index efa4c2d4..cc3134b7 100644 --- a/cde/programs/dtcm/dtcm/monthglance.c +++ b/cde/programs/dtcm/dtcm/monthglance.c @@ -102,7 +102,7 @@ static char sccsid[] = "@(#)monthglance.c 1.82 95/07/27 Copyr 1994 Sun Microsys #define XOS_USE_XT_LOCKING #define X_INCLUDE_TIME_H -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/dtcm/tempbr.c b/cde/programs/dtcm/dtcm/tempbr.c index 5d01ce07..ac46eb0c 100644 --- a/cde/programs/dtcm/dtcm/tempbr.c +++ b/cde/programs/dtcm/dtcm/tempbr.c @@ -89,7 +89,7 @@ static char sccsid[] = "@(#)tempbr.c 1.48 95/03/28 Copyr 1991 Sun Microsystems, static void tb_cancel_cb(); static void tb_close_cb(); static void tempbr_show_cb(Widget w, XtPointer data, XtPointer cbs); -#if defined(linux) +#if defined(__linux__) #include #else extern char *strdup(const char *); diff --git a/cde/programs/dtcm/dtcm/weekglance.c b/cde/programs/dtcm/dtcm/weekglance.c index 355fcb2f..8fe06bcf 100644 --- a/cde/programs/dtcm/dtcm/weekglance.c +++ b/cde/programs/dtcm/dtcm/weekglance.c @@ -78,7 +78,7 @@ #define XOS_USE_XT_LOCKING #define X_INCLUDE_TIME_H -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/dtcm/x_graphics.c b/cde/programs/dtcm/dtcm/x_graphics.c index 32a08dc2..130d69fd 100644 --- a/cde/programs/dtcm/dtcm/x_graphics.c +++ b/cde/programs/dtcm/dtcm/x_graphics.c @@ -70,7 +70,7 @@ #define XOS_USE_XT_LOCKING #define X_INCLUDE_TIME_H -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/dtcm/yearglance.c b/cde/programs/dtcm/dtcm/yearglance.c index f3872a12..fc5107d1 100644 --- a/cde/programs/dtcm/dtcm/yearglance.c +++ b/cde/programs/dtcm/dtcm/yearglance.c @@ -88,7 +88,7 @@ static char sccsid[] = "@(#)yearglance.c 1.37 95/07/27 Copyr 1991 Sun Microsyste #define XOS_USE_XT_LOCKING #define X_INCLUDE_TIME_H -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/libDtCmP/timeops.c b/cde/programs/dtcm/libDtCmP/timeops.c index 561f891a..1b3df8dc 100644 --- a/cde/programs/dtcm/libDtCmP/timeops.c +++ b/cde/programs/dtcm/libDtCmP/timeops.c @@ -58,11 +58,11 @@ static char sccsid[] = "@(#)timeops.c 1.13 95/05/02 Copyr 1991 Sun Microsystems, #define XOS_USE_NO_LOCKING #define X_INCLUDE_TIME_H -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include -#if defined(linux) +#if defined(__linux__) #define SVR4 #endif diff --git a/cde/programs/dtcm/libDtCmP/util.c b/cde/programs/dtcm/libDtCmP/util.c index 67490123..33d72743 100644 --- a/cde/programs/dtcm/libDtCmP/util.c +++ b/cde/programs/dtcm/libDtCmP/util.c @@ -69,7 +69,7 @@ #define X_INCLUDE_STRING_H #define X_INCLUDE_TIME_H #define XOS_USE_NO_LOCKING -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/server/garbage.c b/cde/programs/dtcm/server/garbage.c index cb3309a2..6a29d6bd 100644 --- a/cde/programs/dtcm/server/garbage.c +++ b/cde/programs/dtcm/server/garbage.c @@ -35,7 +35,7 @@ #include #define XOS_USE_NO_LOCKING #define X_INCLUDE_TIME_H -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/server/lexit.c b/cde/programs/dtcm/server/lexit.c index 04184ed8..a59393b3 100644 --- a/cde/programs/dtcm/server/lexit.c +++ b/cde/programs/dtcm/server/lexit.c @@ -428,7 +428,7 @@ setinput (FILE* f) return(-1); } -#if !defined(linux) +#if !defined(__linux__) /* no madvise so we lose this optimization */ madvise(start_of_mmapped_area, len, MADV_SEQUENTIAL); #endif diff --git a/cde/programs/dtcm/server/log.c b/cde/programs/dtcm/server/log.c index a9e77cdd..dc1da3c6 100644 --- a/cde/programs/dtcm/server/log.c +++ b/cde/programs/dtcm/server/log.c @@ -39,7 +39,7 @@ #include #define XOS_USE_NO_LOCKING #define X_INCLUDE_TIME_H -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/server/parser.y b/cde/programs/dtcm/server/parser.y index 7988a592..0b8646f5 100644 --- a/cde/programs/dtcm/server/parser.y +++ b/cde/programs/dtcm/server/parser.y @@ -12,7 +12,7 @@ #include #include #include -#if (defined(sun) && defined(_XOPEN_SOURCE)) || defined(linux) +#if (defined(sun) && defined(_XOPEN_SOURCE)) || defined(__linux__) #include #endif #include "csa.h" diff --git a/cde/programs/dtcm/server/reclotick.c b/cde/programs/dtcm/server/reclotick.c index 9f689976..a76831fc 100644 --- a/cde/programs/dtcm/server/reclotick.c +++ b/cde/programs/dtcm/server/reclotick.c @@ -30,7 +30,7 @@ #define XOS_USE_NO_LOCKING #define X_INCLUDE_TIME_H -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/server/recount.c b/cde/programs/dtcm/server/recount.c index c7d731b0..01abd3c0 100644 --- a/cde/programs/dtcm/server/recount.c +++ b/cde/programs/dtcm/server/recount.c @@ -30,7 +30,7 @@ #define XOS_USE_NO_LOCKING #define X_INCLUDE_TIME_H -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/server/relasttick.c b/cde/programs/dtcm/server/relasttick.c index 6bfc4999..dae6478b 100644 --- a/cde/programs/dtcm/server/relasttick.c +++ b/cde/programs/dtcm/server/relasttick.c @@ -30,7 +30,7 @@ #define XOS_USE_NO_LOCKING #define X_INCLUDE_TIME_H -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/server/renexttick.c b/cde/programs/dtcm/server/renexttick.c index f15c5b73..f3c7a57c 100644 --- a/cde/programs/dtcm/server/renexttick.c +++ b/cde/programs/dtcm/server/renexttick.c @@ -31,7 +31,7 @@ #define XOS_USE_NO_LOCKING #define X_INCLUDE_TIME_H -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/server/repeat.c b/cde/programs/dtcm/server/repeat.c index d9a04a44..e0b56725 100644 --- a/cde/programs/dtcm/server/repeat.c +++ b/cde/programs/dtcm/server/repeat.c @@ -32,7 +32,7 @@ #include #define XOS_USE_NO_LOCKING #define X_INCLUDE_TIME_H -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/server/reprevtick.c b/cde/programs/dtcm/server/reprevtick.c index 5702313b..3f2fc291 100644 --- a/cde/programs/dtcm/server/reprevtick.c +++ b/cde/programs/dtcm/server/reprevtick.c @@ -30,7 +30,7 @@ #define XOS_USE_NO_LOCKING #define X_INCLUDE_TIME_H -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/server/reutil.c b/cde/programs/dtcm/server/reutil.c index 738d2f76..dfc0fc2f 100644 --- a/cde/programs/dtcm/server/reutil.c +++ b/cde/programs/dtcm/server/reutil.c @@ -37,7 +37,7 @@ #define XOS_USE_NO_LOCKING #define X_INCLUDE_TIME_H -#if defined(linux) +#if defined(__linux__) #undef SVR4 #endif #include diff --git a/cde/programs/dtcm/server/svcmain.c b/cde/programs/dtcm/server/svcmain.c index b7c08f40..e4b32985 100644 --- a/cde/programs/dtcm/server/svcmain.c +++ b/cde/programs/dtcm/server/svcmain.c @@ -28,7 +28,7 @@ * (c) Copyright 1993, 1994 Sun Microsystems, Inc. */ -#if defined(linux) +#if defined(__linux__) #define _POSIX_C_SOURCE 2 #endif @@ -493,7 +493,7 @@ init_alarm() extern void garbage_collect(); extern void debug_switch(); -#if defined(SVR4) && !defined(linux) +#if defined(SVR4) && !defined(__linux__) extern void (*sigset(int, void (*)(int)))(int); sigset(SIGUSR1, garbage_collect); sigset(SIGALRM, garbage_collect); @@ -695,7 +695,7 @@ main(int argc, char **argv) if (udp_transp == (SVCXPRT *)-1) { udp_transp = svcudp_create(standalone ? RPC_ANYSOCK : 0 -#if defined(_AIX) || defined(hpV4) || defined(linux) || defined(CSRG_BASED) +#if defined(_AIX) || defined(hpV4) || defined(__linux__) || defined(CSRG_BASED) ); #else ,0,0); diff --git a/cde/programs/dtcm/server/utility.c b/cde/programs/dtcm/server/utility.c index 7fc63d46..3bf5bf37 100644 --- a/cde/programs/dtcm/server/utility.c +++ b/cde/programs/dtcm/server/utility.c @@ -41,7 +41,7 @@ #include "utility.h" #include "lutil.h" -#if !defined(linux) +#if !defined(__linux__) extern char * strdup(const char *); #endif diff --git a/cde/programs/dtcreate/af_aux.c b/cde/programs/dtcreate/af_aux.c index c1705fa2..f5ebf2d2 100644 --- a/cde/programs/dtcreate/af_aux.c +++ b/cde/programs/dtcreate/af_aux.c @@ -48,7 +48,7 @@ #if defined(AIXV3) # include #else -# if defined(linux) +# if defined(__linux__) # include # else # include diff --git a/cde/programs/dtcreate/ca_aux.c b/cde/programs/dtcreate/ca_aux.c index 0088089e..da86b97a 100644 --- a/cde/programs/dtcreate/ca_aux.c +++ b/cde/programs/dtcreate/ca_aux.c @@ -48,7 +48,7 @@ #if defined(AIXV3) # include #else -# if defined(linux) +# if defined(__linux__) # include # else # include diff --git a/cde/programs/dtdocbook/tcl/tclMtherr.c b/cde/programs/dtdocbook/tcl/tclMtherr.c index a553b2bc..b92b84c9 100644 --- a/cde/programs/dtdocbook/tcl/tclMtherr.c +++ b/cde/programs/dtdocbook/tcl/tclMtherr.c @@ -65,7 +65,7 @@ extern int tcl_MathInProgress; * that don't really support it. The compiled procedure is bogus, * but it will never be executed on these systems anyway. */ -#if defined(linux) && defined(__GLIBC__) +#if defined(__linux__) && defined(__GLIBC__) # include /* glibc removed matherr() support between 2.26 and 2.27 */ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 27) || __GLIBC__ >= 3 diff --git a/cde/programs/dtexec/Main.c b/cde/programs/dtexec/Main.c index c1701b15..987710e7 100644 --- a/cde/programs/dtexec/Main.c +++ b/cde/programs/dtexec/Main.c @@ -323,7 +323,7 @@ Help( *****************************************************************************/ static void -#if defined(__aix) || defined(CSRG_BASED) || defined(linux) +#if defined(__aix) || defined(CSRG_BASED) || defined(__linux__) PanicSignal(int s) #else PanicSignal(void) @@ -360,7 +360,7 @@ PanicSignal(void) *****************************************************************************/ static void -#if defined(__aix) || defined(CSRG_BASED) || defined(linux) +#if defined(__aix) || defined(CSRG_BASED) || defined(__linux__) IgnoreSignal(int i) #else IgnoreSignal(void) @@ -402,7 +402,7 @@ IgnoreSignal(void) *****************************************************************************/ static void -#if defined(__aix) || defined(CSRG_BASED) || defined(linux) +#if defined(__aix) || defined(CSRG_BASED) || defined(__linux__) UrgentSignal(int i) #else UrgentSignal(void) @@ -453,7 +453,7 @@ UrgentSignal(void) * *****************************************************************************/ static void -#if defined(__aix) || defined(CSRG_BASED) || defined(linux) +#if defined(__aix) || defined(CSRG_BASED) || defined(__linux__) SigCld(int i) #else SigCld(void) @@ -1295,7 +1295,7 @@ main ( COPYBITS(allactivefdsG, readfds); COPYBITS(allactivefdsG, exceptfds); -#if defined(linux) +#if defined(__linux__) /* JET 9/1/98 - linux select will actually modify the timeout struct - * if a select exits early then the timeout struct will contain the * amount remaining. When this gets to 0,0, an infinite loop @@ -1539,7 +1539,7 @@ main ( * a SIGCLD, give up and exit. */ if (rediscoverUrgentSigG > ((1000/SHORT_SELECT_TIMEOUT)*5) ) { -#if defined(__aix) || defined(CSRG_BASED) || defined(linux) +#if defined(__aix) || defined(CSRG_BASED) || defined(__linux__) PanicSignal(0); #else PanicSignal(); diff --git a/cde/programs/dtfile/FileManip.c b/cde/programs/dtfile/FileManip.c index b5648dc7..e7771c77 100644 --- a/cde/programs/dtfile/FileManip.c +++ b/cde/programs/dtfile/FileManip.c @@ -55,7 +55,7 @@ # include # define ROOTINO UFSROOTINO #else -# if defined(linux) || defined(CSRG_BASED) +# if defined(__linux__) || defined(CSRG_BASED) # define ROOTINO 2 # endif # include @@ -975,7 +975,7 @@ FileManip( if (lstat (to, &s2) >= 0) /* exists */ { if ((stat (to, &s3) >= 0) && -#if defined(__ultrix) || defined(linux) || \ +#if defined(__ultrix) || defined(__linux__) || \ defined(CSRG_BASED) (((s3.st_mode & S_IFMT) == S_IFDIR) /* if is a directory */ || ((s3.st_mode & S_IFMT) == S_IFSOCK)) ) /* or a net special */ diff --git a/cde/programs/dtfile/Find.c b/cde/programs/dtfile/Find.c index fec22037..71fb94bb 100644 --- a/cde/programs/dtfile/Find.c +++ b/cde/programs/dtfile/Find.c @@ -1821,7 +1821,7 @@ ExecuteFind( if (access_priv == -1 && geteuid() != root_user) { #else -# if defined(__ultrix) || defined(linux) || defined(CSRG_BASED) +# if defined(__ultrix) || defined(__linux__) || defined(CSRG_BASED) rv = setreuid(geteuid(),-1); if (access ((char *) path, R_OK) == -1) { diff --git a/cde/programs/dtfile/dtcopy/sharedFuncs.c b/cde/programs/dtfile/dtcopy/sharedFuncs.c index 202b885a..b3a0e951 100644 --- a/cde/programs/dtfile/dtcopy/sharedFuncs.c +++ b/cde/programs/dtfile/dtcopy/sharedFuncs.c @@ -49,7 +49,7 @@ # define ROOTINO UFSROOTINO #endif /* SVR4 */ -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) # include # define ROOTINO 2 #endif diff --git a/cde/programs/dthelp/dthelpprint/PrintTopics.c b/cde/programs/dthelp/dthelpprint/PrintTopics.c index ef7cad9b..ecc77c8d 100644 --- a/cde/programs/dthelp/dthelpprint/PrintTopics.c +++ b/cde/programs/dthelp/dthelpprint/PrintTopics.c @@ -54,7 +54,7 @@ $COPYRIGHT$: #endif /* Iconv not defined for linux. Use the EUSCompat stubs instead. */ -#if !defined(linux) +#if !defined(__linux__) # include #else # include diff --git a/cde/programs/dthelp/parser.ccdf/htag/helptag/global.h b/cde/programs/dthelp/parser.ccdf/htag/helptag/global.h index 6f6ce4b5..fed44389 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/helptag/global.h +++ b/cde/programs/dthelp/parser.ccdf/htag/helptag/global.h @@ -42,7 +42,7 @@ #endif #include -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) #include #include #endif @@ -162,7 +162,7 @@ EXTERN char driver[20] #if defined(_AIX) INIT("AIX") #endif -#if defined(linux) +#if defined(__linux__) INIT("LINUX") #endif #if defined(sun) diff --git a/cde/programs/dthelp/parser.ccdf/htag/helptag/help.c b/cde/programs/dthelp/parser.ccdf/htag/helptag/help.c index 7a2f0e93..119472e7 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/helptag/help.c +++ b/cde/programs/dthelp/parser.ccdf/htag/helptag/help.c @@ -151,7 +151,7 @@ void basename(M_NOPAR) *p = save; #else -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) #define CONTRIB "/usr/hphelp/bin/" /* get our path if we can */ @@ -996,7 +996,7 @@ int mb_getqualified ( qualname, unqualname ) char *qualname; char *unqualname; { -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) FILE *f; #endif char fn[FNAMELEN]; @@ -1020,7 +1020,7 @@ else fnp = fn; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) qualname[0] = '\0'; gp = qualname + strlen(qualname); roomleft = roomleft - strlen(qualname); @@ -1134,7 +1134,7 @@ do { while (1); *strrchr(qualname, CSEP) = '\0'; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) #else strupr ( qualname ); #endif @@ -2249,7 +2249,7 @@ while (name = m_cyclent(init, &type, &content, &wheredef)) #if defined(MSDOS) m_openchk(&nullfile, "NUL", "w"); #else -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) m_openchk(&nullfile, "/dev/null", "w"); #else m_openchk(&nullfile, "nullfile", "w"); diff --git a/cde/programs/dthelp/parser/canon1/helptag/global.h b/cde/programs/dthelp/parser/canon1/helptag/global.h index 976f366f..e45c0465 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/global.h +++ b/cde/programs/dthelp/parser/canon1/helptag/global.h @@ -43,7 +43,7 @@ #endif #include -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) #include #include #include @@ -178,7 +178,7 @@ EXTERN char dirsep #if defined(MSDOS) INIT('\\') #else -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) INIT('/') #else ****define directory separator here**** @@ -186,7 +186,7 @@ INIT('/') #endif ; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) #define CSEP '/' #define SSEP "/" #else diff --git a/cde/programs/dthelp/parser/canon1/helptag/help.c b/cde/programs/dthelp/parser/canon1/helptag/help.c index d1d98ea9..effe233f 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/help.c +++ b/cde/programs/dthelp/parser/canon1/helptag/help.c @@ -357,7 +357,7 @@ char *qualname; char *unqualname; #endif { -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) FILE *f; #endif @@ -382,7 +382,7 @@ else fnp = fn; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) qualname[0] = '\0'; gp = qualname + strlen(qualname); roomleft = roomleft - strlen(qualname); @@ -496,7 +496,7 @@ do { while (1); *strrchr(qualname, CSEP) = '\0'; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) #else strupr ( qualname ); #endif diff --git a/cde/programs/dthelp/parser/canon1/parser/parser.c b/cde/programs/dthelp/parser/canon1/parser/parser.c index 95f2f807..754021cf 100644 --- a/cde/programs/dthelp/parser/canon1/parser/parser.c +++ b/cde/programs/dthelp/parser/canon1/parser/parser.c @@ -44,7 +44,7 @@ int main(argc, argv) { M_WCHAR *wc_userdef; -#if defined(linux) +#if defined(__linux__) m_outfile = stdout; m_errfile = stderr; #endif @@ -90,7 +90,7 @@ static char sopt[] = static char name[] = "m_name = '%s'\n" ; static char literal[] = "m_literal = '%s'\n" ; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) char buffer[M_LITLEN + 80] ; #else #define max4(a,b,c,d) (a>b&&a>c&&a>d) ? a : ((b>c&&b>d) ? b : (c>d ? c : d)) diff --git a/cde/programs/dthelp/parser/canon1/parser/parser.h b/cde/programs/dthelp/parser/canon1/parser/parser.h index 4a9a8ca3..7fb21668 100644 --- a/cde/programs/dthelp/parser/canon1/parser/parser.h +++ b/cde/programs/dthelp/parser/canon1/parser/parser.h @@ -439,7 +439,7 @@ M_PAREXTERN int m_argc ; M_PAREXTERN char **m_argv ; /* PARSER output file */ -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) M_PAREXTERN FILE *m_outfile; M_PAREXTERN FILE *m_errfile; #else diff --git a/cde/programs/dthelp/parser/pass1/helptag/help.c b/cde/programs/dthelp/parser/pass1/helptag/help.c index c2d4717b..e01c96f5 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/help.c +++ b/cde/programs/dthelp/parser/pass1/helptag/help.c @@ -357,7 +357,7 @@ char *qualname; char *unqualname; #endif { -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) FILE *f; #endif char fn[FNAMELEN]; @@ -381,7 +381,7 @@ else fnp = fn; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) qualname[0] = '\0'; gp = qualname + strlen(qualname); roomleft = roomleft - strlen(qualname); @@ -495,7 +495,7 @@ do { while (1); *strrchr(qualname, CSEP) = '\0'; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) #else strupr ( qualname ); #endif diff --git a/cde/programs/dthelp/parser/pass1/parser/parser.c b/cde/programs/dthelp/parser/pass1/parser/parser.c index 70e51b67..9c766429 100644 --- a/cde/programs/dthelp/parser/pass1/parser/parser.c +++ b/cde/programs/dthelp/parser/pass1/parser/parser.c @@ -45,7 +45,7 @@ int main(argc, argv) "prevcon=%d,token=%d,curcon=%d,scanval='%c'(%d),line=%d,netlevel=%d\n" ; static char name[] = "m_name = '%s'\n" ; static char literal[] = "m_literal = '%s'\n" ; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) char buffer[M_LITLEN + 80] ; #else #define max4(a,b,c,d) (a>b&&a>c&&a>d) ? a : ((b>c&&b>d) ? b : (c>d ? c : d)) @@ -55,7 +55,7 @@ int main(argc, argv) sizeof(literal) + M_LITLEN - 2)] ; #endif -#if defined(linux) +#if defined(__linux__) m_outfile = stdout; m_errfile = stderr; #endif diff --git a/cde/programs/dthelp/parser/pass1/parser/parser.h b/cde/programs/dthelp/parser/pass1/parser/parser.h index f96602b5..b431484f 100644 --- a/cde/programs/dthelp/parser/pass1/parser/parser.h +++ b/cde/programs/dthelp/parser/pass1/parser/parser.h @@ -437,7 +437,7 @@ M_PAREXTERN int m_argc ; M_PAREXTERN char **m_argv ; /* PARSER output file */ -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) M_PAREXTERN FILE *m_outfile; M_PAREXTERN FILE *m_errfile; #else diff --git a/cde/programs/dthelp/parser/pass2/htag2/global.h b/cde/programs/dthelp/parser/pass2/htag2/global.h index b1bf2ea6..8630de93 100644 --- a/cde/programs/dthelp/parser/pass2/htag2/global.h +++ b/cde/programs/dthelp/parser/pass2/htag2/global.h @@ -43,7 +43,7 @@ #endif #include -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) #include #include #include diff --git a/cde/programs/dthelp/parser/pass2/htag2/sdl.c b/cde/programs/dthelp/parser/pass2/htag2/sdl.c index 847ec0bf..c07eb20e 100644 --- a/cde/programs/dthelp/parser/pass2/htag2/sdl.c +++ b/cde/programs/dthelp/parser/pass2/htag2/sdl.c @@ -26,13 +26,13 @@ #include #include -#if defined(linux) +#if defined(__linux__) # include #endif #include -#if defined(linux) +#if defined(__linux__) #include #endif diff --git a/cde/programs/dthelp/parser/pass2/parser/parser.c b/cde/programs/dthelp/parser/pass2/parser/parser.c index 79d619e1..fcfb86ab 100644 --- a/cde/programs/dthelp/parser/pass2/parser/parser.c +++ b/cde/programs/dthelp/parser/pass2/parser/parser.c @@ -55,7 +55,7 @@ void main(argc, argv) sizeof(literal) + M_LITLEN - 2)] ; #endif -#if defined(linux) +#if defined(__linux__) m_outfile = stdout; m_errfile = stderr; #endif diff --git a/cde/programs/dthelp/parser/pass2/parser/parser.h b/cde/programs/dthelp/parser/pass2/parser/parser.h index 64125abf..5636b148 100644 --- a/cde/programs/dthelp/parser/pass2/parser/parser.h +++ b/cde/programs/dthelp/parser/pass2/parser/parser.h @@ -437,7 +437,7 @@ M_PAREXTERN int m_argc ; M_PAREXTERN char **m_argv ; /* PARSER output file */ -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) M_PAREXTERN FILE *m_outfile; M_PAREXTERN FILE *m_errfile; #else diff --git a/cde/programs/dticon/constants.h b/cde/programs/dticon/constants.h index 68641756..22115f9e 100644 --- a/cde/programs/dticon/constants.h +++ b/cde/programs/dticon/constants.h @@ -97,7 +97,7 @@ typedef struct { #define min(a, b) ((a < b) ? a : b) #define max(a, b) ((a > b) ? a : b) #ifndef abs -#if !defined(linux) +#if !defined(__linux__) #define abs(a) (((a) < 0) ? -(a) : (a)) #endif #endif diff --git a/cde/programs/dtimsstart/remote.c b/cde/programs/dtimsstart/remote.c index 10985cfb..ffce2447 100644 --- a/cde/programs/dtimsstart/remote.c +++ b/cde/programs/dtimsstart/remote.c @@ -37,7 +37,7 @@ #include /* for X_ChangeHosts */ #include /* for XA_STRING */ -#if !defined(linux) && !defined(CSRG_BASED) +#if !defined(__linux__) && !defined(CSRG_BASED) extern char *sys_errlist[]; #endif diff --git a/cde/programs/dtimsstart/start.c b/cde/programs/dtimsstart/start.c index d72fe4a6..a1d60a85 100644 --- a/cde/programs/dtimsstart/start.c +++ b/cde/programs/dtimsstart/start.c @@ -28,11 +28,11 @@ #include #include -#if (defined(linux) || defined(CSRG_BASED)) && !defined(_NFILE) +#if (defined(__linux__) || defined(CSRG_BASED)) && !defined(_NFILE) #define _NFILE FOPEN_MAX #endif -#if !defined(linux) && !defined(CSRG_BASED) +#if !defined(__linux__) && !defined(CSRG_BASED) extern char *sys_errlist[]; extern int sys_nerr; #endif diff --git a/cde/programs/dtinfo/DtMmdb/StyleSheet/DocParser.C b/cde/programs/dtinfo/DtMmdb/StyleSheet/DocParser.C index 02169a49..91d8af7e 100644 --- a/cde/programs/dtinfo/DtMmdb/StyleSheet/DocParser.C +++ b/cde/programs/dtinfo/DtMmdb/StyleSheet/DocParser.C @@ -242,12 +242,12 @@ DocParser::process(istream &input, ostringstream &output, break; case AttributeSection: { -#if !defined(SC3) && !defined(_IBMR2) && !defined(linux) && \ +#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \ !defined(CSRG_BASED) && !defined(sun) volatile #endif AttributeList *attrs = 0; -#if !defined(SC3) && !defined(_IBMR2) && !defined(linux) && \ +#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \ !defined(CSRG_BASED) && !defined(sun) volatile #endif diff --git a/cde/programs/dtinfo/DtMmdb/StyleSheet/Expression.C b/cde/programs/dtinfo/DtMmdb/StyleSheet/Expression.C index 5f2130e4..e85a1167 100644 --- a/cde/programs/dtinfo/DtMmdb/StyleSheet/Expression.C +++ b/cde/programs/dtinfo/DtMmdb/StyleSheet/Expression.C @@ -141,17 +141,17 @@ BinaryOperatorNode::evaluate() const { // calculate children trees and then have feature value do the operation -#if !defined(SC3) && !defined(_IBMR2) && !defined(linux) && \ +#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \ !defined(CSRG_BASED) && !defined(sun) volatile #endif FeatureValue *left = 0; -#if !defined(SC3) && !defined(_IBMR2) && !defined(linux) && \ +#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \ !defined(CSRG_BASED) && !defined(sun) volatile #endif FeatureValue *right = 0; -#if !defined(SC3) && !defined(_IBMR2) && !defined(linux) && \ +#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \ !defined(CSRG_BASED) && !defined(sun) volatile #endif diff --git a/cde/programs/dtinfo/DtMmdb/StyleSheet/defToken.C b/cde/programs/dtinfo/DtMmdb/StyleSheet/defToken.C index e5842b15..f2fe08ec 100644 --- a/cde/programs/dtinfo/DtMmdb/StyleSheet/defToken.C +++ b/cde/programs/dtinfo/DtMmdb/StyleSheet/defToken.C @@ -43,7 +43,7 @@ #include -#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #include #endif diff --git a/cde/programs/dtinfo/DtMmdb/StyleSheet/tokenStyle.C b/cde/programs/dtinfo/DtMmdb/StyleSheet/tokenStyle.C index 25ace323..d2238a69 100644 --- a/cde/programs/dtinfo/DtMmdb/StyleSheet/tokenStyle.C +++ b/cde/programs/dtinfo/DtMmdb/StyleSheet/tokenStyle.C @@ -43,7 +43,7 @@ #include -#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #include #endif diff --git a/cde/programs/dtinfo/DtMmdb/btree_berkeley/compat.h b/cde/programs/dtinfo/DtMmdb/btree_berkeley/compat.h index 251d1468..48de3616 100644 --- a/cde/programs/dtinfo/DtMmdb/btree_berkeley/compat.h +++ b/cde/programs/dtinfo/DtMmdb/btree_berkeley/compat.h @@ -89,7 +89,7 @@ typedef unsigned int sigset_t; * If your system's vsnprintf returns a char *, not an int, * change the 0 to a 1. */ -#if !defined(_AIX) && !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(_AIX) && !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #define VSPRINTF_CHARSTAR #endif diff --git a/cde/programs/dtinfo/DtMmdb/compression/ps.C b/cde/programs/dtinfo/DtMmdb/compression/ps.C index 17a91551..5a09ab53 100644 --- a/cde/programs/dtinfo/DtMmdb/compression/ps.C +++ b/cde/programs/dtinfo/DtMmdb/compression/ps.C @@ -43,7 +43,7 @@ #include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/dtinfo/DtMmdb/compression/sgml.C b/cde/programs/dtinfo/DtMmdb/compression/sgml.C index 31004620..a06a0147 100644 --- a/cde/programs/dtinfo/DtMmdb/compression/sgml.C +++ b/cde/programs/dtinfo/DtMmdb/compression/sgml.C @@ -43,7 +43,7 @@ #include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/dtinfo/DtMmdb/dti_excs/Destructable_il.hh b/cde/programs/dtinfo/DtMmdb/dti_excs/Destructable_il.hh index d86d215b..3c189913 100644 --- a/cde/programs/dtinfo/DtMmdb/dti_excs/Destructable_il.hh +++ b/cde/programs/dtinfo/DtMmdb/dti_excs/Destructable_il.hh @@ -102,7 +102,7 @@ Destructable::~Destructable() inline void Destructable::destruct() { -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) delete this; #else // Have to call this here since some compilers don't allow diff --git a/cde/programs/dtinfo/DtMmdb/dti_excs/Exception.hh b/cde/programs/dtinfo/DtMmdb/dti_excs/Exception.hh index 9e7fbd5f..726970c8 100644 --- a/cde/programs/dtinfo/DtMmdb/dti_excs/Exception.hh +++ b/cde/programs/dtinfo/DtMmdb/dti_excs/Exception.hh @@ -38,7 +38,7 @@ public: #else Exception(); -#if defined(linux) && defined(EXC_DEBUG) +#if defined(__linux__) && defined(EXC_DEBUG) ~Exception() { PRINTF (("Destroying Exception @ %p\n", this)); diff --git a/cde/programs/dtinfo/DtMmdb/schema/token.C b/cde/programs/dtinfo/DtMmdb/schema/token.C index 3d217d58..9b3b2c2d 100644 --- a/cde/programs/dtinfo/DtMmdb/schema/token.C +++ b/cde/programs/dtinfo/DtMmdb/schema/token.C @@ -43,7 +43,7 @@ #include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/dtinfo/DtMmdb/utility/filebuf.C b/cde/programs/dtinfo/DtMmdb/utility/filebuf.C index a59b5741..a0395d7f 100644 --- a/cde/programs/dtinfo/DtMmdb/utility/filebuf.C +++ b/cde/programs/dtinfo/DtMmdb/utility/filebuf.C @@ -26,7 +26,7 @@ #include #include -#if !defined(hpux) && !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(hpux) && !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #include #endif diff --git a/cde/programs/dtinfo/DtMmdb/utility/funcs.C b/cde/programs/dtinfo/DtMmdb/utility/funcs.C index 18b1f02a..c32478b6 100644 --- a/cde/programs/dtinfo/DtMmdb/utility/funcs.C +++ b/cde/programs/dtinfo/DtMmdb/utility/funcs.C @@ -59,7 +59,7 @@ #include #endif -#if defined(linux) +#if defined(__linux__) #include #include #elif defined(_AIX) diff --git a/cde/programs/dtinfo/DtMmdb/utility/funcs.h b/cde/programs/dtinfo/DtMmdb/utility/funcs.h index a874151a..9efeecef 100644 --- a/cde/programs/dtinfo/DtMmdb/utility/funcs.h +++ b/cde/programs/dtinfo/DtMmdb/utility/funcs.h @@ -52,11 +52,11 @@ #ifndef _funcs_h #define _funcs_h 1 -#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #include #endif #if defined(hpux) || defined(sgi) || \ - defined(linux) || defined(CSRG_BASED) || defined(sun) + defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/dtinfo/DtMmdb/utility/streambuf.C b/cde/programs/dtinfo/DtMmdb/utility/streambuf.C index 35ce8eaa..959b6241 100644 --- a/cde/programs/dtinfo/DtMmdb/utility/streambuf.C +++ b/cde/programs/dtinfo/DtMmdb/utility/streambuf.C @@ -23,7 +23,7 @@ /* $XConsortium: streambuf.C /main/8 1996/08/21 15:55:14 drk $ */ #include "utility/c_streambuf.h" -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/dtinfo/DtMmdb/utility/types.h b/cde/programs/dtinfo/DtMmdb/utility/types.h index 487a07ed..b7ab5860 100644 --- a/cde/programs/dtinfo/DtMmdb/utility/types.h +++ b/cde/programs/dtinfo/DtMmdb/utility/types.h @@ -79,7 +79,7 @@ typedef void (*print_func_ptr_t)(ostream&, const void*); //enum Boolean { true, false }; -#if !defined(linux) && !defined(CSRG_BASED) +#if !defined(__linux__) && !defined(CSRG_BASED) typedef long mmdb_pos_t; #else typedef int mmdb_pos_t; diff --git a/cde/programs/dtinfo/dtinfo/src/Basic/BitField.hh b/cde/programs/dtinfo/dtinfo/src/Basic/BitField.hh index fdaafcc9..aee1c62a 100644 --- a/cde/programs/dtinfo/dtinfo/src/Basic/BitField.hh +++ b/cde/programs/dtinfo/dtinfo/src/Basic/BitField.hh @@ -46,7 +46,7 @@ * Campbell, CA 95008 * */ -#if defined(SVR4) || defined(hpux) || defined(linux) || defined(__NetBSD__) +#if defined(SVR4) || defined(hpux) || defined(__linux__) || defined(__NetBSD__) #include #else #include diff --git a/cde/programs/dtinfo/dtinfo/src/Other/WindowSystemMotif.C b/cde/programs/dtinfo/dtinfo/src/Other/WindowSystemMotif.C index b8f69c8f..ad5acc24 100644 --- a/cde/programs/dtinfo/dtinfo/src/Other/WindowSystemMotif.C +++ b/cde/programs/dtinfo/dtinfo/src/Other/WindowSystemMotif.C @@ -171,7 +171,7 @@ static unsigned char anno_double_bits[] = { 0x0a, 0x20, 0xea, 0x2f, 0x0a, 0x20, 0xea, 0x2f, 0x0a, 0x20, 0xfa, 0x3f, 0x02, 0x08, 0xfe, 0x0f, 0x00, 0x00}; -#if defined(SVR4) || defined(linux) || defined(CSRG_BASED) +#if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED) #include #else #include diff --git a/cde/programs/dtinfo/dtinfo/src/Preferences/UserPreference.C b/cde/programs/dtinfo/dtinfo/src/Preferences/UserPreference.C index 657de080..a5e104b2 100644 --- a/cde/programs/dtinfo/dtinfo/src/Preferences/UserPreference.C +++ b/cde/programs/dtinfo/dtinfo/src/Preferences/UserPreference.C @@ -63,7 +63,7 @@ #include #include #include -#if !defined(hpux) && !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(hpux) && !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #include #endif #include diff --git a/cde/programs/dtinfo/dtinfo/src/Query/QueryTerm.C b/cde/programs/dtinfo/dtinfo/src/Query/QueryTerm.C index 5264c8a1..ea6cc5fc 100644 --- a/cde/programs/dtinfo/dtinfo/src/Query/QueryTerm.C +++ b/cde/programs/dtinfo/dtinfo/src/Query/QueryTerm.C @@ -81,7 +81,7 @@ #endif #include -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) #include #endif diff --git a/cde/programs/dtinfo/dtinfo/src/Query/QueryTermView.C b/cde/programs/dtinfo/dtinfo/src/Query/QueryTermView.C index 2ed3564d..0744c65b 100644 --- a/cde/programs/dtinfo/dtinfo/src/Query/QueryTermView.C +++ b/cde/programs/dtinfo/dtinfo/src/Query/QueryTermView.C @@ -77,7 +77,7 @@ #include #include -#if defined(SVR4) || defined(SYSV) || defined(linux) || defined(CSRG_BASED) +#if defined(SVR4) || defined(SYSV) || defined(__linux__) || defined(CSRG_BASED) #include #endif diff --git a/cde/programs/dtinfo/dtinfo/src/Support/xList.hh b/cde/programs/dtinfo/dtinfo/src/Support/xList.hh index c99b07e5..a4e2159a 100644 --- a/cde/programs/dtinfo/dtinfo/src/Support/xList.hh +++ b/cde/programs/dtinfo/dtinfo/src/Support/xList.hh @@ -71,7 +71,7 @@ private: }; template -#if defined(_IBMR2) || defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(_IBMR2) || defined(__linux__) || defined(CSRG_BASED) || defined(sun) class xList : public List_base #else class xList : private List_base @@ -82,7 +82,7 @@ class xList : private List_base #ifdef SC3 friend class List_Iterator; #else -#if !defined(_IBMR2) && !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(_IBMR2) && !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) template friend class List_Iterator; #endif #endif @@ -118,7 +118,7 @@ public: template -#if defined(_IBMR2) || defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(_IBMR2) || defined(__linux__) || defined(CSRG_BASED) || defined(sun) class List_Iterator : public List_Iterator_base #else class List_Iterator : private List_Iterator_base diff --git a/cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_Base.hh b/cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_Base.hh index e3549e72..da13afa0 100644 --- a/cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_Base.hh +++ b/cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_Base.hh @@ -32,7 +32,7 @@ class UAS_Base: public Destructable { UAS_Base (); virtual ~UAS_Base (); int operator == (const UAS_Base &); -#if (defined(sparc) && defined(SC3)) || defined(linux) +#if (defined(sparc) && defined(SC3)) || defined(__linux__) /* SC++ 4.0.1 does not like these being protected */ #else protected: diff --git a/cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_OQLParser.C b/cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_OQLParser.C index 2ca45224..505a8d47 100644 --- a/cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_OQLParser.C +++ b/cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_OQLParser.C @@ -24,7 +24,7 @@ /* Copyright (c) 1995 FUJITSU LIMITED */ /* All Rights Reserved */ -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) #include #else #include diff --git a/cde/programs/dtinfo/dtinfo/src/UAS/DtSR/DtSR_BookcaseEntry.hh b/cde/programs/dtinfo/dtinfo/src/UAS/DtSR/DtSR_BookcaseEntry.hh index c9fba046..4401f6e7 100644 --- a/cde/programs/dtinfo/dtinfo/src/UAS/DtSR/DtSR_BookcaseEntry.hh +++ b/cde/programs/dtinfo/dtinfo/src/UAS/DtSR/DtSR_BookcaseEntry.hh @@ -66,7 +66,7 @@ class DtSR_BookcaseSearchEntry : public DtSR_BookcaseEntry UAS_Pointer bcase() { return uas_bcase; } -#if !defined(SC3) && !defined(linux) +#if !defined(SC3) && !defined(__linux__) protected: template friend class UAS_Pointer; diff --git a/cde/programs/dtinfo/dtinfo/wwl/include/WWL/WArgList.h b/cde/programs/dtinfo/dtinfo/wwl/include/WWL/WArgList.h index 1ab3bdd2..47f9a305 100644 --- a/cde/programs/dtinfo/dtinfo/wwl/include/WWL/WArgList.h +++ b/cde/programs/dtinfo/dtinfo/wwl/include/WWL/WArgList.h @@ -45,7 +45,7 @@ #define WArgList_h // Allow setting of resources by name in arg list -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #define CASTRNAM (char*) #define CASTVAL (void*)(size_t) #else diff --git a/cde/programs/dtinfo/dtinfo/wwl/include/WWL/wwl.h b/cde/programs/dtinfo/dtinfo/wwl/include/WWL/wwl.h index 61f2437b..31632a60 100644 --- a/cde/programs/dtinfo/dtinfo/wwl/include/WWL/wwl.h +++ b/cde/programs/dtinfo/dtinfo/wwl/include/WWL/wwl.h @@ -52,7 +52,7 @@ // /__ \/ F-91405 ORSAY Cedex +33 (1) 69 41 66 29 #include -#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #include #else #define name2(__n1,__n2) __paste2(__n1,__n2) @@ -78,7 +78,7 @@ class WComposite; typedef void (* XtProc)(); #endif -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #define CASTRNAM (char*) #define CASTVAL (void*)(size_t) #else diff --git a/cde/programs/dtinfo/dtinfogen/infolib/etc/ContentType.C b/cde/programs/dtinfo/dtinfogen/infolib/etc/ContentType.C index da1a57d1..d2aa3d37 100644 --- a/cde/programs/dtinfo/dtinfogen/infolib/etc/ContentType.C +++ b/cde/programs/dtinfo/dtinfogen/infolib/etc/ContentType.C @@ -54,7 +54,7 @@ #include -#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #include #endif diff --git a/cde/programs/dtinfo/dtinfogen/infolib/etc/RemoteId.C b/cde/programs/dtinfo/dtinfogen/infolib/etc/RemoteId.C index e7b67e9b..65c9c832 100644 --- a/cde/programs/dtinfo/dtinfogen/infolib/etc/RemoteId.C +++ b/cde/programs/dtinfo/dtinfogen/infolib/etc/RemoteId.C @@ -53,7 +53,7 @@ #include -#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) # include #endif diff --git a/cde/programs/dtinfo/dtinfogen/infolib/etc/ReplaceIdIdref.C b/cde/programs/dtinfo/dtinfogen/infolib/etc/ReplaceIdIdref.C index 34aa5dc1..20a1e606 100644 --- a/cde/programs/dtinfo/dtinfogen/infolib/etc/ReplaceIdIdref.C +++ b/cde/programs/dtinfo/dtinfogen/infolib/etc/ReplaceIdIdref.C @@ -43,7 +43,7 @@ #include -#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #include #endif diff --git a/cde/programs/dtinfo/dtinfogen/infolib/etc/gr_type.C b/cde/programs/dtinfo/dtinfogen/infolib/etc/gr_type.C index 2da32f53..d4b04f92 100644 --- a/cde/programs/dtinfo/dtinfogen/infolib/etc/gr_type.C +++ b/cde/programs/dtinfo/dtinfogen/infolib/etc/gr_type.C @@ -54,7 +54,7 @@ #include -#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) # include #else # include diff --git a/cde/programs/dtinfo/dtinfogen/infolib/etc/lex.C b/cde/programs/dtinfo/dtinfogen/infolib/etc/lex.C index c01a7441..e9b87af5 100644 --- a/cde/programs/dtinfo/dtinfogen/infolib/etc/lex.C +++ b/cde/programs/dtinfo/dtinfogen/infolib/etc/lex.C @@ -42,7 +42,7 @@ #ifdef __cplusplus #include -#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #include #endif @@ -190,7 +190,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #define YY_CHAR unsigned char #define INITIAL 0 -#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #include #else #include diff --git a/cde/programs/dtinfo/dtinfogen/infolib/etc/lex.l b/cde/programs/dtinfo/dtinfogen/infolib/etc/lex.l index 9f9e5127..a2d2bbad 100644 --- a/cde/programs/dtinfo/dtinfogen/infolib/etc/lex.l +++ b/cde/programs/dtinfo/dtinfogen/infolib/etc/lex.l @@ -1,7 +1,7 @@ %{ /* -*- c++ -*- */ /* $XConsortium: lex.l /main/5 1996/11/19 16:55:12 drk $ */ -#if !defined(linux) && !defined(CSRG_BASED) +#if !defined(__linux__) && !defined(CSRG_BASED) #include #else #include diff --git a/cde/programs/dtinfo/tools/misc/msgsets.C b/cde/programs/dtinfo/tools/misc/msgsets.C index 72330b1e..2f076a82 100644 --- a/cde/programs/dtinfo/tools/misc/msgsets.C +++ b/cde/programs/dtinfo/tools/misc/msgsets.C @@ -42,7 +42,7 @@ #ifdef __cplusplus #include -#if !defined(__DECCXX) && !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__DECCXX) && !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #include #else #include diff --git a/cde/programs/dtksh/dtkcvt.c b/cde/programs/dtksh/dtkcvt.c index 62485ec4..cbd2e077 100644 --- a/cde/programs/dtksh/dtkcvt.c +++ b/cde/programs/dtksh/dtkcvt.c @@ -68,7 +68,7 @@ #include "msgs.h" #if defined(SYSV) || defined(SVR4_0) || defined(SVR4) || defined(CSRG_BASED) \ - || defined(linux) || defined(sun) + || defined(__linux__) || defined(sun) #define lsprintf sprintf #endif diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/init.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/init.c index ef1d634a..c81320ac 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/init.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/init.c @@ -109,7 +109,7 @@ #if _hdr_wchar && _lib_wctype && _lib_iswctype /* on linux wchar.h can include FILE without stdio.h which clashes with sfio_t */ -#if defined(linux) +#if defined(__linux__) #ifndef __FILE_defined #define __FILE_defined 1 #endif diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/macro.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/macro.c index c2de0e58..ac9e04db 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/macro.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/macro.c @@ -95,7 +95,7 @@ #include "defs.h" #include /* on linux pwd.h can include FILE without stdio.h which clashes with sfio_t */ -#if defined(linux) +#if defined(__linux__) #ifndef __FILE_defined #define __FILE_defined 1 #endif diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/conf.tab b/cde/programs/dtksh/ksh93/src/lib/libast/comp/conf.tab index 90f87ade..863de886 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/conf.tab +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/conf.tab @@ -235,7 +235,7 @@ OPEN_MAX_CEIL 50 AST XX 1 L OPEN_MAX OS_VERSION 119 AES SC 1 FSU PAGESIZE 51 POSIX SC 1 L PAGE_SIZE 4096 #if _lib_getpagesize - #if defined(linux) + #if defined(__linux__) extern int getpagesize(void); #else extern ssize_t getpagesize(void); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/conf.tab b/cde/programs/dtksh/ksh93/src/lib/libast/conf.tab index e3edc0d9..7e6e1380 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/conf.tab +++ b/cde/programs/dtksh/ksh93/src/lib/libast/conf.tab @@ -239,7 +239,7 @@ OPEN_MAX_CEIL 50 AST XX 1 L OPEN_MAX OS_VERSION 119 AES SC 1 FSU PAGESIZE 51 POSIX SC 1 L PAGE_SIZE 4096 #if _lib_getpagesize - #if defined(linux) + #if defined(__linux__) extern int getpagesize(void); #else extern ssize_t getpagesize(void); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/features/tty b/cde/programs/dtksh/ksh93/src/lib/libast/features/tty index 9a75fc8a..e8587856 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/features/tty +++ b/cde/programs/dtksh/ksh93/src/lib/libast/features/tty @@ -16,7 +16,7 @@ cat{ #else #undef ioctl #endif - #if !defined(linux) + #if !defined(__linux__) extern int ioctl(int, int, ...); #endif }end diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/include/ast.h b/cde/programs/dtksh/ksh93/src/lib/libast/include/ast.h index 6e219fbe..b6dd5e46 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/include/ast.h +++ b/cde/programs/dtksh/ksh93/src/lib/libast/include/ast.h @@ -121,7 +121,7 @@ * workaround botched headers that assume */ -#if !defined(CSRG_BASED) && !defined(linux) +#if !defined(CSRG_BASED) && !defined(__linux__) #ifndef FILE #define FILE Sfio_t #endif diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/include/ast_std.h b/cde/programs/dtksh/ksh93/src/lib/libast/include/ast_std.h index e5367140..3532078f 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/include/ast_std.h +++ b/cde/programs/dtksh/ksh93/src/lib/libast/include/ast_std.h @@ -137,7 +137,7 @@ #define _SKIP_SFSTDIO_H #else #define _SFSTDIO_H -#if !defined(linux) +#if !defined(__linux__) #define FILE int #endif #if defined(__STDPP__directive) && defined(__STDPP__hide) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/include/sfio.h b/cde/programs/dtksh/ksh93/src/lib/libast/include/sfio.h index 8120e6f3..9f99cc3d 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/include/sfio.h +++ b/cde/programs/dtksh/ksh93/src/lib/libast/include/sfio.h @@ -46,7 +46,7 @@ #ifndef _SFIO_H #define _SFIO_H 1 -#if defined(linux) +#if defined(__linux__) /* HACK On linux prevent inclusion of __FILE.h that contains a conflicting definition of __FILE that we define later */ # define ____FILE_defined 1 @@ -155,7 +155,7 @@ #define _STDIO_INCLUDED 1 #endif -#if !defined(CSRG_BASED) && !defined(linux) +#if !defined(CSRG_BASED) && !defined(__linux__) #ifndef FILE #define FILE Sfio_t #endif @@ -167,7 +167,7 @@ #endif typedef struct _sfio_ Sfile_t, Sfio_t, SFIO; -#if defined(linux) +#if defined(__linux__) typedef struct _sfio_ FILE; typedef struct _sfio_ __FILE; #endif diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/include/stdio.h b/cde/programs/dtksh/ksh93/src/lib/libast/include/stdio.h index 73f6c365..b2a70e07 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/include/stdio.h +++ b/cde/programs/dtksh/ksh93/src/lib/libast/include/stdio.h @@ -50,7 +50,7 @@ #define stdout sfstdout #define stderr sfstderr #define BUFSIZ SF_BUFSIZE -#if !defined(linux) +#if !defined(__linux__) #ifdef FILE #undef FILE #endif diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfvprintf.c b/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfvprintf.c index f60104bd..adbe2c74 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfvprintf.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfvprintf.c @@ -302,7 +302,7 @@ loop_fa : if(!form) form = ""; #if (defined(CSRG_BASED) && !defined(__LP64__)) || \ - (defined(linux) && !defined(__LP64__)) || defined(sun) + (defined(__linux__) && !defined(__LP64__)) || defined(sun) GETARG(argsp,argsp,argf,args,va_list*,va_list*,'2',t_user,n_user); memcpy((Void_t*)(&(fa->args)), (Void_t*)(&args), sizeof(va_list)); memcpy((Void_t*)(&args), (Void_t*)argsp, sizeof(va_list)); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtfs.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtfs.c index b4a1d468..b0721d14 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtfs.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtfs.c @@ -121,7 +121,7 @@ __STDPP__directive pragma pp:hide endmntent getmntent #endif /* on linux mntent.h can include FILE without stdio.h which clashes with sfio_t */ -#if defined(linux) +#if defined(__linux__) #ifndef __FILE_defined #define __FILE_defined 1 #endif diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtgid.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtgid.c index 746d390f..e5f51ffc 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtgid.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtgid.c @@ -99,7 +99,7 @@ __STDPP__directive pragma pp:hide getgrgid #include #include /* on linux grp.h can include FILE without stdio.h which clashes with sfio_t */ -#if defined(linux) +#if defined(__linux__) #ifndef __FILE_defined #define __FILE_defined 1 #endif diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtuid.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtuid.c index 0b91f7cb..b985a858 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtuid.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtuid.c @@ -99,7 +99,7 @@ __STDPP__directive pragma pp:hide getpwuid #include #include /* on linux pwd.h can include FILE without stdio.h which clashes with sfio_t */ -#if defined(linux) +#if defined(__linux__) #ifndef __FILE_defined #define __FILE_defined 1 #endif diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/strgid.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/strgid.c index acaeb9ba..a017ab4b 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/strgid.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/strgid.c @@ -101,7 +101,7 @@ __STDPP__directive pragma pp:hide getgrgid getgrnam getpwnam #include #include /* on linux pwd.h and grp.h can include FILE without stdio.h which clashes with sfio_t */ -#if defined(linux) +#if defined(__linux__) #ifndef __FILE_defined #define __FILE_defined 1 #endif diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/strmatch.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/strmatch.c index 5c44d4cc..195f4a12 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/strmatch.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/strmatch.c @@ -96,7 +96,7 @@ #if _hdr_wchar && _lib_wctype && _lib_iswctype /* on linux wchar.h can include FILE without stdio.h which clashes with sfio_t */ -#if defined(linux) +#if defined(__linux__) #ifndef __FILE_defined #define __FILE_defined 1 #endif diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/struid.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/struid.c index 6281d610..fbf44913 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/struid.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/struid.c @@ -100,7 +100,7 @@ __STDPP__directive pragma pp:hide getpwnam getpwuid #include #include /* on linux pwd.h can include FILE without stdio.h which clashes with sfio_t */ -#if defined(linux) +#if defined(__linux__) #ifndef __FILE_defined #define __FILE_defined 1 #endif diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/id.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/id.c index 4cb75034..d3e74b17 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/id.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/id.c @@ -97,7 +97,7 @@ static const char id[] = "\n@(#)id (AT&T Bell Laboratories) 07/17/94\0\n"; #include "FEATURE/ids" /* on linux grp.h pwd.h can include FILE without stdio.h which clashes with sfio_t */ -#if defined(linux) +#if defined(__linux__) #ifndef __FILE_defined #define __FILE_defined 1 #endif diff --git a/cde/programs/dtksh/xmcmds.c b/cde/programs/dtksh/xmcmds.c index 7bda37c3..0bb9d869 100644 --- a/cde/programs/dtksh/xmcmds.c +++ b/cde/programs/dtksh/xmcmds.c @@ -3738,7 +3738,7 @@ do_catopen( nl_catd nlmsg_fd = (nl_catd)-1; char * errmsg; #if defined(SVR4) || defined (_AIX) || defined(CSRG_BASED) || \ - defined(linux) || defined(sun) + defined(__linux__) || defined(sun) char * nextMatch; #endif @@ -3763,7 +3763,7 @@ do_catopen( altCatName = XtMalloc(strlen(catName) + 10); #if defined(SVR4) || defined (_AIX) || defined(CSRG_BASED) || \ - defined(linux) || defined(sun) + defined(__linux__) || defined(sun) /* These platforms don't have strrstr() */ ptr = NULL; nextMatch = catName; diff --git a/cde/programs/dtlogin/config/Xconfig.src b/cde/programs/dtlogin/config/Xconfig.src index c536b869..75145925 100644 --- a/cde/programs/dtlogin/config/Xconfig.src +++ b/cde/programs/dtlogin/config/Xconfig.src @@ -64,7 +64,7 @@ Dtlogin*startup: Xstartup Dtlogin*reset: Xreset Dtlogin*setup: Xsetup -#if defined (__hpux) || defined (_AIX) || defined (sun) || defined(CSRG_BASED) || defined(linux) +#if defined (__hpux) || defined (_AIX) || defined (sun) || defined(CSRG_BASED) || defined(__linux__) Dtlogin*failsafeClient: Xfailsafe #else Dtlogin*failsafeClient: /usr/bin/X11/xterm @@ -79,7 +79,7 @@ XCOMM Dtlogin.exportList: ODMDIR NLSPATH TZ ... Dtlogin.exportList: ODMDIR NLSPATH TZ #endif -#if defined(CSRG_BASED) || defined(linux) +#if defined(CSRG_BASED) || defined(__linux__) Dtlogin.exportList: NLSPATH LANG #endif @@ -126,7 +126,7 @@ XCOMM To specify a default user PATH environment variable. XCOMM XCOMM Dtlogin*userPath: -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) Dtlogin*userPath: /bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:CDE_INSTALLATION_TOP/bin #endif @@ -161,7 +161,7 @@ XCOMM To specify how long the Login Manager waits to connect to an X-server. XCOMM XCOMM Dtlogin*openTimeout: -#if defined(CSRG_BASED) || defined(linux) +#if defined(CSRG_BASED) || defined(__linux__) Dtlogin*openTimeout: 15 Dtlogin*serverAttempts: 3 Dtlogin*wakeupInterval: 20 diff --git a/cde/programs/dtlogin/config/Xfailsafe.src b/cde/programs/dtlogin/config/Xfailsafe.src index 7f7772c6..91423c35 100644 --- a/cde/programs/dtlogin/config/Xfailsafe.src +++ b/cde/programs/dtlogin/config/Xfailsafe.src @@ -54,7 +54,7 @@ XCOMM XCOMM XCOMM Set background to default weave. XCOMM -#if defined(linux) +#if defined(__linux__) XDIR=/usr/bin #endif #if defined(__FreeBSD__) diff --git a/cde/programs/dtlogin/config/Xservers.src b/cde/programs/dtlogin/config/Xservers.src index a08dffb3..a7c3b04b 100644 --- a/cde/programs/dtlogin/config/Xservers.src +++ b/cde/programs/dtlogin/config/Xservers.src @@ -103,7 +103,7 @@ XCOMM ########################################################################## * Local local@console /usr/bin/X11/X :0 #elif defined (_NO_CONSOLE) XCOMM * Local local@console /usr/bin/X11/X :0 -#elif defined (linux) +#elif defined (__linux__) :0 Local local_uid@tty1 root /usr/bin/X :0 #elif defined (__OpenBSD__) :0 Local local@console /usr/X11R6/bin/X :0 diff --git a/cde/programs/dtlogin/config/Xsetup.src b/cde/programs/dtlogin/config/Xsetup.src index 107cd017..3c6a0e63 100644 --- a/cde/programs/dtlogin/config/Xsetup.src +++ b/cde/programs/dtlogin/config/Xsetup.src @@ -56,7 +56,7 @@ fi #ifdef sun XDIR=/usr/openwin/bin -#elif defined(linux) +#elif defined(__linux__) XDIR=/usr/bin #elif defined(__OpenBSD__) XDIR=/usr/X11R6/bin diff --git a/cde/programs/dtlogin/config/_common.ksh.src b/cde/programs/dtlogin/config/_common.ksh.src index e8874ab6..21d45466 100644 --- a/cde/programs/dtlogin/config/_common.ksh.src +++ b/cde/programs/dtlogin/config/_common.ksh.src @@ -34,7 +34,7 @@ HASH #if defined(__OpenBSD__) || defined(__NetBSD__) pexec=$(LC_TIME=C ps -p $PPID | awk 'NR==2 {print $5}') -#elif defined(linux) +#elif defined(__linux__) pexec=$(LC_TIME=C /bin/ps -p $PPID 2>/dev/null | awk 'NR==2 {print $4}') #elif defined(__FreeBSD__) pexec=$(LC_TIME=C /bin/ps -o comm= -p $PPID 2>/dev/null) @@ -304,7 +304,7 @@ SetKeyboardMap() #endif #endif -#if defined(linux) +#if defined(__linux__) #ifdef cpp_Xsetup if [ "$DTXSERVERLOCATION" != "remote" ]; then fontpath= diff --git a/cde/programs/dtlogin/daemon.c b/cde/programs/dtlogin/daemon.c index e72727e1..f905c1c8 100644 --- a/cde/programs/dtlogin/daemon.c +++ b/cde/programs/dtlogin/daemon.c @@ -77,7 +77,7 @@ BecomeDaemon( void ) * Close standard file descriptors and get rid of controlling tty */ -#if defined(SYSV) || defined (SVR4) || defined(linux) +#if defined(SYSV) || defined (SVR4) || defined(__linux__) setpgrp (); #else setpgrp (0, getpid()); diff --git a/cde/programs/dtlogin/dm.c b/cde/programs/dtlogin/dm.c index 7b9777d4..8ce0eafe 100644 --- a/cde/programs/dtlogin/dm.c +++ b/cde/programs/dtlogin/dm.c @@ -62,7 +62,7 @@ # include # include # include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) # include #else # include @@ -273,7 +273,7 @@ main( int argc, char **argv ) ScanServers (); StartDisplays (); (void) signal (SIGHUP, RescanNotify); -#if !defined(SYSV) || defined(hpux) || defined(_AIX) || defined(linux) +#if !defined(SYSV) || defined(hpux) || defined(_AIX) || defined(__linux__) (void) signal (SIGCHLD, ChildNotify); #endif while (AnyWellKnownSockets() || AnyDisplaysLeft ()) @@ -286,7 +286,7 @@ main( int argc, char **argv ) TrimErrorFile(); -#if defined(SYSV) && !defined(hpux) && !defined(_AIX) && !defined(linux) +#if defined(SYSV) && !defined(hpux) && !defined(_AIX) && !defined(__linux__) WaitForChild (); #else WaitForSomething (); @@ -500,7 +500,7 @@ StopAll( int arg ) int ChildReady = 0; -#if !defined(SYSV) || defined(hpux) || defined(_AIX) || defined(linux) || defined(CSRG_BASED) +#if !defined(SYSV) || defined(hpux) || defined(_AIX) || defined(__linux__) || defined(CSRG_BASED) static SIGVAL ChildNotify( int arg ) { @@ -1482,7 +1482,7 @@ SetTitle( char *name, char *ptr ) #define GETTYPATH "/usr/sbin/getty" #elif defined(__OpenBSD__) #define GETTYPATH "/usr/libexec/getty" -#elif defined(__linux) +#elif defined(__linux__) #define GETTYPATH "/sbin/getty" #elif !defined (__apollo) #define GETTYPATH "/etc/getty" diff --git a/cde/programs/dtlogin/dm.h b/cde/programs/dtlogin/dm.h index efe1e8a7..be74fddc 100644 --- a/cde/programs/dtlogin/dm.h +++ b/cde/programs/dtlogin/dm.h @@ -200,7 +200,7 @@ ***************************************************************************/ /*#if defined(SYSV) && !defined(hpux)*/ -#if defined(SYSV) || defined(SVR4) || defined(linux) || defined(CSRG_BASED) +#if defined(SYSV) || defined(SVR4) || defined(__linux__) || defined(CSRG_BASED) # include # define waitCode(w) WEXITSTATUS(w) # define waitSig(w) WTERMSIG(w) @@ -475,7 +475,7 @@ struct verify_info { * ***************************************************************************/ -#if !defined(linux) && !defined(CSRG_BASED) +#if !defined(__linux__) && !defined(CSRG_BASED) extern char *sys_errlist[]; /* system error msgs */ extern int sys_nerr; /* system error msgs */ #endif diff --git a/cde/programs/dtlogin/genauth.c b/cde/programs/dtlogin/genauth.c index cf4a1c2e..7df608f8 100644 --- a/cde/programs/dtlogin/genauth.c +++ b/cde/programs/dtlogin/genauth.c @@ -228,7 +228,7 @@ bitsToBytes (unsigned long bits[2], char bytes[64]) * the OS's random number device. */ -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #define READ_LIMIT (sizeof (long) * 2) static int @@ -440,7 +440,7 @@ static int cryptoInited = 0; int InitCryptoKey( void ) { -#if defined(linux) +#if defined(__linux__) /* non-blocking */ char *key_file = "/dev/urandom"; #elif defined(CSRG_BASED) || defined(sun) diff --git a/cde/programs/dtlogin/sysauth.c b/cde/programs/dtlogin/sysauth.c index 9e72ec18..0e60d504 100644 --- a/cde/programs/dtlogin/sysauth.c +++ b/cde/programs/dtlogin/sysauth.c @@ -119,7 +119,7 @@ #define generic #endif -#if defined(linux) +#if defined(__linux__) # include #endif @@ -1944,7 +1944,7 @@ Authenticate( struct display *d, char *name, char *passwd, char **msg ) p = getpwnam(name); -#if defined(linux) +#if defined(__linux__) /* * Use the Linux Shadow Password system to get the crypt()ed password */ diff --git a/cde/programs/dtlogin/util.c b/cde/programs/dtlogin/util.c index 4b337a72..e78273ff 100644 --- a/cde/programs/dtlogin/util.c +++ b/cde/programs/dtlogin/util.c @@ -344,7 +344,7 @@ CleanUpChild( void ) * has also gotten rid of the controlling terminal there is no great * harm in not making the sub-daemons as leaders. */ -#if defined (SYSV) || defined (SVR4) || defined(linux) +#if defined (SYSV) || defined (SVR4) || defined(__linux__) setpgrp (); #else setpgrp (0, getpid ()); @@ -670,7 +670,7 @@ static int MatchesFileSuffix(const char *filename, const char *suffix) { int retval = 0; -#if defined(_AIX) || defined(SVR4) || defined(linux) || defined(CSRG_BASED) +#if defined(_AIX) || defined(SVR4) || defined(__linux__) || defined(CSRG_BASED) int different = 1; /* diff --git a/cde/programs/dtmail/MotifApp/InterruptibleCmd.C b/cde/programs/dtmail/MotifApp/InterruptibleCmd.C index 06ce452d..3fa648c0 100644 --- a/cde/programs/dtmail/MotifApp/InterruptibleCmd.C +++ b/cde/programs/dtmail/MotifApp/InterruptibleCmd.C @@ -69,7 +69,7 @@ #include #include -#if !defined(linux) && !defined(CSRG_BASED) +#if !defined(__linux__) && !defined(CSRG_BASED) extern void forceUpdate( Widget ); #endif diff --git a/cde/programs/dtmail/dtmail/FindDialog.C b/cde/programs/dtmail/dtmail/FindDialog.C index a16712f9..1f489b5b 100644 --- a/cde/programs/dtmail/dtmail/FindDialog.C +++ b/cde/programs/dtmail/dtmail/FindDialog.C @@ -729,7 +729,7 @@ FindDialog::compareMessage(DtMailMessageHandle handle) return(found); } -#if !defined(CSRG_BASED) && !defined(linux) && !defined(sun) +#if !defined(CSRG_BASED) && !defined(__linux__) && !defined(sun) // // See if string 'toFind' is anyware in string 'str'. // A case-insensitive version of strstr(). diff --git a/cde/programs/dtmail/dtmail/RoamApp.C b/cde/programs/dtmail/dtmail/RoamApp.C index dc474835..edf28ca1 100644 --- a/cde/programs/dtmail/dtmail/RoamApp.C +++ b/cde/programs/dtmail/dtmail/RoamApp.C @@ -70,7 +70,7 @@ #include #include -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) #define wcswcs wcsstr #include #endif diff --git a/cde/programs/dtmail/include/DtMail/Buffer.hh b/cde/programs/dtmail/include/DtMail/Buffer.hh index bf124c7c..1f223274 100644 --- a/cde/programs/dtmail/include/DtMail/Buffer.hh +++ b/cde/programs/dtmail/include/DtMail/Buffer.hh @@ -125,7 +125,7 @@ class BufferMemory : public Buffer { virtual int getSize(void); // get total size of the buffer private: -#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) class Chunk; #endif diff --git a/cde/programs/dtmail/libDtMail/Common/DtMailRc.C b/cde/programs/dtmail/libDtMail/Common/DtMailRc.C index bcd190a9..67def537 100644 --- a/cde/programs/dtmail/libDtMail/Common/DtMailRc.C +++ b/cde/programs/dtmail/libDtMail/Common/DtMailRc.C @@ -145,7 +145,7 @@ struct cmd cmdtab[] = { #if defined(sun) #define SYSTEM_MAILRC "/etc/mail/mail.rc" -#elif defined(_AIX) || defined(linux) +#elif defined(_AIX) || defined(__linux__) #define SYSTEM_MAILRC "/usr/share/lib/Mail.rc" #elif defined(__hpux) #define SYSTEM_MAILRC "/usr/share/lib/mailx.rc" diff --git a/cde/programs/dtmail/libDtMail/Common/IO.C b/cde/programs/dtmail/libDtMail/Common/IO.C index 18769ee4..05ff0dc1 100644 --- a/cde/programs/dtmail/libDtMail/Common/IO.C +++ b/cde/programs/dtmail/libDtMail/Common/IO.C @@ -71,7 +71,7 @@ // END Order dependent for AIX // #include -#if !defined(linux) +#if !defined(__linux__) # include #endif #include @@ -103,7 +103,7 @@ extern "C" { int lockf(int, int, off_t); } #include #if !defined(IOV_MAX) - #if !defined(linux) + #if !defined(__linux__) #include #endif #if !defined(DEF_IOV_MAX) @@ -811,7 +811,7 @@ GetPasswordEntry(passwd & result) memcpy(&passwordEntry, tresult, sizeof(struct passwd)); passwordEntry.pw_name = strdup(passwordEntry.pw_name); passwordEntry.pw_passwd = strdup(passwordEntry.pw_passwd); -#if !defined(_AIX) && !defined(linux) && !defined(CSRG_BASED) +#if !defined(_AIX) && !defined(__linux__) && !defined(CSRG_BASED) passwordEntry.pw_age = strdup(passwordEntry.pw_age); passwordEntry.pw_comment = strdup(passwordEntry.pw_comment); #endif @@ -984,12 +984,12 @@ int FileSystemSpace(const char *file_path, size_t bytes, char **fsname) int fserror=FALSE; struct stat stat_buf; size_t req_space = 0; -#if !defined(linux) +#if !defined(__linux__) struct statvfs statvfs_buf; #endif if (stat(file_path,&stat_buf) < 0) return 0; -#if !defined(linux) +#if !defined(__linux__) if (statvfs(file_path,&statvfs_buf) < 0) return 0; #endif @@ -1026,7 +1026,7 @@ int FileSystemSpace(const char *file_path, size_t bytes, char **fsname) req_space = (size_t) ((bytes > stat_buf.st_size) ? (bytes-stat_buf.st_size) : 0); -#if !defined(linux) +#if !defined(__linux__) if ( (statvfs_buf.f_bfree*statvfs_buf.f_bsize) > (req_space + statvfs_buf.f_bsize) ) return 1; diff --git a/cde/programs/dtmail/libDtMail/Common/Process.C b/cde/programs/dtmail/libDtMail/Common/Process.C index 1ded59f6..623e5f13 100644 --- a/cde/programs/dtmail/libDtMail/Common/Process.C +++ b/cde/programs/dtmail/libDtMail/Common/Process.C @@ -55,7 +55,7 @@ #include #elif defined(HPUX) #include -#elif defined(_AIX) || defined(linux) +#elif defined(_AIX) || defined(__linux__) #define INFTIM (-1) /* Infinite timeout */ #endif diff --git a/cde/programs/dtmail/libDtMail/Common/Session.C b/cde/programs/dtmail/libDtMail/Common/Session.C index 1be1577c..ac1d1c8d 100644 --- a/cde/programs/dtmail/libDtMail/Common/Session.C +++ b/cde/programs/dtmail/libDtMail/Common/Session.C @@ -86,7 +86,7 @@ extern "C" { #endif -#if !defined(linux) +#if !defined(__linux__) # include #else // Iconv not defined for linux. Use the EUSCompat stubs instead. diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCBodyPart.C b/cde/programs/dtmail/libDtMail/RFC/RFCBodyPart.C index 35fa2c92..882b8fb3 100644 --- a/cde/programs/dtmail/libDtMail/RFC/RFCBodyPart.C +++ b/cde/programs/dtmail/libDtMail/RFC/RFCBodyPart.C @@ -81,7 +81,7 @@ extern "C" { #endif -#if !defined(linux) +#if !defined(__linux__) // Iconv not defined for linux. Use the EUSCompat stubs instead. */ # include #else diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCImpl.hh b/cde/programs/dtmail/libDtMail/RFC/RFCImpl.hh index 892fd529..8eb06c09 100644 --- a/cde/programs/dtmail/libDtMail/RFC/RFCImpl.hh +++ b/cde/programs/dtmail/libDtMail/RFC/RFCImpl.hh @@ -756,7 +756,7 @@ class RFCMailBox : public DtMail::MailBox _isPartial(DtMailEnv &error, RFCMessage *message); DtMailBoolean addressIsMapped(void *addressToCheck); -#if defined(linux) +#if defined(__linux__) void alterPageMappingAdvice(MapRegion *map, int advice = 0); #else void alterPageMappingAdvice( diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCMailBox.C b/cde/programs/dtmail/libDtMail/RFC/RFCMailBox.C index 07a624de..46c6e20d 100644 --- a/cde/programs/dtmail/libDtMail/RFC/RFCMailBox.C +++ b/cde/programs/dtmail/libDtMail/RFC/RFCMailBox.C @@ -63,7 +63,7 @@ #include #include #include -#if !defined(__aix) && !defined(__hpux) && !defined(linux) && !defined(CSRG_BASED) +#if !defined(__aix) && !defined(__hpux) && !defined(__linux__) && !defined(CSRG_BASED) #include #endif #include @@ -97,7 +97,7 @@ extern "C" { #define LCL_SIG_HANDLER_SIGNATURE #elif defined(__hpux) #define LCL_SIG_HANDLER_SIGNATURE __harg -#elif defined(__aix) || defined(__alpha) || defined(linux) || defined(CSRG_BASED) +#elif defined(__aix) || defined(__alpha) || defined(__linux__) || defined(CSRG_BASED) #define LCL_SIG_HANDLER_SIGNATURE int #endif @@ -560,7 +560,7 @@ RFCMailBox::alterPageMappingAdvice(MapRegion *map, int advice) for (int m = 0; m < me; m++) { MapRegion *map_t = _mappings[m]; -#if !defined(linux) && !defined(sun) +#if !defined(__linux__) && !defined(sun) // no madvise on these systems if (map_t == map || map == (MapRegion *)-1) madvise(map_t->map_region, (size_t) map_t->map_size, advice); @@ -2236,7 +2236,7 @@ RFCMailBox::parseFile(DtMailEnv & error, int map_slot) // unsigned long pagelimit = _mappings[map_slot]->map_size; -#if !defined(linux) && !defined(sun) +#if !defined(__linux__) && !defined(sun) // no madvise; dont use optimization madvise( (char *)_mappings[map_slot]->map_region, @@ -2327,7 +2327,7 @@ RFCMailBox::parseFile(DtMailEnv & error, int map_slot) // At this point we most likely will see random behavior. We will // tell the kernel to pull in the minimum number of extra pages. // -#if !defined(linux) && !defined(sun) +#if !defined(__linux__) && !defined(sun) // no madvise; dont use optimization madvise( (char *)_mappings[map_slot]->map_region, @@ -3671,7 +3671,7 @@ RFCMailBox::generateUniqueLockId(void) char theId[128]; char hwserialbuf[64]; -#if !defined(__aix) && !defined(__hpux) && !defined(linux) && !defined(CSRG_BASED) +#if !defined(__aix) && !defined(__hpux) && !defined(__linux__) && !defined(CSRG_BASED) if (sysinfo(SI_HW_SERIAL, (char *)hwserialbuf, sizeof(hwserialbuf)-1) == -1) #endif strcpy(hwserialbuf, "dtmail"); diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C b/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C index ab2f5c57..a8be6da4 100644 --- a/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C +++ b/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C @@ -975,7 +975,7 @@ RFCTransport::signalRegister(void) if (initialized) return; initialized = 1; -#if defined(hpux) || defined(_aix) || defined(linux) || \ +#if defined(hpux) || defined(_aix) || defined(__linux__) || \ (defined(sun) && OSMAJORVERSION>=5 && OSMINORVERSION>4) || defined(CSRG_BASED) // SunOS 5.5 and above defined prototype for signal handler act.sa_handler = (void (*)(int))&RFCTransport::childHandler; diff --git a/cde/programs/dtmail/libDtMail/RFC/SunV3.C b/cde/programs/dtmail/libDtMail/RFC/SunV3.C index e35d3d14..11340430 100644 --- a/cde/programs/dtmail/libDtMail/RFC/SunV3.C +++ b/cde/programs/dtmail/libDtMail/RFC/SunV3.C @@ -59,7 +59,7 @@ #include #elif defined(HPUX) #include -#elif defined(_AIX) || defined(linux) +#elif defined(_AIX) || defined(__linux__) #define INFTIM (-1) /* Infinite timeout */ #endif diff --git a/cde/programs/dtpdmd/dtpdmd.c b/cde/programs/dtpdmd/dtpdmd.c index ab6b9a87..87412b28 100644 --- a/cde/programs/dtpdmd/dtpdmd.c +++ b/cde/programs/dtpdmd/dtpdmd.c @@ -172,7 +172,7 @@ static int generic_error_handler( edpy, eevent ) * *****************************************************************************/ static void -#if defined(__aix) || defined(linux) +#if defined(__aix) || defined(__linux__) handle_SIGCLD(int sigNum) #else handle_SIGCLD(void) diff --git a/cde/programs/dtprintinfo/libUI/BaseUI.C b/cde/programs/dtprintinfo/libUI/BaseUI.C index c823604c..872945b3 100644 --- a/cde/programs/dtprintinfo/libUI/BaseUI.C +++ b/cde/programs/dtprintinfo/libUI/BaseUI.C @@ -44,7 +44,7 @@ #include #ifdef hpux #include -#elif defined(linux) +#elif defined(__linux__) #include #else #include diff --git a/cde/programs/dtprintinfo/libUI/BaseUI.h b/cde/programs/dtprintinfo/libUI/BaseUI.h index 5f91681e..57d31ab1 100644 --- a/cde/programs/dtprintinfo/libUI/BaseUI.h +++ b/cde/programs/dtprintinfo/libUI/BaseUI.h @@ -50,7 +50,7 @@ #define true B_TRUE #define false B_FALSE #endif -#elif defined(linux) +#elif defined(__linux__) #define false 0 #define true 1 #define boolean int diff --git a/cde/programs/dtprintinfo/libUI/MotifUI/Debug.c b/cde/programs/dtprintinfo/libUI/MotifUI/Debug.c index 962e1284..08a3b76f 100644 --- a/cde/programs/dtprintinfo/libUI/MotifUI/Debug.c +++ b/cde/programs/dtprintinfo/libUI/MotifUI/Debug.c @@ -105,7 +105,7 @@ SysErrorMsg( int n ) { -#if !defined(linux) && !defined(CSRG_BASED) +#if !defined(__linux__) && !defined(CSRG_BASED) extern char *sys_errlist[]; extern int sys_nerr; #endif diff --git a/cde/programs/dtprintinfo/objects/BaseObj.h b/cde/programs/dtprintinfo/objects/BaseObj.h index 2ad8c1ec..87369c56 100644 --- a/cde/programs/dtprintinfo/objects/BaseObj.h +++ b/cde/programs/dtprintinfo/objects/BaseObj.h @@ -51,7 +51,7 @@ #define true B_TRUE #define false B_FALSE #endif -#elif defined(linux) +#elif defined(__linux__) #define false 0 #define true 1 #define boolean int diff --git a/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C b/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C index d92be5c7..2adbcfdb 100644 --- a/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C +++ b/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C @@ -768,7 +768,7 @@ void LocalPrintJobs(char *printer, char **return_job_list, int *return_n_jobs) } #endif // HP LOCAL PARSER -#if defined(linux) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) //Linux local parser @@ -804,7 +804,7 @@ void LocalPrintJobs(char *printer, char **return_job_list, int *return_n_jobs) static char *job_list = NULL; static int prev_buf_size = 0; -#if defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__) +#if defined(__linux__) || defined(__OpenBSD__) || defined(__NetBSD__) snprintf(buf, 1000, "LANG=C lpq -P%s", printer); #elif defined(__FreeBSD__) snprintf(buf, 1000, "LANG=C /usr/local/bin/lpq -P%s", printer); diff --git a/cde/programs/dtscreen/usleep.c b/cde/programs/dtscreen/usleep.c index 19d7bd21..82470bfd 100644 --- a/cde/programs/dtscreen/usleep.c +++ b/cde/programs/dtscreen/usleep.c @@ -41,7 +41,7 @@ #include "dtscreen.h" -#if !defined(_AIX) && !defined(hpV4) && !defined(linux) && !defined(sun) && !defined(CSRG_BASED) +#if !defined(_AIX) && !defined(hpV4) && !defined(__linux__) && !defined(sun) && !defined(CSRG_BASED) int usleep(unsigned long usec) { diff --git a/cde/programs/dtscreen/worm.c b/cde/programs/dtscreen/worm.c index 9b93c462..4fce9758 100644 --- a/cde/programs/dtscreen/worm.c +++ b/cde/programs/dtscreen/worm.c @@ -88,7 +88,7 @@ typedef struct { int size[MAXCOLORS]; } wormstruct; -#if !defined(CSRG_BASED) && !defined(sun) && !defined(linux) +#if !defined(CSRG_BASED) && !defined(sun) && !defined(__linux__) int round(float x) { diff --git a/cde/programs/dtsearchpath/dtappg/Options.C b/cde/programs/dtsearchpath/dtappg/Options.C index 331556b9..ffaf55e1 100644 --- a/cde/programs/dtsearchpath/dtappg/Options.C +++ b/cde/programs/dtsearchpath/dtappg/Options.C @@ -31,7 +31,7 @@ #include "Options.h" #include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/dtsearchpath/dtappg/dtappgather.C b/cde/programs/dtsearchpath/dtappg/dtappgather.C index 40bf592e..1820e668 100644 --- a/cde/programs/dtsearchpath/dtappg/dtappgather.C +++ b/cde/programs/dtsearchpath/dtappg/dtappgather.C @@ -75,7 +75,7 @@ #include "dtappgather.h" #include "DirIterator.h" #include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/dtsearchpath/dtsp/ManSearchPath.C b/cde/programs/dtsearchpath/dtsp/ManSearchPath.C index 32b07630..2aca2d54 100644 --- a/cde/programs/dtsearchpath/dtsp/ManSearchPath.C +++ b/cde/programs/dtsearchpath/dtsp/ManSearchPath.C @@ -136,7 +136,7 @@ void ManSearchPath::Print() } } -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) std::ostream & operator<< ( std::ostream & os, @@ -150,7 +150,7 @@ ostream & operator<< ) #endif { -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) os << sp.GetEnvVar() << std::endl; #else os << sp.GetEnvVar() << endl; diff --git a/cde/programs/dtsearchpath/dtsp/Options.C b/cde/programs/dtsearchpath/dtsp/Options.C index 315c3abe..b6d0af64 100644 --- a/cde/programs/dtsearchpath/dtsp/Options.C +++ b/cde/programs/dtsearchpath/dtsp/Options.C @@ -33,7 +33,7 @@ #include "Options.h" #include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/dtsearchpath/dtsp/SearchPath.C b/cde/programs/dtsearchpath/dtsp/SearchPath.C index 5c7cddeb..55334856 100644 --- a/cde/programs/dtsearchpath/dtsp/SearchPath.C +++ b/cde/programs/dtsearchpath/dtsp/SearchPath.C @@ -387,7 +387,7 @@ void SearchPath::Print() * ****************************************************************/ -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) void SearchPath::PrettyPrint ( std::ostream & os @@ -402,14 +402,14 @@ void SearchPath::PrettyPrint CTokenizedString path (GetSearchPath(), Separator().data()); CString subpath = path.next(); while (!subpath.isNull()) { -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) os << " " << subpath << std::endl; #else os << " " << subpath << endl; #endif subpath = path.next(); } -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) os << std::endl; #else os << endl; @@ -424,7 +424,7 @@ void SearchPath::PrettyPrint * ****************************************************************/ -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) std::ostream & operator<< ( std::ostream & os, @@ -438,7 +438,7 @@ ostream & operator<< ) #endif { -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) os << sp.GetEnvVar() << "SEARCHPATH:" << std::endl; #else os << sp.GetEnvVar() << "SEARCHPATH:" << endl; diff --git a/cde/programs/dtsearchpath/dtsp/SearchPath.h b/cde/programs/dtsearchpath/dtsp/SearchPath.h index db21deaa..84164876 100644 --- a/cde/programs/dtsearchpath/dtsp/SearchPath.h +++ b/cde/programs/dtsearchpath/dtsp/SearchPath.h @@ -34,7 +34,7 @@ #include "Environ.h" #include "cstring.h" -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include @@ -51,7 +51,7 @@ class SearchPath { virtual void Print(); virtual void AddPredefinedPath(); -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) virtual void PrettyPrint (std::ostream &) const; friend std::ostream & operator<< (std::ostream &, const SearchPath &); @@ -186,7 +186,7 @@ class ManSearchPath : public SearchPath { virtual void ExportPath (); virtual void Print(); -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) friend std::ostream & operator<< (std::ostream &, const ManSearchPath &); #else friend ostream & operator<< (ostream &, const ManSearchPath &); diff --git a/cde/programs/dtsearchpath/libCliSrv/TTFile.C b/cde/programs/dtsearchpath/libCliSrv/TTFile.C index 2fbb5fe5..8349cb39 100644 --- a/cde/programs/dtsearchpath/libCliSrv/TTFile.C +++ b/cde/programs/dtsearchpath/libCliSrv/TTFile.C @@ -95,7 +95,7 @@ TTFile & TTFile::operator= return *this; } -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) std::ostream & operator<< ( std::ostream & os, @@ -110,7 +110,7 @@ ostream & operator<< #endif { if (file.ttFileOpFailed()) -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) return os << "Error in filename mapping; status = " << file.getStatus() << std::endl; #else @@ -118,7 +118,7 @@ ostream & operator<< << file.getStatus() << endl; #endif else -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) return os << file.data() << std::endl; #else return os << file.data() << endl; diff --git a/cde/programs/dtsearchpath/libCliSrv/TTFile.h b/cde/programs/dtsearchpath/libCliSrv/TTFile.h index 61b289c2..9753fa24 100644 --- a/cde/programs/dtsearchpath/libCliSrv/TTFile.h +++ b/cde/programs/dtsearchpath/libCliSrv/TTFile.h @@ -65,7 +65,7 @@ class TTFile : public CString { }; #else void TT_Exception (char *); -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) friend std::ostream & operator<< (std::ostream &, TTFile &); #else friend ostream & operator<< (ostream &, TTFile &); diff --git a/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C b/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C index a976a5dc..1c634ff1 100644 --- a/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C +++ b/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C @@ -34,7 +34,7 @@ #include #include #include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include @@ -50,7 +50,7 @@ #endif #include -#if defined(sun) || defined(_AIX) || defined(linux) || defined(CSRG_BASED) +#if defined(sun) || defined(_AIX) || defined(__linux__) || defined(CSRG_BASED) #define UID_NO_CHANGE ((uid_t) -1) #define GID_NO_CHANGE ((gid_t) -1) #endif @@ -73,7 +73,7 @@ UnixEnvironment::UnixEnvironment() manpath = "/usr/share/man:/usr/lpp/info"; #elif defined(hpux) manpath = "/usr/man:/usr/contrib/man:/usr/local/man"; -#elif defined(linux) +#elif defined(__linux__) manpath = "/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man"; #elif defined(__OpenBSD__) manpath = "/usr/share/man:/usr/X11R6/man:/usr/local/man:/usr/ports/infrastructure/man"; diff --git a/cde/programs/dtsearchpath/libCliSrv/cstring.C b/cde/programs/dtsearchpath/libCliSrv/cstring.C index 40fd8bd0..82829112 100644 --- a/cde/programs/dtsearchpath/libCliSrv/cstring.C +++ b/cde/programs/dtsearchpath/libCliSrv/cstring.C @@ -566,7 +566,7 @@ int i; } } -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) std::ostream & operator<< ( std::ostream & os, diff --git a/cde/programs/dtsearchpath/libCliSrv/cstring.h b/cde/programs/dtsearchpath/libCliSrv/cstring.h index 7fc1047c..e2c78523 100644 --- a/cde/programs/dtsearchpath/libCliSrv/cstring.h +++ b/cde/programs/dtsearchpath/libCliSrv/cstring.h @@ -32,7 +32,7 @@ #ifndef _CSTRING_H_ #define _CSTRING_H_ -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include @@ -72,7 +72,7 @@ class CString { int isNull() const; void replace (const CString &, const CString &); -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) friend std::ostream & operator<< (std::ostream &, const CString &); #else friend ostream & operator<< (ostream &, const CString &); diff --git a/cde/programs/dtsession/SmConMgmt.c b/cde/programs/dtsession/SmConMgmt.c index 0a18e0aa..23762542 100644 --- a/cde/programs/dtsession/SmConMgmt.c +++ b/cde/programs/dtsession/SmConMgmt.c @@ -55,7 +55,7 @@ #include #include -#if !defined(linux) +#if !defined(__linux__) #include #endif #include @@ -109,7 +109,7 @@ int clientRunning; /* * Variables global to this module only */ -#if !defined(linux) +#if !defined(__linux__) static struct nlist namelist[3]; #endif static int freemem_loc, gpgslim_loc, gpgslim, freemem; @@ -160,7 +160,7 @@ static void WaitClientTimeout(XtPointer, XtIntervalId *); int GetMemoryUtilization(void) { -#if !defined(linux) +#if !defined(__linux__) static int init = 0; static int kmem; #if !defined(SVR4) && !defined(hpV4) && !defined(_POWER) && !defined(CSRG_BASED) diff --git a/cde/programs/dtsession/SmLock.c b/cde/programs/dtsession/SmLock.c index 1d378b7a..711ad352 100644 --- a/cde/programs/dtsession/SmLock.c +++ b/cde/programs/dtsession/SmLock.c @@ -77,7 +77,7 @@ # include #endif -#if defined(linux) +#if defined(__linux__) # include #endif #if defined(CSRG_BASED) @@ -144,7 +144,7 @@ static void RequirePassword( XtPointer, XtIntervalId *) ; static void CycleSaver( XtPointer, XtIntervalId *) ; static void BlinkCaret( XtPointer, XtIntervalId *) ; -#if defined(linux) +#if defined(__linux__) /* #define JET_AUTHDEBUG */ /* Test for re-auth ability - see if we can re-authenticate via pwd, @@ -1661,7 +1661,7 @@ localAuthenticate( return FALSE; } -#elif defined(linux) +#elif defined(__linux__) { struct passwd *pwent = NULL; diff --git a/cde/programs/dtspcd/main.c b/cde/programs/dtspcd/main.c index b7ebd83a..51808a86 100644 --- a/cde/programs/dtspcd/main.c +++ b/cde/programs/dtspcd/main.c @@ -99,7 +99,7 @@ int Client_Send_EOF(protocol_request_ptr prot); int Client_Channel_Termios(protocol_request_ptr prot); int Client_Enhanced_Spawn(protocol_request_ptr prot); -#if defined(_AIX) || defined(linux) +#if defined(_AIX) || defined(__linux__) # define SA_HANDLER_INT_ARG #endif /* _AIX */ diff --git a/cde/programs/dtstyle/ColorFile.c b/cde/programs/dtstyle/ColorFile.c index a601b5ef..dcbeeab2 100644 --- a/cde/programs/dtstyle/ColorFile.c +++ b/cde/programs/dtstyle/ColorFile.c @@ -445,7 +445,7 @@ WriteOutPalette( strcat(filename, PALETTE_SUFFIX); /* open the file for writing */ -#if defined(linux) +#if defined(__linux__) if( (fd = open( filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR)) == -1) #else if( (fd = open( filename, O_RDWR | O_CREAT)) == -1) @@ -1128,7 +1128,7 @@ CheckFileType( void ) strcat(tmpfile1, DT_PAL_DIR); strcat(tmpfile1, filename1); -#if defined(linux) +#if defined(__linux__) if( (fd = open( tmpfile1, O_CREAT, S_IRUSR | S_IWUSR)) == -1) #else if( (fd = open( tmpfile1, O_CREAT)) == -1) @@ -1148,7 +1148,7 @@ CheckFileType( void ) strcat(tmpfile2, DT_PAL_DIR); strcat(tmpfile2, filename2); -#if defined(linux) +#if defined(__linux__) if( (fd1 = open(tmpfile2, O_CREAT | O_EXCL, S_IRUSR | S_IWUSR)) == -1) #else if( (fd1 = open(tmpfile2, O_CREAT | O_EXCL)) == -1) diff --git a/cde/programs/dtterm/util/logger.c b/cde/programs/dtterm/util/logger.c index 307c9ac3..0a257707 100644 --- a/cde/programs/dtterm/util/logger.c +++ b/cde/programs/dtterm/util/logger.c @@ -72,7 +72,7 @@ main(int argc, char **argv) } /* init data... */ -#if defined(linux) || defined(sun) || defined(CSRG_BASED) +#if defined(__linux__) || defined(sun) || defined(CSRG_BASED) (void) memset((void *) &myaddr_in, (int) '\0', sizeof(myaddr_in)); #else (void) memset(myaddr_in, '\0', sizeof(myaddr_in)); diff --git a/cde/programs/dtudcexch/exportbdf.c b/cde/programs/dtudcexch/exportbdf.c index f57046d4..fbe2f520 100644 --- a/cde/programs/dtudcexch/exportbdf.c +++ b/cde/programs/dtudcexch/exportbdf.c @@ -206,7 +206,7 @@ char **comment_list ;/* pointer to the list of comments */ int cnt ; int comflg ; pid_t chld_pid = 0; -#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(linux) +#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(__linux__) int chld_stat ; #else union wait chld_stat ; diff --git a/cde/programs/dtudcfonted/dtaddcpf/addcpf.c b/cde/programs/dtudcfonted/dtaddcpf/addcpf.c index c309dad0..7b2162ca 100644 --- a/cde/programs/dtudcfonted/dtaddcpf/addcpf.c +++ b/cde/programs/dtudcfonted/dtaddcpf/addcpf.c @@ -86,7 +86,7 @@ static char *util_locale ; static pid_t gtob_pid = 0; static pid_t btop_pid = 0; -#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(linux) +#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(__linux__) static int chld_stat ; #else static union wait chld_stat ; diff --git a/cde/programs/dtudcfonted/dtcpftogpf/cpftogpf.c b/cde/programs/dtudcfonted/dtcpftogpf/cpftogpf.c index 2b7be23c..7a12cede 100644 --- a/cde/programs/dtudcfonted/dtcpftogpf/cpftogpf.c +++ b/cde/programs/dtudcfonted/dtcpftogpf/cpftogpf.c @@ -96,7 +96,7 @@ char *argv[]; char *style ; /* style */ int chk_fd; pid_t chld_pid = 0; -#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(linux) +#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(__linux__) int chld_stat ; #else union wait chld_stat ; diff --git a/cde/programs/dtudcfonted/libfal/_fallcWrap.c b/cde/programs/dtudcfonted/libfal/_fallcWrap.c index 5d575098..7309a7b2 100644 --- a/cde/programs/dtudcfonted/libfal/_fallcWrap.c +++ b/cde/programs/dtudcfonted/libfal/_fallcWrap.c @@ -82,7 +82,7 @@ from the X Consortium. #include #include "_fallibint.h" #include "_fallcint.h" -#if defined(linux) +#if defined(__linux__) #include #else #include diff --git a/cde/programs/dtudcfonted/libfal/include/os.h b/cde/programs/dtudcfonted/libfal/include/os.h index 02ddd92d..aeb33e6b 100644 --- a/cde/programs/dtudcfonted/libfal/include/os.h +++ b/cde/programs/dtudcfonted/libfal/include/os.h @@ -98,7 +98,7 @@ pragma on(alloca); #if defined(__GNUC__) -#if !defined(linux) +#if !defined(__linux__) #define alloca ___builtin_alloca #endif #define ALLOCATE_LOCAL(size) alloca((int)(size)) diff --git a/cde/programs/dtudcfonted/libfuty/getfname.c b/cde/programs/dtudcfonted/libfuty/getfname.c index 0c1be5de..f3fe4cb6 100644 --- a/cde/programs/dtudcfonted/libfuty/getfname.c +++ b/cde/programs/dtudcfonted/libfuty/getfname.c @@ -1041,7 +1041,7 @@ char **fontname ; { FILE *fp ; pid_t chld_pid = 0; -#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(linux) +#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(__linux__) int chld_stat ; #else union wait chld_stat ; diff --git a/cde/programs/dtudcfonted/libfuty/oakfuty.c b/cde/programs/dtudcfonted/libfuty/oakfuty.c index f3d175b0..48bddbf2 100644 --- a/cde/programs/dtudcfonted/libfuty/oakfuty.c +++ b/cde/programs/dtudcfonted/libfuty/oakfuty.c @@ -186,7 +186,7 @@ struct ptobhead *head; char buf[BUFSIZE], *p; pid_t chld_pid = 0; -#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(linux) +#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(__linux__) int chld_stat ; #else union wait chld_stat ; diff --git a/cde/programs/dtwm/WmFunction.c b/cde/programs/dtwm/WmFunction.c index e217eb50..b2b462d6 100644 --- a/cde/programs/dtwm/WmFunction.c +++ b/cde/programs/dtwm/WmFunction.c @@ -109,7 +109,7 @@ static unsigned int GetEventInverseMask(XEvent *event); #ifdef WSM -#if (defined(linux) || defined(sun) || defined(CSRG_BASED)) && !defined(_NFILE) +#if (defined(__linux__) || defined(sun) || defined(CSRG_BASED)) && !defined(_NFILE) #define _NFILE FOPEN_MAX #endif #define CLOSE_FILES_ON_EXEC() \ @@ -1035,7 +1035,7 @@ Boolean F_Exec (String args, ClientData *pCD, XEvent *event) { #ifndef NO_SETPGRP -#if defined(SVR4) || defined(linux) +#if defined(SVR4) || defined(__linux__) setsid(); #else #ifdef SYSV diff --git a/cde/programs/dtwm/WmResource.c b/cde/programs/dtwm/WmResource.c index dd06e8ee..4408ba73 100644 --- a/cde/programs/dtwm/WmResource.c +++ b/cde/programs/dtwm/WmResource.c @@ -4484,7 +4484,7 @@ MakeAppearanceResources (WmScreenData *pSD, AppearanceData *pAData, Boolean make { sprintf((char *)wmGD.tmpBuffer, ((char *)GETMESSAGE(62, 23, "failed to load font: %.100s\0")), (char*) pAData->fontList); Warning((char *)wmGD.tmpBuffer); -#if defined(CSRG_BASED) || defined(linux) +#if defined(CSRG_BASED) || defined(__linux__) /* HACK to try get _some_ font anyway (fontList seems to end up as an empty list on * some modern systems; investigate) */ pAData->font = XLoadQueryFont(wmGD.display, "fixed"); diff --git a/cde/programs/nsgmls/CmdLineApp.C b/cde/programs/nsgmls/CmdLineApp.C index 049cd7c3..3dd4310f 100644 --- a/cde/programs/nsgmls/CmdLineApp.C +++ b/cde/programs/nsgmls/CmdLineApp.C @@ -58,7 +58,7 @@ #include "ConsoleOutput.h" -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #include using namespace std; @@ -292,7 +292,7 @@ Boolean CmdLineApp::openFilebufWrite(filebuf &file, return 0; return file.attach(fd) != 0; #else -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) return file.open(filename, ios::out|ios::trunc) != 0; #else return file.open(filename, ios::out|ios::trunc|IOS_BINARY) != 0; diff --git a/cde/programs/nsgmls/CmdLineApp.h b/cde/programs/nsgmls/CmdLineApp.h index dbf6d888..3a585017 100644 --- a/cde/programs/nsgmls/CmdLineApp.h +++ b/cde/programs/nsgmls/CmdLineApp.h @@ -43,7 +43,7 @@ #include #endif -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include using namespace std; #else diff --git a/cde/programs/nsgmls/CodingSystem.C b/cde/programs/nsgmls/CodingSystem.C index 56417b0b..b2991643 100644 --- a/cde/programs/nsgmls/CodingSystem.C +++ b/cde/programs/nsgmls/CodingSystem.C @@ -33,7 +33,7 @@ #ifdef SP_SHORT_HEADERS #include #else -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include @@ -82,7 +82,7 @@ String OutputCodingSystem::convertOut(const StringC &str) const encoder->output(copy.data(), copy.size(), &stream); delete encoder; char *s = stream.str(); -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) String result(s, stream.pcount()); #else String result(s, stream.out_waiting()); diff --git a/cde/programs/nsgmls/CodingSystem.h b/cde/programs/nsgmls/CodingSystem.h index cd1c360c..5aaf35ef 100644 --- a/cde/programs/nsgmls/CodingSystem.h +++ b/cde/programs/nsgmls/CodingSystem.h @@ -41,7 +41,7 @@ #include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include using namespace std; #else diff --git a/cde/programs/nsgmls/EUCJPCodingSystem.C b/cde/programs/nsgmls/EUCJPCodingSystem.C index ff19c2b8..6c46ecfd 100644 --- a/cde/programs/nsgmls/EUCJPCodingSystem.C +++ b/cde/programs/nsgmls/EUCJPCodingSystem.C @@ -29,7 +29,7 @@ #ifdef SP_MULTI_BYTE #include "EUCJPCodingSystem.h" -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/nsgmls/Fixed2CodingSystem.C b/cde/programs/nsgmls/Fixed2CodingSystem.C index 3f21916d..77070ef0 100644 --- a/cde/programs/nsgmls/Fixed2CodingSystem.C +++ b/cde/programs/nsgmls/Fixed2CodingSystem.C @@ -34,7 +34,7 @@ #include "Fixed2CodingSystem.h" #include "macros.h" -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/nsgmls/IdentityCodingSystem.C b/cde/programs/nsgmls/IdentityCodingSystem.C index 82d3eb38..d69dd4f4 100644 --- a/cde/programs/nsgmls/IdentityCodingSystem.C +++ b/cde/programs/nsgmls/IdentityCodingSystem.C @@ -26,7 +26,7 @@ #include "splib.h" #include "IdentityCodingSystem.h" -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/nsgmls/OutputCharStream.C b/cde/programs/nsgmls/OutputCharStream.C index 03409210..ed5c97d6 100644 --- a/cde/programs/nsgmls/OutputCharStream.C +++ b/cde/programs/nsgmls/OutputCharStream.C @@ -28,7 +28,7 @@ #include "OutputCharStream.h" #include "CodingSystem.h" #include "macros.h" -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include @@ -148,7 +148,7 @@ void IosOutputCharStream::flush() encoder_->output(buf_, ptr_ - buf_, byteStream_); ptr_ = buf_; } -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) byteStream_->pubsync(); #else byteStream_->sync(); diff --git a/cde/programs/nsgmls/OutputCharStream.h b/cde/programs/nsgmls/OutputCharStream.h index 7a35cede..f1c9bd3e 100644 --- a/cde/programs/nsgmls/OutputCharStream.h +++ b/cde/programs/nsgmls/OutputCharStream.h @@ -33,7 +33,7 @@ #include "Owner.h" #include "CodingSystem.h" -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include using namespace std; #else diff --git a/cde/programs/nsgmls/SJISCodingSystem.C b/cde/programs/nsgmls/SJISCodingSystem.C index aa0c5481..9ec25675 100644 --- a/cde/programs/nsgmls/SJISCodingSystem.C +++ b/cde/programs/nsgmls/SJISCodingSystem.C @@ -30,7 +30,7 @@ #include "SJISCodingSystem.h" -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/nsgmls/UTF8CodingSystem.C b/cde/programs/nsgmls/UTF8CodingSystem.C index 929bc766..e45d5c2c 100644 --- a/cde/programs/nsgmls/UTF8CodingSystem.C +++ b/cde/programs/nsgmls/UTF8CodingSystem.C @@ -30,7 +30,7 @@ #include "UTF8CodingSystem.h" #include "constant.h" -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/nsgmls/UnicodeCodingSystem.C b/cde/programs/nsgmls/UnicodeCodingSystem.C index 725695a7..5f9231d9 100644 --- a/cde/programs/nsgmls/UnicodeCodingSystem.C +++ b/cde/programs/nsgmls/UnicodeCodingSystem.C @@ -39,7 +39,7 @@ extern "C" { void *memmove(void *, const void *, size_t); } #endif -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/nsgmls/config.h b/cde/programs/nsgmls/config.h index d6c7526c..50582016 100644 --- a/cde/programs/nsgmls/config.h +++ b/cde/programs/nsgmls/config.h @@ -32,7 +32,7 @@ #if defined(__GNUG__) || defined(__SunOS) // It's not missing, but it pulls in libg++ -#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #define SP_NEW_H_MISSING // set_new_handler() has to be declared extern "C" #define SP_SET_NEW_HANDLER_EXTERN_C diff --git a/cde/programs/nsgmls/nsgmls.C b/cde/programs/nsgmls/nsgmls.C index c06ec8b9..25c038bd 100644 --- a/cde/programs/nsgmls/nsgmls.C +++ b/cde/programs/nsgmls/nsgmls.C @@ -38,7 +38,7 @@ #include "sptchar.h" #include "macros.h" -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #include #else @@ -84,7 +84,7 @@ public: const AppChar *filename, const StringC &filenameStr, const OutputCodingSystem *, -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) ::Messenger *messenger); #else Messenger *messenger); @@ -94,7 +94,7 @@ public: void truncateOutput(); void allLinkTypesActivated(); private: -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) ::Messenger *messenger_; #else Messenger *messenger_; @@ -248,7 +248,7 @@ XRastEventHandler::XRastEventHandler(SgmlParser *parser, const AppChar *filename, const StringC &filenameStr, const OutputCodingSystem *codingSystem, -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) ::Messenger *messenger) #else ::Messenger *messenger) diff --git a/cde/programs/nsgmls/xnew.h b/cde/programs/nsgmls/xnew.h index 73f48bca..85a3fe55 100644 --- a/cde/programs/nsgmls/xnew.h +++ b/cde/programs/nsgmls/xnew.h @@ -39,7 +39,7 @@ void set_new_handler(VFP); #else /* not SP_NEW_H_MISSING */ -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/ttsnoop/DtTt.C b/cde/programs/ttsnoop/DtTt.C index 1ce9f546..51824f20 100644 --- a/cde/programs/ttsnoop/DtTt.C +++ b/cde/programs/ttsnoop/DtTt.C @@ -34,7 +34,7 @@ #include #include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/ttsnoop/callbackChooser_stubs.C.src b/cde/programs/ttsnoop/callbackChooser_stubs.C.src index d5bff34c..3e7ba76f 100644 --- a/cde/programs/ttsnoop/callbackChooser_stubs.C.src +++ b/cde/programs/ttsnoop/callbackChooser_stubs.C.src @@ -41,7 +41,7 @@ *** Add include files, types, macros, externs, and user functions here. ***/ -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #include #else diff --git a/cde/programs/ttsnoop/fileChooser_stubs.C.src b/cde/programs/ttsnoop/fileChooser_stubs.C.src index 9cc2c6bc..8e21b587 100644 --- a/cde/programs/ttsnoop/fileChooser_stubs.C.src +++ b/cde/programs/ttsnoop/fileChooser_stubs.C.src @@ -39,7 +39,7 @@ #include #include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #include #else diff --git a/cde/programs/ttsnoop/messageProps_stubs.C.src b/cde/programs/ttsnoop/messageProps_stubs.C.src index 7baf32e7..e759859c 100644 --- a/cde/programs/ttsnoop/messageProps_stubs.C.src +++ b/cde/programs/ttsnoop/messageProps_stubs.C.src @@ -41,7 +41,7 @@ *** Add include files, types, macros, externs, and user functions here. ***/ -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/ttsnoop/patternProps_stubs.C.src b/cde/programs/ttsnoop/patternProps_stubs.C.src index 2936a004..4ae300cc 100644 --- a/cde/programs/ttsnoop/patternProps_stubs.C.src +++ b/cde/programs/ttsnoop/patternProps_stubs.C.src @@ -41,7 +41,7 @@ *** Add include files, types, macros, externs, and user functions here. ***/ -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/ttsnoop/sessionChooser_stubs.C.src b/cde/programs/ttsnoop/sessionChooser_stubs.C.src index b24b23cf..fa3d78bd 100644 --- a/cde/programs/ttsnoop/sessionChooser_stubs.C.src +++ b/cde/programs/ttsnoop/sessionChooser_stubs.C.src @@ -42,7 +42,7 @@ #include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #include #else diff --git a/cde/programs/ttsnoop/stringChooser_stubs.C.src b/cde/programs/ttsnoop/stringChooser_stubs.C.src index c97e3e66..27f0fb22 100644 --- a/cde/programs/ttsnoop/stringChooser_stubs.C.src +++ b/cde/programs/ttsnoop/stringChooser_stubs.C.src @@ -42,7 +42,7 @@ #include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/ttsnoop/ttChooser_stubs.C.src b/cde/programs/ttsnoop/ttChooser_stubs.C.src index e8fe41c5..c6521bd2 100644 --- a/cde/programs/ttsnoop/ttChooser_stubs.C.src +++ b/cde/programs/ttsnoop/ttChooser_stubs.C.src @@ -43,7 +43,7 @@ #include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/programs/ttsnoop/tt_c++.h b/cde/programs/ttsnoop/tt_c++.h index c52faaa8..a7af12ac 100644 --- a/cde/programs/ttsnoop/tt_c++.h +++ b/cde/programs/ttsnoop/tt_c++.h @@ -29,7 +29,7 @@ #ifndef TT_CXX_H #define TT_CXX_H -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include using namespace std; #else diff --git a/cde/programs/ttsnoop/ttsnoop.C.src b/cde/programs/ttsnoop/ttsnoop.C.src index abe0c95d..fc1495b1 100644 --- a/cde/programs/ttsnoop/ttsnoop.C.src +++ b/cde/programs/ttsnoop/ttsnoop.C.src @@ -63,7 +63,7 @@ #include #include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #include #include @@ -196,7 +196,7 @@ signalHandler( } } -#if defined(SVR4) || defined(aix) || defined(hpux) || defined(linux) || defined(CSRG_BASED) +#if defined(SVR4) || defined(aix) || defined(hpux) || defined(__linux__) || defined(CSRG_BASED) #if !defined(SIG_PF) typedef void (*sig_pf_t)(int); #define SIG_PF sig_pf_t @@ -208,7 +208,7 @@ _tt_sigset( int sig, SIG_PF handler ) { -#if defined(hpux) || defined(linux) || defined(CSRG_BASED) +#if defined(hpux) || defined(__linux__) || defined(CSRG_BASED) struct sigaction act; act.sa_handler = handler; sigemptyset(&act.sa_mask); diff --git a/cde/programs/ttsnoop/ttsnoop_stubs.C.src b/cde/programs/ttsnoop/ttsnoop_stubs.C.src index 0be3fc03..ce730527 100644 --- a/cde/programs/ttsnoop/ttsnoop_stubs.C.src +++ b/cde/programs/ttsnoop/ttsnoop_stubs.C.src @@ -37,7 +37,7 @@ #include -#if defined(linux) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #include #else diff --git a/cde/programs/util/dttypes/dttypes.c b/cde/programs/util/dttypes/dttypes.c index ef6620c2..dc529e1e 100644 --- a/cde/programs/util/dttypes/dttypes.c +++ b/cde/programs/util/dttypes/dttypes.c @@ -41,7 +41,7 @@ #define RETURN(c) return(c) #define ERROR(c) {rexp_errno = c; return((char *)0);} static int rexp_errno = 0; -#if defined(CSRG_BASED) || defined(linux) +#if defined(CSRG_BASED) || defined(__linux__) #include #else #include @@ -158,7 +158,7 @@ rec_list(List *l) DtDtsMMField *fld_ptr; DtDtsMMField *fld_ptr_list; -#if defined(CSRG_BASED) || defined(linux) +#if defined(CSRG_BASED) || defined(__linux__) regex_t regex_rn; regex_t regex_fn; regex_t regex_fv; @@ -175,7 +175,7 @@ rec_list(List *l) memset(expbuf_df, '\0', sizeof(expbuf_df)); #endif -#if defined(CSRG_BASED) || defined(linux) +#if defined(CSRG_BASED) || defined(__linux__) if(regcomp(®ex_rn, l->rec_name?l->rec_name:"^.*", 0) != 0) #else if((compile(l->rec_name?l->rec_name:"^.*", @@ -189,7 +189,7 @@ rec_list(List *l) exit(1); } -#if defined(CSRG_BASED) || defined(linux) +#if defined(CSRG_BASED) || defined(__linux__) if(regcomp(®ex_fn, l->fld_name?l->fld_name:"^.*", 0) != 0) #else if((compile(l->fld_name?l->fld_name:"^.*", @@ -203,7 +203,7 @@ rec_list(List *l) exit(1); } -#if defined(CSRG_BASED) || defined(linux) +#if defined(CSRG_BASED) || defined(__linux__) if(regcomp(®ex_fv, l->fld_value?l->fld_value:"^.*", 0) != 0) #else if((compile(l->fld_value?l->fld_value:"^.*", @@ -217,7 +217,7 @@ rec_list(List *l) exit(1); } -#if defined(CSRG_BASED) || defined(linux) +#if defined(CSRG_BASED) || defined(__linux__) if(regcomp(®ex_df, l->display_fld?l->display_fld:"^.*", 0) != 0) #else if((compile(l->display_fld?l->display_fld:"^.*", @@ -237,7 +237,7 @@ rec_list(List *l) { rec_ptr = &rec_ptr_list[rec]; fld_ptr_list = _DtDtsMMGetPtr(rec_ptr->fieldList); -#if defined(CSRG_BASED) || defined(linux) +#if defined(CSRG_BASED) || defined(__linux__) if(regexec(®ex_rn, (char *)_DtDtsMMBosonToString(rec_ptr->recordName), 0, NULL, 0) == 0) @@ -255,7 +255,7 @@ rec_list(List *l) fn = _DtDtsMMExpandValue(_DtDtsMMBosonToString(fld_ptr->fieldName)); fv = _DtDtsMMExpandValue(_DtDtsMMBosonToString(fld_ptr->fieldValue)); -#if defined(CSRG_BASED) || defined(linux) +#if defined(CSRG_BASED) || defined(__linux__) if((regexec(®ex_fn, fn, 0, NULL, 0) == 0) && ((fld_ptr->fieldValue==0? regexec(®ex_fv, @@ -318,7 +318,7 @@ rec_list(List *l) if(l->display_fld) { -#if defined(CSRG_BASED) || defined(linux) +#if defined(CSRG_BASED) || defined(__linux__) if(regexec(®ex_df, fn, 0, NULL, 0) == 0) #else if(advance(fn, expbuf_df) !=0)