Parcourir la source

Use POSIX macros for linux

chase il y a 6 ans
Parent
commit
4f5e7fe5e3
100 fichiers modifiés avec 137 ajouts et 137 suppressions
  1. 1 1
      cde/config/cf/linux.cf
  2. 4 4
      cde/config/imake/imakemdep.h
  3. 2 2
      cde/include/EUSCompat.h
  4. 1 1
      cde/lib/DtHelp/CanvasOs.c
  5. 1 1
      cde/lib/DtHelp/StringFuncs.c
  6. 2 2
      cde/lib/DtSearch/Search.h
  7. 1 1
      cde/lib/DtSearch/SearchP.h
  8. 2 2
      cde/lib/DtSearch/raima/vista.h
  9. 1 1
      cde/lib/DtSvc/DtEncap/local.c
  10. 1 1
      cde/lib/DtSvc/DtEncap/spc-termio.c
  11. 1 1
      cde/lib/DtSvc/DtUtil1/DtsInit.c
  12. 1 1
      cde/lib/DtSvc/DtUtil1/DtsSort.c
  13. 2 2
      cde/lib/DtSvc/DtUtil1/Saver.c
  14. 1 1
      cde/lib/DtSvc/DtUtil1/strtab.c
  15. 3 3
      cde/lib/DtSvc/DtUtil2/EnvControl.c
  16. 3 3
      cde/lib/DtSvc/DtUtil2/XlationSvc.c
  17. 1 1
      cde/lib/DtSvc/include/bms/sbport.h
  18. 2 2
      cde/lib/DtSvc/include/bms/sbstdinc.h
  19. 2 2
      cde/lib/DtSvc/include/codelibs/dynarray.h
  20. 1 1
      cde/lib/DtSvc/include/codelibs/privbuf.h
  21. 3 3
      cde/lib/DtSvc/include/codelibs/stringx.h
  22. 1 1
      cde/lib/DtTerm/TermPrim/TermHeader.h
  23. 1 1
      cde/lib/DtTerm/TermPrim/TermPrim.c
  24. 1 1
      cde/lib/DtTerm/TermPrim/TermPrimDebug.c
  25. 2 2
      cde/lib/DtTerm/TermPrim/TermPrimGetPty-clone.c
  26. 3 3
      cde/lib/DtTerm/TermPrim/TermPrimGetPty-svr4.c
  27. 3 3
      cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c
  28. 1 1
      cde/lib/DtWidget/Editor.c
  29. 2 2
      cde/lib/csa/agent.c
  30. 2 2
      cde/lib/csa/debug.c
  31. 1 1
      cde/lib/csa/iso8601.c
  32. 3 3
      cde/lib/csa/lutil.c
  33. 1 1
      cde/lib/tt/bin/dbck/options.C
  34. 1 1
      cde/lib/tt/bin/shell/mover.C
  35. 1 1
      cde/lib/tt/bin/shell/remover.C
  36. 1 1
      cde/lib/tt/bin/tt_type_comp/frozen.mp_types_lex.C
  37. 1 1
      cde/lib/tt/bin/tt_type_comp/mp_type_comp.C
  38. 1 1
      cde/lib/tt/bin/ttauth/ttauth.h
  39. 1 1
      cde/lib/tt/bin/ttdbserverd/db_server_svc.C
  40. 1 1
      cde/lib/tt/bin/tttar/tttar.C
  41. 1 1
      cde/lib/tt/bin/tttar/tttar_api.C
  42. 1 1
      cde/lib/tt/bin/tttar/tttar_file_utils.C
  43. 1 1
      cde/lib/tt/bin/tttar/tttar_spec.C
  44. 1 1
      cde/lib/tt/bin/tttrace/tttrace.C
  45. 1 1
      cde/lib/tt/lib/api/c/api_typecb.h
  46. 1 1
      cde/lib/tt/lib/mp/mp_desktop.C
  47. 1 1
      cde/lib/tt/lib/mp/mp_message.C
  48. 2 2
      cde/lib/tt/lib/mp/mp_rpc.h
  49. 1 1
      cde/lib/tt/lib/mp/mp_rpc_client.C
  50. 3 3
      cde/lib/tt/lib/mp/mp_stream_socket.C
  51. 1 1
      cde/lib/tt/lib/tt_options.h
  52. 1 1
      cde/lib/tt/lib/tttk/tttk.C
  53. 1 1
      cde/lib/tt/lib/util/tt_entry_pt.C
  54. 1 1
      cde/lib/tt/lib/util/tt_file_system.C
  55. 2 2
      cde/lib/tt/lib/util/tt_gettext.C
  56. 1 1
      cde/lib/tt/lib/util/tt_host.C
  57. 2 2
      cde/lib/tt/lib/util/tt_host_equiv.C
  58. 1 1
      cde/lib/tt/lib/util/tt_iostream.C
  59. 1 1
      cde/lib/tt/lib/util/tt_iostream.h
  60. 1 1
      cde/lib/tt/lib/util/tt_log.C
  61. 2 2
      cde/lib/tt/lib/util/tt_path.C
  62. 1 1
      cde/lib/tt/lib/util/tt_string.C
  63. 2 2
      cde/lib/tt/lib/util/tt_string_map.C
  64. 1 1
      cde/lib/tt/lib/util/tt_tracefile_parse.C
  65. 3 3
      cde/lib/tt/mini_isam/iscntl.c
  66. 1 1
      cde/lib/tt/slib/mp_otype.C
  67. 1 1
      cde/lib/tt/slib/mp_ptype.C
  68. 1 1
      cde/lib/tt/slib/mp_rpc_implement.C
  69. 2 2
      cde/lib/tt/slib/mp_rpc_server.C
  70. 1 1
      cde/lib/tt/slib/mp_signature.C
  71. 1 1
      cde/lib/tt/slib/mp_typedb.C
  72. 3 3
      cde/programs/dtaction/Main.c
  73. 1 1
      cde/programs/dtappbuilder/src/ab/brws_mthds.c
  74. 1 1
      cde/programs/dtappbuilder/src/abmf/abmf.c
  75. 1 1
      cde/programs/dtappbuilder/src/abmf/stubs_c_file.c
  76. 1 1
      cde/programs/dtappbuilder/src/abmf/write_c.c
  77. 1 1
      cde/programs/dtappbuilder/src/libAButil/util.h
  78. 1 1
      cde/programs/dtcm/dtcm/MonthPanel.c
  79. 1 1
      cde/programs/dtcm/dtcm/RFCMIME.c
  80. 1 1
      cde/programs/dtcm/dtcm/calendarA.c
  81. 1 1
      cde/programs/dtcm/dtcm/cm_i18n.c
  82. 1 1
      cde/programs/dtcm/dtcm/dayglance.c
  83. 1 1
      cde/programs/dtcm/dtcm/dnd.c
  84. 1 1
      cde/programs/dtcm/dtcm/find.c
  85. 1 1
      cde/programs/dtcm/dtcm/format.c
  86. 1 1
      cde/programs/dtcm/dtcm/monthglance.c
  87. 1 1
      cde/programs/dtcm/dtcm/tempbr.c
  88. 1 1
      cde/programs/dtcm/dtcm/weekglance.c
  89. 1 1
      cde/programs/dtcm/dtcm/x_graphics.c
  90. 1 1
      cde/programs/dtcm/dtcm/yearglance.c
  91. 2 2
      cde/programs/dtcm/libDtCmP/timeops.c
  92. 1 1
      cde/programs/dtcm/libDtCmP/util.c
  93. 1 1
      cde/programs/dtcm/server/garbage.c
  94. 1 1
      cde/programs/dtcm/server/lexit.c
  95. 1 1
      cde/programs/dtcm/server/log.c
  96. 1 1
      cde/programs/dtcm/server/parser.y
  97. 1 1
      cde/programs/dtcm/server/reclotick.c
  98. 1 1
      cde/programs/dtcm/server/recount.c
  99. 1 1
      cde/programs/dtcm/server/relasttick.c
  100. 1 1
      cde/programs/dtcm/server/renexttick.c

