1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Use POSIX macros for linux

This commit is contained in:
chase 2018-05-24 16:24:41 -05:00 committed by Jon Trulson
parent 164e695cd0
commit 4f5e7fe5e3
265 changed files with 394 additions and 394 deletions

View file

@ -261,7 +261,7 @@ TIRPCINC =
# define StandardCppDefines -traditional # define StandardCppDefines -traditional
#endif /* Mc68020Architecture */ #endif /* Mc68020Architecture */
#define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines #define StandardDefines -D__linux__ LinuxMachineDefines LinuxSourceDefines
#define ConnectionFlags -DUNIXCONN -DTCPCONN #define ConnectionFlags -DUNIXCONN -DTCPCONN

View file

@ -300,7 +300,7 @@ char *cpp_argv[ARGUMENTS] = {
#ifdef unix #ifdef unix
"-Uunix", /* remove unix symbol so that filename unix.c okay */ "-Uunix", /* remove unix symbol so that filename unix.c okay */
#endif #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__ # ifdef __i386__
"-D__i386__", "-D__i386__",
# endif # endif
@ -502,7 +502,7 @@ char *cpp_argv[ARGUMENTS] = {
#endif #endif
#ifdef linux #ifdef linux
"-traditional", "-traditional",
"-Dlinux", "-D__linux__",
#endif #endif
#ifdef __sxg__ #ifdef __sxg__
"-D__sxg__", "-D__sxg__",
@ -567,7 +567,7 @@ char *cpp_argv[ARGUMENTS] = {
# define DEFAULT_OS_MINOR_REV "r %[0-9]" # define DEFAULT_OS_MINOR_REV "r %[0-9]"
/* No information available to generate default OSTeenyVersion value. */ /* No information available to generate default OSTeenyVersion value. */
# define DEFAULT_OS_NAME "srvm %[^\n]" # 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" */ /* 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_MAJOR_REV "r %[0-9]"
# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]" # define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
@ -689,7 +689,7 @@ struct symtab predefs[] = {
#ifdef mc68020 #ifdef mc68020
{"mc68020", "1"}, {"mc68020", "1"},
#endif #endif
#if defined(__GNUC__) && !defined(linux) #if defined(__GNUC__) && !defined(__linux__)
{"__GNUC__", DEF_STRINGIFY(__GNUC__)}, {"__GNUC__", DEF_STRINGIFY(__GNUC__)},
#endif #endif
#ifdef __GNUC_MINOR__ #ifdef __GNUC_MINOR__

View file

@ -59,7 +59,7 @@ extern "C" {
** System V R4 based systems define the stuff we need in ** System V R4 based systems define the stuff we need in
** sys/types.h. Include that and then we are done. ** 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> #include <sys/types.h>
#endif #endif
@ -110,7 +110,7 @@ typedef enum {B_FALSE, B_TRUE} boolean_t;
#endif /* HPUX */ #endif /* HPUX */
#if defined(linux) || defined(CSRG_BASED) #if defined(__linux__) || defined(CSRG_BASED)
typedef enum {B_FALSE, B_TRUE} boolean_t; typedef enum {B_FALSE, B_TRUE} boolean_t;
#define MAXNAMELEN 256 #define MAXNAMELEN 256

View file

@ -141,7 +141,7 @@ _DtCvRunInterp(
* write the data to file. * write the data to file.
*/ */
result = -1; result = -1;
#if defined(linux) #if defined(__linux__)
myFd = open(fileName, O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU | S_IRWXG | S_IRWXO); myFd = open(fileName, O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU | S_IRWXG | S_IRWXO);
#else #else
myFd = open(fileName, O_WRONLY | O_CREAT | O_TRUNC); myFd = open(fileName, O_WRONLY | O_CREAT | O_TRUNC);

View file

@ -58,7 +58,7 @@
#include "CvStringI.h" /* for string functions used by Canvas Engine */ #include "CvStringI.h" /* for string functions used by Canvas Engine */
#include "StringFuncsI.h" /* for _CEStrcollProc */ #include "StringFuncsI.h" /* for _CEStrcollProc */
#if !defined(linux) #if !defined(__linux__)
# include <iconv.h> # include <iconv.h>
#else #else
# define iconv_t int # define iconv_t int

View file

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

View file

@ -871,7 +871,7 @@ extern LLIST *sort_llist (LLIST *list_header);
extern char *teskey_parser (PARG *parg); extern char *teskey_parser (PARG *parg);
extern DtSrObjdate extern DtSrObjdate
tm2objdate (struct tm *tmptr); tm2objdate (struct tm *tmptr);
#if !defined(linux) #if !defined(__linux__)
#ifndef _ALL_SOURCE #ifndef _ALL_SOURCE
extern char *strdup (const char *s); extern char *strdup (const char *s);
#endif #endif

View file

@ -82,11 +82,11 @@
* - Prefix all vista utility names with "dt...", also to deconfuse. * - Prefix all vista utility names with "dt...", also to deconfuse.
* *
*/ */
#if defined(linux) #if defined(__linux__)
# define __SVR4_I386_ABI_L1__ # define __SVR4_I386_ABI_L1__
#endif #endif
#include <limits.h> /* pickup WORD_BIT, LONG_BIT */ #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__ # undef __SVR4_I386_ABI_L1__
# ifndef WORD_BIT # ifndef WORD_BIT
# define WORD_BIT 32 # define WORD_BIT 32

View file

@ -202,7 +202,7 @@ void local_channel_object_input_handler(void * client_data,
timeout.tv_sec = 0; timeout.tv_sec = 0;
timeout.tv_usec = 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); select(max_fds, (fd_set*)&read_fd_vect, NULL, (fd_set*)&except_fd_vect, &timeout);
#else #else
/* UX has select defined with int*, not fd_set* parms */ /* UX has select defined with int*, not fd_set* parms */

View file

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

View file

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

View file

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

View file

@ -167,7 +167,7 @@ _DtSaverStart(
*/ */
if (saver_list.serial == 0) if (saver_list.serial == 0)
{ {
#if !defined(linux) && !defined(CSRG_BASED) #if !defined(__linux__) && !defined(CSRG_BASED)
/* JET - how can this ever work anyway? */ /* JET - how can this ever work anyway? */
putenv(envdata); putenv(envdata);
envdata[0] = '\0'; envdata[0] = '\0';
@ -214,7 +214,7 @@ _DtSaverStart(
sprintf(pe, " %lx", XtWindow(drawArea[i])); sprintf(pe, " %lx", XtWindow(drawArea[i]));
} }
#if defined(linux) || defined(CSRG_BASED) #if defined(__linux__) || defined(CSRG_BASED)
putenv(envdata); putenv(envdata);
#endif #endif

View file

@ -68,7 +68,7 @@ struct strtab_build {
static void inc_it (int * a, int * b, unsigned char * key); static void inc_it (int * a, int * b, unsigned char * key);
static void build_it(int a, struct strtab_build * ptr, 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 *); extern char * strdup(const char *);
#endif #endif
typedef int (*des_func)(void *); typedef int (*des_func)(void *);

View file

@ -426,7 +426,7 @@ _DtEnvControl(
if ((ptr = strstr(tempString, "/usr/openwin/bin"))) if ((ptr = strstr(tempString, "/usr/openwin/bin")))
#elif defined(CSRG_BASED) #elif defined(CSRG_BASED)
if ((ptr = strstr(tempString, "/usr/X11R6/bin"))) if ((ptr = strstr(tempString, "/usr/X11R6/bin")))
#elif defined(linux) #elif defined(__linux__)
if ((ptr = strstr(tempString, "/usr/bin"))) if ((ptr = strstr(tempString, "/usr/bin")))
#else #else
if ((ptr = strstr(tempString, "/usr/bin/X11"))) if ((ptr = strstr(tempString, "/usr/bin/X11")))
@ -821,7 +821,7 @@ static void _EnvAdd
{ {
_DtSvcProcessLock(); _DtSvcProcessLock();
if (envBitVector & bv_flag) { if (envBitVector & bv_flag) {
#if defined(CSRG_BASED) || defined(linux) #if defined(CSRG_BASED) || defined(__linux__)
setenv(envVar, envVarSetting + strlen(envVar) + 1, 1); setenv(envVar, envVarSetting + strlen(envVar) + 1, 1);
#else #else
@ -928,7 +928,7 @@ _DtEnvRemove(
&& ( p[len] == '=' ) && ( p[len] == '=' )
&& !strncmp(p, str, len)) && !strncmp(p, str, len))
{ {
#if defined(linux) || defined(CSRG_BASED) #if defined(__linux__) || defined(CSRG_BASED)
/* JET - 2/19/99 /* JET - 2/19/99
It seems much safer to let libc worry about this It seems much safer to let libc worry about this
rather than try to do it ourselves. rather than try to do it ourselves.

View file

@ -49,7 +49,7 @@ $END$
#include <sys/param.h> /* MAXPATHLEN */ #include <sys/param.h> /* MAXPATHLEN */
/* for RADIXCHAR and nl_langinfo */ /* for RADIXCHAR and nl_langinfo */
#if defined(linux) #if defined(__linux__)
# define RADIXCHAR MON_DECIMAL_POINT # define RADIXCHAR MON_DECIMAL_POINT
#endif #endif
#include <langinfo.h> #include <langinfo.h>
@ -2199,7 +2199,7 @@ int _DtXlateGetXlateEnv(
/* then look up version number of execution host */ /* then look up version number of execution host */
if (ret_AppExecEnvVersion) 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]; char version[SYS_NMLN+SYS_NMLN+2];
#else #else
char version[UTSLEN+UTSLEN+2]; char version[UTSLEN+UTSLEN+2];
@ -2252,7 +2252,7 @@ int _DtXlateGetXlateEnv(
#error OSMAJORVERSION and/or OSMINORVERSION not defined #error OSMAJORVERSION and/or OSMINORVERSION not defined
#endif #endif
#if defined(linux) || defined(CSRG_BASED) #if defined(__linux__) || defined(CSRG_BASED)
sprintf(buf,"%s%s%s", STR(OSMAJORVERSION), sprintf(buf,"%s%s%s", STR(OSMAJORVERSION),
nl_langinfo('.'), STR(OSMINORVERSION)); nl_langinfo('.'), STR(OSMINORVERSION));
#else #else

View file

@ -255,7 +255,7 @@
/* about above. So, declare them only if we don't already have them */ /* 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 */ /* the "u_types" are defined in standard files */
# undef _INCLUDE_BSD_SOURCE # undef _INCLUDE_BSD_SOURCE
#else #else

View file

@ -62,7 +62,7 @@
#if !(defined(apollo) && defined(__bsd)) && !defined(CSRG_BASED) #if !(defined(apollo) && defined(__bsd)) && !defined(CSRG_BASED)
#if defined(__STDC__) #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 void bcopy(char *b1, char *b2, int length);
extern int bcmp(char *b1, char *b2, int length); extern int bcmp(char *b1, char *b2, int length);
extern void bzero(char *b, 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); extern char *mktemp(char *tmplate);
#elif ! defined(__cplusplus) #elif ! defined(__cplusplus)
#if !defined(linux) && !defined(_XFUNCS_H_) #if !defined(__linux__) && !defined(_XFUNCS_H_)
extern void bcopy(); extern void bcopy();
extern int bcmp(); extern int bcmp();
extern void bzero(); extern void bzero();

View file

@ -36,10 +36,10 @@
#ifndef __DYNARRAY_H_ #ifndef __DYNARRAY_H_
#define __DYNARRAY_H_ #define __DYNARRAY_H_
#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun) #if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
#include <generic.h> #include <generic.h>
#endif #endif
#if defined(sun) || defined(linux) || defined(CSRG_BASED) #if defined(sun) || defined(__linux__) || defined(CSRG_BASED)
#define _DELETE_ARRAY(sz) delete[] #define _DELETE_ARRAY(sz) delete[]
#else #else
#define _DELETE_ARRAY(sz) delete[(sz)] #define _DELETE_ARRAY(sz) delete[(sz)]

View file

@ -48,7 +48,7 @@ typedef void (*privbuf_func)(void *v);
#include <stddef.h> #include <stddef.h>
#include <stdlib.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 // Rejects valid inline declarations, claiming they have both internal and
// external linkage. // external linkage.
#else #else

View file

@ -73,7 +73,7 @@ extern "C"
#ifdef __cplusplus #ifdef __cplusplus
char *strtokx(char *&ptr, const char *sep); 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, char **strsep(const char *str, const char *sep,
boolean whsp = TRUE, int *num = NULL); boolean whsp = TRUE, int *num = NULL);
const char *strcmbn(const char **vec, const char *sep = " "); const char *strcmbn(const char **vec, const char *sep = " ");
@ -81,7 +81,7 @@ extern "C"
#else /* __STDC__ */ #else /* __STDC__ */
char *strtokx(char **ptr, const char *sep); 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, char **strsep(const char *str, const char *sep,
boolean whsp, int *num); boolean whsp, int *num);
#endif #endif
@ -119,7 +119,7 @@ extern size_t nl_strlen(); /* __OBSOLETE */
#if defined(__cplusplus) #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> #include <stdlib.h>
#else #else
#include <malloc.h> #include <malloc.h>

View file

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

View file

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

View file

@ -39,7 +39,7 @@ static char rcs_id[] = "$XConsortium: TermPrimDebug.c /main/4 1996/11/21 19:58:1
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#if defined(linux) || defined(CSRG_BASED) || defined(sun) #if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
# include <stdarg.h> # include <stdarg.h>
#else #else
# include <varargs.h> # include <varargs.h>

View file

@ -49,7 +49,7 @@ static char rcs_id[] = "$TOG: TermPrimGetPty-clone.c /main/7 1998/04/03 17:11:08
#if defined(__AIX) #if defined(__AIX)
# define PTY_CLONE_DEVICE "/dev/ptc" # define PTY_CLONE_DEVICE "/dev/ptc"
#elif defined(linux) #elif defined(__linux__)
# define PTY_CLONE_DEVICE "/dev/ptyc" # define PTY_CLONE_DEVICE "/dev/ptyc"
#endif /* __AIX */ #endif /* __AIX */
@ -72,7 +72,7 @@ GetPty(char **ptySlave, char **ptyMaster)
if ((ptyFd = open(*ptyMaster, O_RDWR, 0))) { if ((ptyFd = open(*ptyMaster, O_RDWR, 0))) {
_Xttynameparams tty_buf; _Xttynameparams tty_buf;
#if defined(linux) #if defined(__linux__)
if (c = _XTtyname(ptyFd)) { if (c = _XTtyname(ptyFd)) {
#else #else
if (c = _XTtyname(ptyFd, tty_buf)) { if (c = _XTtyname(ptyFd, tty_buf)) {

View file

@ -43,14 +43,14 @@ static char rcs_id[] = "$XConsortium: TermPrimGetPty-svr4.c /main/1 1996/04/21 1
#include "TermPrimOSDepI.h" #include "TermPrimOSDepI.h"
#include "TermPrimDebug.h" #include "TermPrimDebug.h"
#include "TermHeader.h" #include "TermHeader.h"
#if !defined(linux) #if !defined(__linux__)
#include <stropts.h> #include <stropts.h>
#include <sys/conf.h> #include <sys/conf.h>
#include <sys/stream.h> #include <sys/stream.h>
#endif #endif
#include <sys/termios.h> #include <sys/termios.h>
#if defined(linux) #if defined(__linux__)
#undef USE_STREAMS_BUFMOD #undef USE_STREAMS_BUFMOD
#endif #endif
@ -260,7 +260,7 @@ SetupPty(char *ptySlave, int ptyFd)
* they don't seem to stick after the file is closed on * they don't seem to stick after the file is closed on
* SVR4.2. Not sure where else this applies. * SVR4.2. Not sure where else this applies.
*/ */
#if !defined(linux) #if !defined(__linux__)
if (ioctl(ptyFd, I_PUSH, "ptem") == -1) { if (ioctl(ptyFd, I_PUSH, "ptem") == -1) {
(void) perror("Error pushing ptem"); (void) perror("Error pushing ptem");
/* exit the subprocess */ /* exit the subprocess */

View file

@ -385,7 +385,7 @@ UtmpEntryCreate(Widget w, pid_t pid, char *utmpLine)
(void) strncpy(utPtr->ut_id, utmpLine, (void) strncpy(utPtr->ut_id, utmpLine,
sizeof(utPtr->ut_id)); sizeof(utPtr->ut_id));
#else /* __AIX */ #else /* __AIX */
#if defined(linux) || defined(sun) #if defined(__linux__) || defined(sun)
if (c = strchr(utmpLine, '/')) { if (c = strchr(utmpLine, '/')) {
c++; c++;
} else { } else {
@ -401,7 +401,7 @@ UtmpEntryCreate(Widget w, pid_t pid, char *utmpLine)
/* set up the new entry... */ /* set up the new entry... */
utPtr->ut_type = USER_PROCESS; utPtr->ut_type = USER_PROCESS;
#if !defined(linux) #if !defined(__linux__)
utPtr->ut_exit.e_termination = 0; utPtr->ut_exit.e_termination = 0;
utPtr->ut_exit.e_exit = 2; utPtr->ut_exit.e_exit = 2;
#endif #endif
@ -528,7 +528,7 @@ UtmpEntryDestroy(Widget w, char *utmpLine)
(void) setutent(); (void) setutent();
if (utPtr = getutline(&ut)) { if (utPtr = getutline(&ut)) {
utPtr->ut_type = DEAD_PROCESS; utPtr->ut_type = DEAD_PROCESS;
#if !defined(linux) #if !defined(__linux__)
utPtr->ut_exit.e_termination = 0; utPtr->ut_exit.e_termination = 0;
utPtr->ut_exit.e_exit = 0; utPtr->ut_exit.e_exit = 0;
#endif #endif

View file

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

View file

@ -34,7 +34,7 @@
#include <unistd.h> #include <unistd.h>
#include <signal.h> #include <signal.h>
#include <rpc/rpc.h> #include <rpc/rpc.h>
#if !defined(linux) && !defined(CSRG_BASED) #if !defined(__linux__) && !defined(CSRG_BASED)
# include <poll.h> # include <poll.h>
#endif #endif
#if defined(SunOS) #if defined(SunOS)
@ -200,7 +200,7 @@ _DtCm_destroy_agent()
extern void extern void
_DtCm_process_updates() _DtCm_process_updates()
{ {
#if defined(CSRG_BASED) || defined(linux) #if defined(CSRG_BASED) || defined(__linux__)
int i, nfd; int i, nfd;
fd_set rpc_bits; fd_set rpc_bits;

View file

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

View file

@ -174,7 +174,7 @@ _csa_tick_to_iso8601(time_t tick, char *buf_out)
} }
/* JET. This is horrible. */ /* JET. This is horrible. */
#if !defined(linux) && !defined(CSRG_BASED) #if !defined(__linux__) && !defined(CSRG_BASED)
if (getenv("TZ")) { if (getenv("TZ")) {
strncpy(tz_orig, getenv("TZ"), sizeof(tz_orig)); strncpy(tz_orig, getenv("TZ"), sizeof(tz_orig));

View file

@ -42,15 +42,15 @@
#endif #endif
#define X_INCLUDE_PWD_H #define X_INCLUDE_PWD_H
#define XOS_USE_XT_LOCKING #define XOS_USE_XT_LOCKING
#if defined(linux) #if defined(__linux__)
#undef SVR4 #undef SVR4
#endif #endif
#include <X11/Xos_r.h> #include <X11/Xos_r.h>
#if defined(linux) #if defined(__linux__)
#define SVR4 #define SVR4
#endif #endif
#if !defined(linux) #if !defined(__linux__)
extern char * strdup(const char *); extern char * strdup(const char *);
#endif #endif

View file

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

View file

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

View file

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

View file

@ -68,7 +68,7 @@ extern "C" {
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#if !defined(linux) #if !defined(__linux__)
void exit(int); void exit(int);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus

View file

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

View file

@ -58,7 +58,7 @@ typedef int Bool;
extern char *ProgramName; extern char *ProgramName;
#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun) #if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
extern char *malloc(), *realloc(); extern char *malloc(), *realloc();
#endif #endif
int process_command(), auth_initialize(), auth_finalize(); int process_command(), auth_initialize(), auth_finalize();

View file

@ -217,7 +217,7 @@ main(int argc, char** argv, char **envp)
#if defined(HPUX) #if defined(HPUX)
int asize = sizeof(saddr); int asize = sizeof(saddr);
#else #else
# if defined(linux) || defined(CSRG_BASED) || defined(sun) # if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
socklen_t asize = sizeof(saddr); socklen_t asize = sizeof(saddr);
# else # else
size_t asize = sizeof(saddr); size_t asize = sizeof(saddr);

View file

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

View file

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

View file

@ -360,7 +360,7 @@ append_real_subtrees( _Tt_string_list_ptr realtrees, _Tt_string path )
/* /*
* basename() - Return the last component of a pathname. * basename() - Return the last component of a pathname.
*/ */
#if !defined(linux) #if !defined(__linux__)
char *basename( char *pathname ) { char *basename( char *pathname ) {
char *the_basename; char *the_basename;

View file

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

View file

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

View file

@ -44,7 +44,7 @@
#include "api/c/tt_c.h" #include "api/c/tt_c.h"
#include "api/c/api_handle.h" #include "api/c/api_handle.h"
#if defined(linux) #if defined(__linux__)
// Avoid g++ compiler errors on linux. // Avoid g++ compiler errors on linux.
#define typename typenm #define typename typenm
#endif #endif

View file

@ -47,7 +47,7 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.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, ...) ; }; extern "C" { extern int ioctl (int, int, ...) ; };
#endif #endif
#include "util/tt_global_env.h" #include "util/tt_global_env.h"

View file

@ -118,7 +118,7 @@ base_constructor()
_Tt_message:: _Tt_message::
_Tt_message() _Tt_message()
#if defined(linux) || defined(CSRG_BASED) #if defined(__linux__) || defined(CSRG_BASED)
: _pattern_id(), _object(), _file(), _op(), : _pattern_id(), _object(), _file(), _op(),
_otype(), _sender_ptype(), _handler_ptype(), _otype(), _sender_ptype(), _handler_ptype(),
_api_id(), _status_string() _api_id(), _status_string()

View file

@ -37,11 +37,11 @@
#define _TT_MP_RPC #define _TT_MP_RPC
#include "tt_options.h" #include "tt_options.h"
#if defined(linux) #if defined(__linux__)
# define __SVR4_I386_ABI_L1__ # define __SVR4_I386_ABI_L1__
#endif #endif
#include <rpc/rpc.h> #include <rpc/rpc.h>
#if defined(linux) #if defined(__linux__)
# undef __SVR4_I386_ABI_L1__ # undef __SVR4_I386_ABI_L1__
#endif #endif

View file

@ -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 // Set close-on-exec bit so a libtt client which forks and execs won't
// be short some fd's in the child. // 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 // 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 // how the original code below can be correct, so we'll do it
// differently. // differently.

View file

@ -34,7 +34,7 @@
#include "tt_options.h" #include "tt_options.h"
#include <stdio.h> #include <stdio.h>
#include "mp/mp_stream_socket.h" #include "mp/mp_stream_socket.h"
#if defined(linux) #if defined(__linux__)
#include <sys/poll.h> #include <sys/poll.h>
#else #else
#include <poll.h> #include <poll.h>
@ -170,7 +170,7 @@ init(int init_as_source)
return 0; return 0;
} }
#else #else
#if defined(linux) || defined(CSRG_BASED) #if defined(__linux__) || defined(CSRG_BASED)
socklen_t len; socklen_t len;
#else #else
int len; int len;
@ -437,7 +437,7 @@ accept()
{ {
if (_msgsock == -1) { if (_msgsock == -1) {
#ifndef OPT_TLI #ifndef OPT_TLI
#if defined(linux) || defined(CSRG_BASED) #if defined(__linux__) || defined(CSRG_BASED)
socklen_t addrlen = sizeof(sockaddr_in); socklen_t addrlen = sizeof(sockaddr_in);
#else #else
int addrlen = sizeof(sockaddr_in); int addrlen = sizeof(sockaddr_in);

View file

@ -408,7 +408,7 @@
# undef OPT_TAR_HAS_EXCLUDE_OPTION # undef OPT_TAR_HAS_EXCLUDE_OPTION
# define OPT_BUG_RPCINTR # define OPT_BUG_RPCINTR
#elif defined(linux) #elif defined(__linux__)
# undef OPT_UNIX_SOCKET_RPC # undef OPT_UNIX_SOCKET_RPC
# undef OPT_TLI # undef OPT_TLI

View file

@ -25,7 +25,7 @@
//%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. //%% (c) Copyright 1993, 1994 Sun Microsystems, Inc.
//%% (c) Copyright 1993, 1994 Novell, Inc. //%% (c) Copyright 1993, 1994 Novell, Inc.
//%% $TOG: tttk.C /main/5 1999/09/14 13:00:44 mgreess $ //%% $TOG: tttk.C /main/5 1999/09/14 13:00:44 mgreess $
#if defined(linux) #if defined(__linux__)
# include <sys/poll.h> # include <sys/poll.h>
#else #else
# include <poll.h> # include <poll.h>

View file

@ -449,7 +449,7 @@ _Tt_string _tt_entrypt_to_string(_Tt_entry_pt fun)
return "tt_feature_enabled"; return "tt_feature_enabled";
case TT_FEATURE_REQUIRED : case TT_FEATURE_REQUIRED :
return "tt_feature_required"; return "tt_feature_required";
#if defined(linux) #if defined(__linux__)
case TT_API_CALL_LAST: return (char *) NULL; case TT_API_CALL_LAST: return (char *) NULL;
#elif defined(OPT_CONST_CORRECT) #elif defined(OPT_CONST_CORRECT)
case TT_API_CALL_LAST: return (const char *) NULL; case TT_API_CALL_LAST: return (const char *) NULL;

View file

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

View file

@ -48,11 +48,11 @@
# endif # endif
#elif defined(OPT_CATGETS) #elif defined(OPT_CATGETS)
# if defined(linux) # if defined(__linux__)
extern "C" { extern "C" {
# endif # endif
# include <nl_types.h> # include <nl_types.h>
# if defined(linux) # if defined(__linux__)
} }
# endif # endif
# if !defined(NL_CAT_LOCALE) # if !defined(NL_CAT_LOCALE)

View file

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

View file

@ -36,12 +36,12 @@
#define X_INCLUDE_NETDB_H #define X_INCLUDE_NETDB_H
#define XOS_USE_XT_LOCKING #define XOS_USE_XT_LOCKING
#if defined(linux) || defined(CSRG_BASED) #if defined(__linux__) || defined(CSRG_BASED)
#define index #define index
#define rindex #define rindex
#endif #endif
#include <X11/Xos_r.h> #include <X11/Xos_r.h>
#if defined(linux) || defined(CSRG_BASED) #if defined(__linux__) || defined(CSRG_BASED)
#undef index #undef index
#undef rindex #undef rindex
#endif #endif

View file

@ -225,7 +225,7 @@ _Tt_ostream::operator <<(
return *this; 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 // This operator is being added to take care of uid_t and gid_t
const _Tt_ostream & const _Tt_ostream &
_Tt_ostream::operator <<( _Tt_ostream::operator <<(

View file

@ -86,7 +86,7 @@ class _Tt_ostream : public virtual _Tt_allocated {
const _Tt_ostream &operator <<( const _Tt_ostream &operator <<(
int n int n
) const; ) const;
#if defined(linux) || defined(CSRG_BASED) #if defined(__linux__) || defined(CSRG_BASED)
const _Tt_ostream &operator <<( const _Tt_ostream &operator <<(
unsigned int n unsigned int n
) const; ) const;

View file

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

View file

@ -49,12 +49,12 @@
/* Included after "util/tt_string.h" to avoid index/strchr conflicts. */ /* Included after "util/tt_string.h" to avoid index/strchr conflicts. */
#define X_INCLUDE_DIRENT_H #define X_INCLUDE_DIRENT_H
#define XOS_USE_NO_LOCKING #define XOS_USE_NO_LOCKING
#if defined(linux) || defined(CSRG_BASED) #if defined(__linux__) || defined(CSRG_BASED)
#define index #define index
#define rindex #define rindex
#endif #endif
#include <X11/Xos_r.h> #include <X11/Xos_r.h>
#if defined(linux) || defined(CSRG_BASED) #if defined(__linux__) || defined(CSRG_BASED)
#undef index #undef index
#undef rindex #undef rindex
#endif #endif

View file

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

View file

@ -45,12 +45,12 @@
/* Included after "util/tt_string.h" to avoid index/strchr conflicts. */ /* Included after "util/tt_string.h" to avoid index/strchr conflicts. */
#define X_INCLUDE_STRING_H #define X_INCLUDE_STRING_H
#define XOS_USE_NO_LOCKING #define XOS_USE_NO_LOCKING
#if defined(linux) || defined(CSRG_BASED) #if defined(__linux__) || defined(CSRG_BASED)
#define index #define index
#define rindex #define rindex
#endif #endif
#include <X11/Xos_r.h> #include <X11/Xos_r.h>
#if defined(linux) || defined(CSRG_BASED) #if defined(__linux__) || defined(CSRG_BASED)
#undef index #undef index
#undef rindex #undef rindex
#endif #endif

View file

@ -41,7 +41,7 @@
#include "util/tt_trace_parser.h" #include "util/tt_trace_parser.h"
#include "util/tt_entry_pt_names.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> #include <fcntl.h>
#endif #endif

View file

@ -39,7 +39,7 @@ static char sccsid[] = "@(#)iscntl.c 1.8 94/11/17";
* Generic control function * Generic control function
*/ */
#if defined(linux) || defined(CSRG_BASED) || defined(sun) #if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <stdarg.h> #include <stdarg.h>
#else #else
#include <varargs.h> #include <varargs.h>
@ -79,7 +79,7 @@ static char sccsid[] = "@(#)iscntl.c 1.8 94/11/17";
typedef int (* intfunc)(); typedef int (* intfunc)();
#if defined(linux) || defined(CSRG_BASED) || defined(sun) #if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
int int
iscntl(int isfd, int func, ...) iscntl(int isfd, int func, ...)
#else #else
@ -94,7 +94,7 @@ iscntl(isfd, func, va_alist)
va_list pvar; va_list pvar;
int ret; int ret;
#if defined(linux) || defined(CSRG_BASED) || defined(sun) #if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
va_start(pvar, func); va_start(pvar, func);
#else #else
va_start(pvar); va_start(pvar);

View file

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

View file

@ -26,7 +26,7 @@
//%% (c) Copyright 1993, 1994 Novell, Inc. //%% (c) Copyright 1993, 1994 Novell, Inc.
//%% $TOG: mp_ptype.C /main/4 1998/03/20 14:27:56 mgreess $ //%% $TOG: mp_ptype.C /main/4 1998/03/20 14:27:56 mgreess $
#include <stdlib.h> #include <stdlib.h>
#if defined(linux) || defined(CSRG_BASED) #if defined(__linux__) || defined(CSRG_BASED)
/*# include <g++/minmax.h>*/ /*# include <g++/minmax.h>*/
#else #else
# include <macros.h> # include <macros.h>

View file

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

View file

@ -350,7 +350,7 @@ gettransient(int proto, int vers, int *sockp)
#ifndef OPT_TLI #ifndef OPT_TLI
int found; int found;
int s; int s;
#if defined(linux) || defined(CSRG_BASED) #if defined(__linux__) || defined(CSRG_BASED)
socklen_t len; socklen_t len;
#else #else
int len; int len;
@ -399,7 +399,7 @@ gettransient(int proto, int vers, int *sockp)
} }
int optval = 0; int optval = 0;
#if !defined(linux) #if !defined(__linux__)
if (setsockopt(s, SOL_SOCKET, SO_USELOOPBACK, if (setsockopt(s, SOL_SOCKET, SO_USELOOPBACK,
(char *)&optval, sizeof(optval)) == -1) { (char *)&optval, sizeof(optval)) == -1) {
} }

View file

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

View file

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

View file

@ -49,7 +49,7 @@
#include <locale.h> #include <locale.h>
#include <sys/param.h> /* for MAXPATHLEN and MAXHOSTNAMELEN */ #include <sys/param.h> /* for MAXPATHLEN and MAXHOSTNAMELEN */
#if defined(sun) || defined(linux) #if defined(sun) || defined(__linux__)
#include <crypt.h> #include <crypt.h>
#include <shadow.h> #include <shadow.h>
#endif #endif
@ -403,7 +403,7 @@ SetGidUid ( unsigned short rgid, unsigned short ruid )
/* fix process gid */ /* fix process gid */
#if defined(SVR4) || defined(_AIX) #if defined(SVR4) || defined(_AIX)
setgid(rgid); setgid(rgid);
#elif defined(linux) || defined(CSRG_BASED) #elif defined(__linux__) || defined(CSRG_BASED)
if(-1 == setregid(rgid, rgid)) { if(-1 == setregid(rgid, rgid)) {
fprintf(stderr, "SetGidUid: setregid failed on %d\n", rgid); fprintf(stderr, "SetGidUid: setregid failed on %d\n", rgid);
} }
@ -416,7 +416,7 @@ SetGidUid ( unsigned short rgid, unsigned short ruid )
/* fix process uid */ /* fix process uid */
#if defined (SVR4) || defined (_AIX) #if defined (SVR4) || defined (_AIX)
setuid(ruid); setuid(ruid);
#elif defined(linux) || defined(CSRG_BASED) #elif defined(__linux__) || defined(CSRG_BASED)
if(-1 == setreuid(ruid, ruid)) { if(-1 == setreuid(ruid, ruid)) {
fprintf(stderr, "SetGidUid: setreuid failed on %d\n", ruid); fprintf(stderr, "SetGidUid: setreuid failed on %d\n", ruid);
} }

View file

@ -65,7 +65,7 @@
#define BRWS_DASH_WIDTH 3 #define BRWS_DASH_WIDTH 3
#define BRWS_NUM_DASHES 3 #define BRWS_NUM_DASHES 3
#if !defined(linux) #if !defined(__linux__)
/* /*
* Somehow the compiler is not picking up strdup() * Somehow the compiler is not picking up strdup()
* from string.h properly... * from string.h properly...

View file

@ -64,7 +64,7 @@
#include "abmf.h" #include "abmf.h"
/* glibc considers CLK_TCK obsolete */ /* glibc considers CLK_TCK obsolete */
#if defined(linux) && !defined(CLK_TCK) #if defined(__linux__) && !defined(CLK_TCK)
#define CLK_TCK CLOCKS_PER_SEC #define CLK_TCK CLOCKS_PER_SEC
#endif #endif

View file

@ -279,7 +279,7 @@ printf_setval(GenCodeInfo genCodeInfo, ABObj obj, ...)
{ {
int return_value = 0; int return_value = 0;
File codeFile = genCodeInfo->code_file; 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 /* Define va_list in <va_list.h> as structure of char ** and int
* Sun define va_list as void * */ * Sun define va_list as void * */
va_list paramList = { 0, 0 }; va_list paramList = { 0, 0 };

View file

@ -350,7 +350,7 @@ write_func_def_params(
va_list va_params va_list va_params
) )
{ {
#if defined(__ppc) || defined(linux) #if defined(__ppc) || defined(__linux__)
#define va_start_params() __va_copy(params, va_params) #define va_start_params() __va_copy(params, va_params)
#elif defined(CSRG_BASED) #elif defined(CSRG_BASED)
#define va_start_params() va_copy(params, va_params) #define va_start_params() va_copy(params, va_params)

View file

@ -66,7 +66,7 @@
extern "C" { extern "C" {
#endif #endif
#if !defined(linux) #if !defined(__linux__)
extern char *strdup(const char *); extern char *strdup(const char *);
#endif #endif

View file

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

View file

@ -57,7 +57,7 @@ static char sccsid[] = "$TOG: RFCMIME.c /main/11 1999/06/30 12:08:55 mgreess $";
#include <RFCMIME.h> #include <RFCMIME.h>
/* Iconv not defined for linux. Use the EUSCompat stubs instead. */ /* Iconv not defined for linux. Use the EUSCompat stubs instead. */
#if !defined(linux) #if !defined(__linux__)
# include <iconv.h> # include <iconv.h>
#endif #endif
#include <EUSCompat.h> #include <EUSCompat.h>

View file

@ -132,7 +132,7 @@ static char sccsid[] = "@(#)calendarA.c 1.196 95/04/12 Copyr 1991 Sun Microsyst
#include "cmtt.h" #include "cmtt.h"
#endif #endif
#if defined(linux) #if defined(__linux__)
#undef SVR4 #undef SVR4
#endif #endif
#include <X11/Xos.h> #include <X11/Xos.h>

View file

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

View file

@ -81,7 +81,7 @@ static char sccsid[] = "@(#)dayglance.c 1.76 95/04/24 Copyr 1991 Sun Microsystem
#define XOS_USE_XT_LOCKING #define XOS_USE_XT_LOCKING
#define X_INCLUDE_TIME_H #define X_INCLUDE_TIME_H
#if defined(linux) #if defined(__linux__)
#undef SVR4 #undef SVR4
#endif #endif
#include <X11/Xos_r.h> #include <X11/Xos_r.h>

View file

@ -72,7 +72,7 @@
static Bool lookForButton(Display *, XEvent *, XPointer); static Bool lookForButton(Display *, XEvent *, XPointer);
#if !defined(linux) && !defined(CSRG_BASED) #if !defined(__linux__) && !defined(CSRG_BASED)
extern char *sys_errlist[]; extern char *sys_errlist[];
#endif #endif

View file

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

View file

@ -69,7 +69,7 @@ static char sccsid[] = "@(#)format.c 1.27 95/01/19 Copyr 1991 Sun Microsystems,
#define XOS_USE_XT_LOCKING #define XOS_USE_XT_LOCKING
#define X_INCLUDE_TIME_H #define X_INCLUDE_TIME_H
#if defined(linux) #if defined(__linux__)
#undef SVR4 #undef SVR4
#endif #endif
#include <X11/Xos_r.h> #include <X11/Xos_r.h>

View file

@ -102,7 +102,7 @@ static char sccsid[] = "@(#)monthglance.c 1.82 95/07/27 Copyr 1994 Sun Microsys
#define XOS_USE_XT_LOCKING #define XOS_USE_XT_LOCKING
#define X_INCLUDE_TIME_H #define X_INCLUDE_TIME_H
#if defined(linux) #if defined(__linux__)
#undef SVR4 #undef SVR4
#endif #endif
#include <X11/Xos_r.h> #include <X11/Xos_r.h>

View file

@ -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_cancel_cb();
static void tb_close_cb(); static void tb_close_cb();
static void tempbr_show_cb(Widget w, XtPointer data, XtPointer cbs); static void tempbr_show_cb(Widget w, XtPointer data, XtPointer cbs);
#if defined(linux) #if defined(__linux__)
#include <string.h> #include <string.h>
#else #else
extern char *strdup(const char *); extern char *strdup(const char *);

View file

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

View file

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

View file

@ -88,7 +88,7 @@ static char sccsid[] = "@(#)yearglance.c 1.37 95/07/27 Copyr 1991 Sun Microsyste
#define XOS_USE_XT_LOCKING #define XOS_USE_XT_LOCKING
#define X_INCLUDE_TIME_H #define X_INCLUDE_TIME_H
#if defined(linux) #if defined(__linux__)
#undef SVR4 #undef SVR4
#endif #endif
#include <X11/Xos_r.h> #include <X11/Xos_r.h>

View file

@ -58,11 +58,11 @@ static char sccsid[] = "@(#)timeops.c 1.13 95/05/02 Copyr 1991 Sun Microsystems,
#define XOS_USE_NO_LOCKING #define XOS_USE_NO_LOCKING
#define X_INCLUDE_TIME_H #define X_INCLUDE_TIME_H
#if defined(linux) #if defined(__linux__)
#undef SVR4 #undef SVR4
#endif #endif
#include <X11/Xos_r.h> #include <X11/Xos_r.h>
#if defined(linux) #if defined(__linux__)
#define SVR4 #define SVR4
#endif #endif

View file

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

View file

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

View file

@ -428,7 +428,7 @@ setinput (FILE* f)
return(-1); return(-1);
} }
#if !defined(linux) #if !defined(__linux__)
/* no madvise so we lose this optimization */ /* no madvise so we lose this optimization */
madvise(start_of_mmapped_area, len, MADV_SEQUENTIAL); madvise(start_of_mmapped_area, len, MADV_SEQUENTIAL);
#endif #endif

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

Some files were not shown because too many files have changed in this diff Show more