+ 1 - 1
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
 

+ 4 - 4
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__

+ 2 - 2
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 <sys/types.h>
 #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
 

+ 1 - 1
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);

+ 1 - 1
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 <iconv.h>
 #else
 # define iconv_t		int

+ 2 - 2
cde/lib/DtSearch/Search.h

@@ -62,11 +62,11 @@
 #include <stdio.h>
 #include <string.h>
 
-#if defined(linux)
+#if defined(__linux__)
 # define __SVR4_I386_ABI_L1__
 #endif
 #include <limits.h>
-#if defined(linux)
+#if defined(__linux__)
 # undef __SVR4_I386_ABI_L1__
 # ifndef WORD_BIT
 # define WORD_BIT 32

+ 1 - 1
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

+ 2 - 2
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 <limits.h>	/* 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

+ 1 - 1
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 */

+ 1 - 1
cde/lib/DtSvc/DtEncap/spc-termio.c

@@ -36,7 +36,7 @@
 #include <bms/stringbuf.h>
 
 #include <termios.h>
-#if !defined(linux) && !defined(CSRG_BASED)
+#if !defined(__linux__) && !defined(CSRG_BASED)
 #include <sys/termio.h>
 #endif
 #include <codelibs/stringx.h>

+ 1 - 1
cde/lib/DtSvc/DtUtil1/DtsInit.c

@@ -73,7 +73,7 @@
 #include <Dt/Dts.h>
 #include "DtSvcLock.h"
 
-#if !defined(linux)
+#if !defined(__linux__)
 extern char	*strdup(const char *);
 #endif
 

+ 1 - 1
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
 

+ 2 - 2
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
 

+ 1 - 1
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 *);

+ 3 - 3
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.  

+ 3 - 3
cde/lib/DtSvc/DtUtil2/XlationSvc.c

@@ -49,7 +49,7 @@ $END$
 #include <sys/param.h>        /* MAXPATHLEN */
 
 /* for RADIXCHAR and nl_langinfo */
-#if defined(linux)
+#if defined(__linux__)
 # define RADIXCHAR MON_DECIMAL_POINT
 #endif
 #include <langinfo.h>       
@@ -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

+ 1 - 1
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

+ 2 - 2
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();

+ 2 - 2
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 <generic.h>
 #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)]

+ 1 - 1
cde/lib/DtSvc/include/codelibs/privbuf.h

@@ -48,7 +48,7 @@ typedef void (*privbuf_func)(void *v);
 #include <stddef.h>
 #include <stdlib.h>
 
-#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

+ 3 - 3
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 <stdlib.h>
 #else
 #include <malloc.h>

+ 1 - 1
cde/lib/DtTerm/TermPrim/TermHeader.h

@@ -44,7 +44,7 @@
 #include <Xm/Xm.h>
 #include <X11/Xos.h>
 
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
 #define _NFILE   FOPEN_MAX
 #endif
 

+ 1 - 1
cde/lib/DtTerm/TermPrim/TermPrim.c

@@ -81,7 +81,7 @@ extern char * _DtTermPrimGetMessage( char *filename, int set, int n, char *s );
 #include <ctype.h>
 #include <nl_types.h>
 #include <wchar.h>
-#if defined(linux) || defined(hpV4)
+#if defined(__linux__) || defined(hpV4)
 # include <sys/types.h> /* For FD_* macros. */
 # include <sys/time.h> /* For select() prototype. */
 #else

+ 1 - 1
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 <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
 # include <stdarg.h>
 #else
 # include <varargs.h>

+ 2 - 2
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)) {

+ 3 - 3
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 <stropts.h>
 #include <sys/conf.h>
 #include <sys/stream.h>
 #endif
 #include <sys/termios.h>
 
-#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 */

+ 3 - 3
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

+ 1 - 1
cde/lib/DtWidget/Editor.c

@@ -62,7 +62,7 @@
 #  include <wchar.h>
 # endif
 # include <libintl.h>
-#elif defined(linux)
+#elif defined(__linux__)
 # include <wctype.h>
 # define NO_putwc
 #elif defined(CSRG_BASED)

+ 2 - 2
cde/lib/csa/agent.c

@@ -34,7 +34,7 @@
 #include <unistd.h>
 #include <signal.h>
 #include <rpc/rpc.h>
-#if !defined(linux) && !defined(CSRG_BASED)
+#if !defined(__linux__) && !defined(CSRG_BASED)
 # include <poll.h>
 #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;
 

+ 2 - 2
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 <X11/Xos_r.h>
-#if defined(linux)
+#if defined(__linux__)
 #define SVR4
 #endif
 

+ 1 - 1
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));

+ 3 - 3
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 <X11/Xos_r.h>
-#if defined(linux)
+#if defined(__linux__)
 #define SVR4
 #endif
 
-#if !defined(linux)
+#if !defined(__linux__)
 extern char * strdup(const char *);
 #endif
 

+ 1 - 1
cde/lib/tt/bin/dbck/options.C

@@ -37,7 +37,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include "util/copyright.h"
-#if defined(linux) || defined(sgi) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(sgi) || defined(CSRG_BASED)
 #include <getopt.h>
 #endif     
 #include "dbck.h"     

+ 1 - 1
cde/lib/tt/bin/shell/mover.C

@@ -35,7 +35,7 @@
 #include "tt_options.h"
 #include <errno.h>
 #include <string.h>
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
 #include <unistd.h>
 #else
 #if !defined(sun)

+ 1 - 1
cde/lib/tt/bin/shell/remover.C

@@ -35,7 +35,7 @@
 #include "tt_options.h"
 #include <errno.h>
 #include <string.h>
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
 #include <unistd.h>
 #else
 #if !defined(sun)

+ 1 - 1
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

+ 1 - 1
cde/lib/tt/bin/tt_type_comp/mp_type_comp.C

@@ -39,7 +39,7 @@
 #include <locale.h>
 #include <stdlib.h>
 #include <string.h>
-#if defined(linux)
+#if defined(__linux__)
 #include <unistd.h>
 #endif
 #if defined(sgi) || defined(CSRG_BASED)

+ 1 - 1
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();

+ 1 - 1
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);

+ 1 - 1
cde/lib/tt/bin/tttar/tttar.C

@@ -37,7 +37,7 @@
 #include <stdlib.h>
 #include <sys/param.h>
 #include <sys/stat.h>
-#if defined(linux) || defined(sun) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(sun) || defined(CSRG_BASED)
 #include <unistd.h>
 #else
 #if !defined(sun)

+ 1 - 1
cde/lib/tt/bin/tttar/tttar_api.C

@@ -33,7 +33,7 @@
  */
 
 #include <errno.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
 #include <unistd.h>
 #else
 #include <osfcn.h>

+ 1 - 1
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;
 	

+ 1 - 1
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 <unistd.h>
 #else
 #include <osfcn.h>

+ 1 - 1
cde/lib/tt/bin/tttrace/tttrace.C

@@ -38,7 +38,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <signal.h>
-#if defined(linux)
+#if defined(__linux__)
 # include <sys/poll.h>
 #else
 # include <poll.h>

+ 1 - 1
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

+ 1 - 1
cde/lib/tt/lib/mp/mp_desktop.C

@@ -47,7 +47,7 @@
 #include <sys/ioctl.h>
 #include <sys/types.h>
 #include <sys/time.h>
-#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"

+ 1 - 1
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()

+ 2 - 2
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 <rpc/rpc.h>
-#if defined(linux)
+#if defined(__linux__)
 # undef __SVR4_I386_ABI_L1__
 #endif
 

+ 1 - 1
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.

+ 3 - 3
cde/lib/tt/lib/mp/mp_stream_socket.C

@@ -34,7 +34,7 @@
 #include "tt_options.h"
 #include <stdio.h>
 #include "mp/mp_stream_socket.h"
-#if defined(linux)
+#if defined(__linux__)
 #include <sys/poll.h>
 #else
 #include <poll.h>
@@ -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);

+ 1 - 1
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 

+ 1 - 1
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 <sys/poll.h>
 #else
 # include <poll.h>

+ 1 - 1
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; 

+ 1 - 1
cde/lib/tt/lib/util/tt_file_system.C

@@ -47,7 +47,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
-#if defined(linux)
+#if defined(__linux__)
 # include <sys/poll.h>
 #else
 # include <poll.h>

+ 2 - 2
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 <nl_types.h>
-# if defined(linux)
+# if defined(__linux__)
     }
 # endif
 # if !defined(NL_CAT_LOCALE)

+ 1 - 1
cde/lib/tt/lib/util/tt_host.C

@@ -45,7 +45,7 @@ extern "C" in_addr_t inet_addr(const char *);
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <string.h>
-#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
+#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
 #include <osfcn.h>
 #endif
 

+ 2 - 2
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 <X11/Xos_r.h>
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
 #undef index
 #undef rindex
 #endif

+ 1 - 1
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 <<(

+ 1 - 1
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;

+ 1 - 1
cde/lib/tt/lib/util/tt_log.C

@@ -34,7 +34,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
+#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
 #include <osfcn.h>
 #endif
 

+ 2 - 2
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 <X11/Xos_r.h>
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
 #undef index
 #undef rindex
 #endif

+ 1 - 1
cde/lib/tt/lib/util/tt_string.C

@@ -54,7 +54,7 @@
 #endif
 #include <stdlib.h>
 #include <ctype.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
 #include <wctype.h>
 #endif
 #include "util/tt_string.h"

+ 2 - 2
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 <X11/Xos_r.h>
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
 #undef index
 #undef rindex
 #endif

+ 1 - 1
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 <fcntl.h>
 #endif
 

+ 3 - 3
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 <stdarg.h>
 #else
 #include <varargs.h>
@@ -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);

+ 1 - 1
cde/lib/tt/slib/mp_otype.C

@@ -31,7 +31,7 @@
  * Copyright (c) 1990 by Sun Microsystems, Inc.
  */
 #include <stdlib.h>
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
 /*# include <g++/minmax.h>*/
 #else
 # include <macros.h>

+ 1 - 1
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 <stdlib.h>
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
 /*# include <g++/minmax.h>*/
 #else
 # include <macros.h>

+ 1 - 1
cde/lib/tt/slib/mp_rpc_implement.C

@@ -49,7 +49,7 @@
 #include <sys/uio.h>
 #include <fcntl.h>
 #include <unistd.h>
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
 /*# include <g++/minmax.h>*/
 #else
 # include <macros.h>

+ 2 - 2
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) {
 	}

+ 1 - 1
cde/lib/tt/slib/mp_signature.C

@@ -35,7 +35,7 @@
  *  a procedure.
  */
 #include <stdlib.h>
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
 /*# include <g++/minmax.h>*/
 #else
 # include <macros.h>

+ 1 - 1
cde/lib/tt/slib/mp_typedb.C

@@ -39,7 +39,7 @@
 // databases. 
 //
 #include <stdlib.h>
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
 /*# include <g++/minmax.h>*/
 #else
 # include <macros.h>

+ 3 - 3
cde/programs/dtaction/Main.c

@@ -49,7 +49,7 @@
 #include <locale.h>
 #include <sys/param.h>		/* for MAXPATHLEN and MAXHOSTNAMELEN */
 
-#if defined(sun) || defined(linux)
+#if defined(sun) || defined(__linux__)
 #include <crypt.h>
 #include <shadow.h>
 #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);
     }

+ 1 - 1
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...

+ 1 - 1
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
 

+ 1 - 1
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 <va_list.h> as structure of char ** and int
  * Sun define va_list as void * */
     va_list             paramList = { 0, 0 };

+ 1 - 1
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)

+ 1 - 1
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
 

+ 1 - 1
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 <X11/Xos_r.h>

+ 1 - 1
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 <RFCMIME.h>
 
 /* Iconv not defined for linux.  Use the EUSCompat stubs instead. */
-#if !defined(linux)
+#if !defined(__linux__)
 #  include <iconv.h>
 #endif
 #include <EUSCompat.h>

+ 1 - 1
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 <X11/Xos.h>

+ 1 - 1
cde/programs/dtcm/dtcm/cm_i18n.c

@@ -71,7 +71,7 @@ should be fixed in the future.
 
 #include <langinfo.h>
 /* Iconv not defined for linux.  Use the EUSCompat stubs instead. */
-#if !defined(linux)
+#if !defined(__linux__)
 #  include <iconv.h>
 #endif
 #include <EUSCompat.h>

+ 1 - 1
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 <X11/Xos_r.h>

+ 1 - 1
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
 

+ 1 - 1
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 <X11/Xos_r.h>

+ 1 - 1
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 <X11/Xos_r.h>

+ 1 - 1
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 <X11/Xos_r.h>

+ 1 - 1
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 <string.h>
 #else
 extern char *strdup(const char *);

+ 1 - 1
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 <X11/Xos_r.h>

+ 1 - 1
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 <X11/Xos_r.h>

+ 1 - 1
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 <X11/Xos_r.h>

+ 2 - 2
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 <X11/Xos_r.h>
-#if defined(linux)
+#if defined(__linux__)
 #define SVR4
 #endif
 

+ 1 - 1
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 <X11/Xos_r.h>

+ 1 - 1
cde/programs/dtcm/server/garbage.c

@@ -35,7 +35,7 @@
 #include	<stdlib.h>
 #define XOS_USE_NO_LOCKING
 #define X_INCLUDE_TIME_H
-#if defined(linux)
+#if defined(__linux__)
 #undef SVR4
 #endif
 #include <X11/Xos_r.h>

+ 1 - 1
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

+ 1 - 1
cde/programs/dtcm/server/log.c

@@ -39,7 +39,7 @@
 #include <sys/file.h>
 #define XOS_USE_NO_LOCKING
 #define X_INCLUDE_TIME_H
-#if defined(linux)
+#if defined(__linux__)
 #undef SVR4
 #endif
 #include <X11/Xos_r.h>

+ 1 - 1
cde/programs/dtcm/server/parser.y

@@ -12,7 +12,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#if (defined(sun) && defined(_XOPEN_SOURCE)) || defined(linux)
+#if (defined(sun) && defined(_XOPEN_SOURCE)) || defined(__linux__)
 #include <time.h>
 #endif
 #include "csa.h"

+ 1 - 1
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 <X11/Xos_r.h>

+ 1 - 1
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 <X11/Xos_r.h>

+ 1 - 1
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 <X11/Xos_r.h>

+ 1 - 1
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 <X11/Xos_r.h>

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff