# define StandardCppDefines -traditional
#endif /* Mc68020Architecture */
-#define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines
+#define StandardDefines -D__linux__ LinuxMachineDefines LinuxSourceDefines
#define ConnectionFlags -DUNIXCONN -DTCPCONN
#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
#endif
#ifdef linux
"-traditional",
- "-Dlinux",
+ "-D__linux__",
#endif
#ifdef __sxg__
"-D__sxg__",
# 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]"
#ifdef mc68020
{"mc68020", "1"},
#endif
-#if defined(__GNUC__) && !defined(linux)
+#if defined(__GNUC__) && !defined(__linux__)
{"__GNUC__", DEF_STRINGIFY(__GNUC__)},
#endif
#ifdef __GNUC_MINOR__
** 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
#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
* 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);
#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
#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
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
* - 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
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 */
#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>
#include <Dt/Dts.h>
#include "DtSvcLock.h"
-#if !defined(linux)
+#if !defined(__linux__)
extern char *strdup(const char *);
#endif
#include "Dt/DtsDb.h"
#include "Dt/Dts.h"
-#if !defined(linux)
+#if !defined(__linux__)
extern char *strdup(const char *);
#endif
*/
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';
sprintf(pe, " %lx", XtWindow(drawArea[i]));
}
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
putenv(envdata);
#endif
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 *);
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")))
{
_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
&& ( 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.
#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>
/* 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];
#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
/* 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
#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);
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();
#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)]
#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
#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 = " ");
#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
#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>
#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
#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
#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>
#if defined(__AIX)
# define PTY_CLONE_DEVICE "/dev/ptc"
-#elif defined(linux)
+#elif defined(__linux__)
# define PTY_CLONE_DEVICE "/dev/ptyc"
#endif /* __AIX */
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)) {
#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
* 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 */
(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 {
/* 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
(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
# include <wchar.h>
# endif
# include <libintl.h>
-#elif defined(linux)
+#elif defined(__linux__)
# include <wctype.h>
# define NO_putwc
#elif defined(CSRG_BASED)
#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)
extern void
_DtCm_process_updates()
{
-#if defined(CSRG_BASED) || defined(linux)
+#if defined(CSRG_BASED) || defined(__linux__)
int i, nfd;
fd_set rpc_bits;
#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
}
/* 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));
#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
#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"
#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)
#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)
#ifdef __cplusplus
extern "C" {
#endif
-#if !defined(linux)
+#if !defined(__linux__)
void exit(int);
#endif
#ifdef __cplusplus
#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)
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();
#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);
#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)
*/
#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>
/*
* basename() - Return the last component of a pathname.
*/
-#if !defined(linux)
+#if !defined(__linux__)
char *basename( char *pathname ) {
char *the_basename;
*
*/
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <unistd.h>
#else
#include <osfcn.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
-#if defined(linux)
+#if defined(__linux__)
# include <sys/poll.h>
#else
# include <poll.h>
#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
#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"
_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()
#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
// 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.
#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>
return 0;
}
#else
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
socklen_t len;
#else
int len;
{
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);
# undef OPT_TAR_HAS_EXCLUDE_OPTION
# define OPT_BUG_RPCINTR
-#elif defined(linux)
+#elif defined(__linux__)
# undef OPT_UNIX_SOCKET_RPC
# undef OPT_TLI
//%% (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>
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;
#include <stdio.h>
#include <string.h>
#include <errno.h>
-#if defined(linux)
+#if defined(__linux__)
# include <sys/poll.h>
#else
# include <poll.h>
# 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)
#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
#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
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 <<(
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;
#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
/* 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
#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"
/* 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
#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
* 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>
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
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);
* 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>
//%% (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>
#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>
#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;
}
int optval = 0;
-#if !defined(linux)
+#if !defined(__linux__)
if (setsockopt(s, SOL_SOCKET, SO_USELOOPBACK,
(char *)&optval, sizeof(optval)) == -1) {
}
* 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>
// databases.
//
#include <stdlib.h>
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
/*# include <g++/minmax.h>*/
#else
# include <macros.h>
#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
/* 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);
}
/* 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);
}
#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...
#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
{
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 };
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)
extern "C" {
#endif
-#if !defined(linux)
+#if !defined(__linux__)
extern char *strdup(const char *);
#endif
#define XOS_USE_XT_LOCKING
#define X_INCLUDE_TIME_H
-#if defined(linux)
+#if defined(__linux__)
#undef SVR4
#endif
#include <X11/Xos_r.h>
#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>
#include "cmtt.h"
#endif
-#if defined(linux)
+#if defined(__linux__)
#undef SVR4
#endif
#include <X11/Xos.h>
#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>
#define XOS_USE_XT_LOCKING
#define X_INCLUDE_TIME_H
-#if defined(linux)
+#if defined(__linux__)
#undef SVR4
#endif
#include <X11/Xos_r.h>
static Bool lookForButton(Display *, XEvent *, XPointer);
-#if !defined(linux) && !defined(CSRG_BASED)
+#if !defined(__linux__) && !defined(CSRG_BASED)
extern char *sys_errlist[];
#endif
#define XOS_USE_XT_LOCKING
#define X_INCLUDE_TIME_H
-#if defined(linux)
+#if defined(__linux__)
#undef SVR4
#endif
#include <X11/Xos_r.h>
#define XOS_USE_XT_LOCKING
#define X_INCLUDE_TIME_H
-#if defined(linux)
+#if defined(__linux__)
#undef SVR4
#endif
#include <X11/Xos_r.h>
#define XOS_USE_XT_LOCKING
#define X_INCLUDE_TIME_H
-#if defined(linux)
+#if defined(__linux__)
#undef SVR4
#endif
#include <X11/Xos_r.h>
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 *);
#define XOS_USE_XT_LOCKING
#define X_INCLUDE_TIME_H
-#if defined(linux)
+#if defined(__linux__)
#undef SVR4
#endif
#include <X11/Xos_r.h>
#define XOS_USE_XT_LOCKING
#define X_INCLUDE_TIME_H
-#if defined(linux)
+#if defined(__linux__)
#undef SVR4
#endif
#include <X11/Xos_r.h>
#define XOS_USE_XT_LOCKING
#define X_INCLUDE_TIME_H
-#if defined(linux)
+#if defined(__linux__)
#undef SVR4
#endif
#include <X11/Xos_r.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>
-#if defined(linux)
+#if defined(__linux__)
#define SVR4
#endif
#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>
#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>
return(-1);
}
-#if !defined(linux)
+#if !defined(__linux__)
/* no madvise so we lose this optimization */
madvise(start_of_mmapped_area, len, MADV_SEQUENTIAL);
#endif
#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>
#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"
#define XOS_USE_NO_LOCKING
#define X_INCLUDE_TIME_H
-#if defined(linux)
+#if defined(__linux__)
#undef SVR4
#endif
#include <X11/Xos_r.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>
#define XOS_USE_NO_LOCKING
#define X_INCLUDE_TIME_H
-#if defined(linux)
+#if defined(__linux__)
#undef SVR4
#endif
#include <X11/Xos_r.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>
#include <stdio.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>
#define XOS_USE_NO_LOCKING
#define X_INCLUDE_TIME_H
-#if defined(linux)
+#if defined(__linux__)
#undef SVR4
#endif
#include <X11/Xos_r.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>
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
*/
-#if defined(linux)
+#if defined(__linux__)
#define _POSIX_C_SOURCE 2
#endif
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);
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);
#include "utility.h"
#include "lutil.h"
-#if !defined(linux)
+#if !defined(__linux__)
extern char * strdup(const char *);
#endif
#if defined(AIXV3)
# include <sys/dir.h>
#else
-# if defined(linux)
+# if defined(__linux__)
# include <dirent.h>
# else
# include <sys/dirent.h>
#if defined(AIXV3)
# include <sys/dir.h>
#else
-# if defined(linux)
+# if defined(__linux__)
# include <dirent.h>
# else
# include <sys/dirent.h>
* 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 <features.h>
/* glibc removed matherr() support between 2.26 and 2.27 */
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 27) || __GLIBC__ >= 3
*****************************************************************************/
static void
-#if defined(__aix) || defined(CSRG_BASED) || defined(linux)
+#if defined(__aix) || defined(CSRG_BASED) || defined(__linux__)
PanicSignal(int s)
#else
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)
*****************************************************************************/
static void
-#if defined(__aix) || defined(CSRG_BASED) || defined(linux)
+#if defined(__aix) || defined(CSRG_BASED) || defined(__linux__)
UrgentSignal(int i)
#else
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)
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
* 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();
# include <sys/fs/ufs_fs.h>
# define ROOTINO UFSROOTINO
#else
-# if defined(linux) || defined(CSRG_BASED)
+# if defined(__linux__) || defined(CSRG_BASED)
# define ROOTINO 2
# endif
# include <sys/param.h>
if (lstat (to, &s2) >= 0) /* <to> 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 */
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)
{
# define ROOTINO UFSROOTINO
#endif /* SVR4 */
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
# include <sys/param.h>
# define ROOTINO 2
#endif
#endif
/* Iconv not defined for linux. Use the EUSCompat stubs instead. */
-#if !defined(linux)
+#if !defined(__linux__)
# include <iconv.h>
#else
# include <EUSCompat.h>
#endif
#include <ctype.h>
-#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 <unistd.h>
#include <locale.h>
#endif
#if defined(_AIX)
INIT("AIX")
#endif
-#if defined(linux)
+#if defined(__linux__)
INIT("LINUX")
#endif
#if defined(sun)
*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 */
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];
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);
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
#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");
#endif
#include <ctype.h>
-#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 <unistd.h>
#include <locale.h>
#include <fcntl.h>
#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****
#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
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
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);
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
{
M_WCHAR *wc_userdef;
-#if defined(linux)
+#if defined(__linux__)
m_outfile = stdout;
m_errfile = stderr;
#endif
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))
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
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];
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);
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
"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))
sizeof(literal) + M_LITLEN - 2)] ;
#endif
-#if defined(linux)
+#if defined(__linux__)
m_outfile = stdout;
m_errfile = stderr;
#endif
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
#endif
#include <ctype.h>
-#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 <unistd.h>
#include <locale.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/wait.h>
-#if defined(linux)
+#if defined(__linux__)
# include <sys/fcntl.h>
#endif
#include <errno.h>
-#if defined(linux)
+#if defined(__linux__)
#include <getopt.h>
#endif
sizeof(literal) + M_LITLEN - 2)] ;
#endif
-#if defined(linux)
+#if defined(__linux__)
m_outfile = stdout;
m_errfile = stderr;
#endif
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
#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
#include <X11/Xproto.h> /* for X_ChangeHosts */
#include <X11/Xatom.h> /* for XA_STRING */
-#if !defined(linux) && !defined(CSRG_BASED)
+#if !defined(__linux__) && !defined(CSRG_BASED)
extern char *sys_errlist[];
#endif
#include <setjmp.h>
#include <unistd.h>
-#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
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
{
// 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
#include <stdlib.h>
-#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
+#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
#include <osfcn.h>
#endif
#include <stdlib.h>
-#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
+#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
#include <osfcn.h>
#endif
* 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
#include <stdlib.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <unistd.h>
#else
#include <osfcn.h>
#include <stdlib.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <unistd.h>
#else
#include <osfcn.h>
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
#else
Exception();
-#if defined(linux) && defined(EXC_DEBUG)
+#if defined(__linux__) && defined(EXC_DEBUG)
~Exception()
{
PRINTF (("Destroying Exception @ %p\n", this));
#include <stdlib.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <unistd.h>
#else
#include <osfcn.h>
#include <sys/types.h>
#include <unistd.h>
-#if !defined(hpux) && !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
+#if !defined(hpux) && !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
#include <sysent.h>
#endif
#include <sys/utsname.h>
#endif
-#if defined(linux)
+#if defined(__linux__)
#include <sys/vfs.h>
#include <stdarg.h>
#elif defined(_AIX)
#ifndef _funcs_h
#define _funcs_h 1
-#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
+#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
#include <libc.h>
#endif
#if defined(hpux) || defined(sgi) || \
- defined(linux) || defined(CSRG_BASED) || defined(sun)
+ defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <unistd.h>
#else
#include <sysent.h>
/* $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 <stdlib.h>
#else
#include <libc.h>
//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;
* Campbell, CA 95008
*
*/
-#if defined(SVR4) || defined(hpux) || defined(linux) || defined(__NetBSD__)
+#if defined(SVR4) || defined(hpux) || defined(__linux__) || defined(__NetBSD__)
#include <limits.h>
#else
#include <sys/limits.h>
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 <signal.h>
#else
#include <sys/signal.h>
#include <ctype.h>
#include <stdio.h>
#include <unistd.h>
-#if !defined(hpux) && !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
+#if !defined(hpux) && !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
#include <sysent.h>
#endif
#include <sys/types.h>
#endif
#include <wchar.h>
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
#include <wctype.h>
#endif
#include <WWL/WXmPushButton.h>
#include <stdlib.h>
-#if defined(SVR4) || defined(SYSV) || defined(linux) || defined(CSRG_BASED)
+#if defined(SVR4) || defined(SYSV) || defined(__linux__) || defined(CSRG_BASED)
#include <limits.h>
#endif
};
template <class T>
-#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
#ifdef SC3
friend class List_Iterator<T>;
#else
-#if !defined(_IBMR2) && !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
+#if !defined(_IBMR2) && !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
template <class T> friend class List_Iterator;
#endif
#endif
template <class T>
-#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
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:
/* Copyright (c) 1995 FUJITSU LIMITED */
/* All Rights Reserved */
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
#include <string.h>
#else
#include <strings.h>
UAS_Pointer<UAS_Common> bcase() { return uas_bcase; }
-#if !defined(SC3) && !defined(linux)
+#if !defined(SC3) && !defined(__linux__)
protected:
template <class T> friend class UAS_Pointer;
#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
// /__ \/ F-91405 ORSAY Cedex +33 (1) 69 41 66 29
#include <X11/Intrinsic.h>
-#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
+#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
#include <generic.h>
#else
#define name2(__n1,__n2) __paste2(__n1,__n2)
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
#include <stdlib.h>
-#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
+#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
#include <osfcn.h>
#endif
#include <stdlib.h>
-#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
+#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
# include <osfcn.h>
#endif
#include <stdlib.h>
-#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
+#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
#include <osfcn.h>
#endif
#include <stdlib.h>
-#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
+#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
# include <osfcn.h>
#else
# include <unistd.h>
#ifdef __cplusplus
#include <stdlib.h>
-#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
+#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
#include <osfcn.h>
#endif
#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 <osfcn.h>
#else
#include <unistd.h>
%{ /* -*- 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 <osfcn.h>
#else
#include <unistd.h>
#ifdef __cplusplus
#include <stdlib.h>
-#if !defined(__DECCXX) && !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
+#if !defined(__DECCXX) && !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
#include <osfcn.h>
#else
#include <unistd.h>
#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
#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
#include "defs.h"
#include <fcin.h>
/* 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
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);
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);
#else
#undef ioctl
#endif
- #if !defined(linux)
+ #if !defined(__linux__)
extern int ioctl(int, int, ...);
#endif
}end
* workaround botched headers that assume <stdio.h>
*/
-#if !defined(CSRG_BASED) && !defined(linux)
+#if !defined(CSRG_BASED) && !defined(__linux__)
#ifndef FILE
#define FILE Sfio_t
#endif
#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)
#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
#define _STDIO_INCLUDED 1
#endif
-#if !defined(CSRG_BASED) && !defined(linux)
+#if !defined(CSRG_BASED) && !defined(__linux__)
#ifndef FILE
#define FILE Sfio_t
#endif
#endif
typedef struct _sfio_ Sfile_t, Sfio_t, SFIO;
-#if defined(linux)
+#if defined(__linux__)
typedef struct _sfio_ FILE;
typedef struct _sfio_ __FILE;
#endif
#define stdout sfstdout
#define stderr sfstderr
#define BUFSIZ SF_BUFSIZE
-#if !defined(linux)
+#if !defined(__linux__)
#ifdef FILE
#undef FILE
#endif
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));
#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
#include <ast.h>
#include <hash.h>
/* 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
#include <ast.h>
#include <hash.h>
/* 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
#include <ast.h>
#include <hash.h>
/* 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
#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
#include <ast.h>
#include <hash.h>
/* 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
#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
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
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;
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
Dtlogin.exportList: ODMDIR NLSPATH TZ
#endif
-#if defined(CSRG_BASED) || defined(linux)
+#if defined(CSRG_BASED) || defined(__linux__)
Dtlogin.exportList: NLSPATH LANG
#endif
XCOMM
XCOMM Dtlogin*userPath: <path>
-#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
XCOMM
XCOMM Dtlogin*openTimeout: <seconds>
-#if defined(CSRG_BASED) || defined(linux)
+#if defined(CSRG_BASED) || defined(__linux__)
Dtlogin*openTimeout: 15
Dtlogin*serverAttempts: 3
Dtlogin*wakeupInterval: 20
XCOMM
XCOMM Set background to default weave.
XCOMM
-#if defined(linux)
+#if defined(__linux__)
XDIR=/usr/bin
#endif
#if defined(__FreeBSD__)
* 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
#ifdef sun
XDIR=/usr/openwin/bin
-#elif defined(linux)
+#elif defined(__linux__)
XDIR=/usr/bin
#elif defined(__OpenBSD__)
XDIR=/usr/X11R6/bin
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)
#endif
#endif
-#if defined(linux)
+#if defined(__linux__)
#ifdef cpp_Xsetup
if [ "$DTXSERVERLOCATION" != "remote" ]; then
fontpath=
* 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());
# include <time.h>
# include <utime.h>
# include <pwd.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
# include <stdarg.h>
#else
# include <varargs.h>
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 ())
TrimErrorFile();
-#if defined(SYSV) && !defined(hpux) && !defined(_AIX) && !defined(linux)
+#if defined(SYSV) && !defined(hpux) && !defined(_AIX) && !defined(__linux__)
WaitForChild ();
#else
WaitForSomething ();
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 )
{
#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"
***************************************************************************/
/*#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 <sys/wait.h>
# define waitCode(w) WEXITSTATUS(w)
# define waitSig(w) WTERMSIG(w)
*
***************************************************************************/
-#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
* 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
int
InitCryptoKey( void )
{
-#if defined(linux)
+#if defined(__linux__)
/* non-blocking */
char *key_file = "/dev/urandom";
#elif defined(CSRG_BASED) || defined(sun)
#define generic
#endif
-#if defined(linux)
+#if defined(__linux__)
# include <shadow.h>
#endif
p = getpwnam(name);
-#if defined(linux)
+#if defined(__linux__)
/*
* Use the Linux Shadow Password system to get the crypt()ed password
*/
* 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 ());
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;
/*
#include <Xm/MessageB.h>
#include <assert.h>
-#if !defined(linux) && !defined(CSRG_BASED)
+#if !defined(__linux__) && !defined(CSRG_BASED)
extern void forceUpdate( Widget );
#endif
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().
#include <unistd.h>
#include <wchar.h>
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
#define wcswcs wcsstr
#include <wctype.h>
#endif
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
#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"
// END Order dependent for AIX
//
#include <sys/stat.h>
-#if !defined(linux)
+#if !defined(__linux__)
# include <sys/statvfs.h>
#endif
#include <sys/types.h>
#include <DtMail/Threads.hh>
#if !defined(IOV_MAX)
- #if !defined(linux)
+ #if !defined(__linux__)
#include <sys/stream.h>
#endif
#if !defined(DEF_IOV_MAX)
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
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
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;
#include <stropts.h>
#elif defined(HPUX)
#include <sys/poll.h>
-#elif defined(_AIX) || defined(linux)
+#elif defined(_AIX) || defined(__linux__)
#define INFTIM (-1) /* Infinite timeout */
#endif
extern "C" {
#endif
-#if !defined(linux)
+#if !defined(__linux__)
# include <iconv.h>
#else
// Iconv not defined for linux. Use the EUSCompat stubs instead.
extern "C" {
#endif
-#if !defined(linux)
+#if !defined(__linux__)
// Iconv not defined for linux. Use the EUSCompat stubs instead. */
# include <iconv.h>
#else
_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(
#include <sys/stat.h>
#include <sys/param.h>
#include <sys/uio.h>
-#if !defined(__aix) && !defined(__hpux) && !defined(linux) && !defined(CSRG_BASED)
+#if !defined(__aix) && !defined(__hpux) && !defined(__linux__) && !defined(CSRG_BASED)
#include <sys/systeminfo.h>
#endif
#include <sys/wait.h>
#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
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);
//
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,
// 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,
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");
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;
#include <stropts.h>
#elif defined(HPUX)
#include <sys/poll.h>
-#elif defined(_AIX) || defined(linux)
+#elif defined(_AIX) || defined(__linux__)
#define INFTIM (-1) /* Infinite timeout */
#endif
*
*****************************************************************************/
static void
-#if defined(__aix) || defined(linux)
+#if defined(__aix) || defined(__linux__)
handle_SIGCLD(int sigNum)
#else
handle_SIGCLD(void)
#include <stdlib.h>
#ifdef hpux
#include <time.h>
-#elif defined(linux)
+#elif defined(__linux__)
#include <sys/time.h>
#else
#include <sys/select.h>
#define true B_TRUE
#define false B_FALSE
#endif
-#elif defined(linux)
+#elif defined(__linux__)
#define false 0
#define true 1
#define boolean int
int n
)
{
-#if !defined(linux) && !defined(CSRG_BASED)
+#if !defined(__linux__) && !defined(CSRG_BASED)
extern char *sys_errlist[];
extern int sys_nerr;
#endif
#define true B_TRUE
#define false B_FALSE
#endif
-#elif defined(linux)
+#elif defined(__linux__)
#define false 0
#define true 1
#define boolean int
}
#endif // HP LOCAL PARSER
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED)
//Linux local parser
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);
#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)
{
int size[MAXCOLORS];
} wormstruct;
-#if !defined(CSRG_BASED) && !defined(sun) && !defined(linux)
+#if !defined(CSRG_BASED) && !defined(sun) && !defined(__linux__)
int
round(float x)
{
#include "Options.h"
#include <stdlib.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <iostream>
#else
#include <iostream.h>
#include "dtappgather.h"
#include "DirIterator.h"
#include <stdlib.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <iostream>
#else
#include <iostream.h>
}
}
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
std::ostream & operator<<
(
std::ostream & os,
)
#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;
#include "Options.h"
#include <stdlib.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <iostream>
#else
#include <iostream.h>
*
****************************************************************/
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
void SearchPath::PrettyPrint
(
std::ostream & os
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;
*
****************************************************************/
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
std::ostream & operator<<
(
std::ostream & os,
)
#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;
#include "Environ.h"
#include "cstring.h"
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <iostream>
#else
#include <iostream.h>
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 &);
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 &);
return *this;
}
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
std::ostream & operator<<
(
std::ostream & os,
#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
<< 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;
};
#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 &);
#include <sys/stat.h>
#include <stdlib.h>
#include <string.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <iostream>
#else
#include <iostream.h>
#endif
#include <errno.h>
-#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
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";
}
}
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
std::ostream & operator<<
(
std::ostream & os,
#ifndef _CSTRING_H_
#define _CSTRING_H_
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <iostream>
#else
#include <iostream.h>
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 &);
#include <stdio.h>
#include <fcntl.h>
-#if !defined(linux)
+#if !defined(__linux__)
#include <nlist.h>
#endif
#include <X11/Intrinsic.h>
/*
* 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;
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)
# include <shadow.h>
#endif
-#if defined(linux)
+#if defined(__linux__)
# include <shadow.h>
#endif
#if defined(CSRG_BASED)
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,
return FALSE;
}
-#elif defined(linux)
+#elif defined(__linux__)
{
struct passwd *pwent = NULL;
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 */
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)
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)
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)
}
/* 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));
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 ;
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 ;
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 ;
#include <stdint.h>
#include "_fallibint.h"
#include "_fallcint.h"
-#if defined(linux)
+#if defined(__linux__)
#include <locale.h>
#else
#include <X11/Xlocale.h>
#if defined(__GNUC__)
-#if !defined(linux)
+#if !defined(__linux__)
#define alloca ___builtin_alloca
#endif
#define ALLOCATE_LOCAL(size) alloca((int)(size))
{
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 ;
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 ;
#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() \
{
#ifndef NO_SETPGRP
-#if defined(SVR4) || defined(linux)
+#if defined(SVR4) || defined(__linux__)
setsid();
#else
#ifdef SYSV
{
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");
#include "ConsoleOutput.h"
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <iostream>
#include <fstream>
using namespace std;
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;
#include <stddef.h>
#endif
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <fstream>
using namespace std;
#else
#ifdef SP_SHORT_HEADERS
#include <strstrea.h>
#else
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <strstream>
#else
#include <strstream.h>
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<char> result(s, stream.pcount());
#else
String<char> result(s, stream.out_waiting());
#include <stddef.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <streambuf>
using namespace std;
#else
#ifdef SP_MULTI_BYTE
#include "EUCJPCodingSystem.h"
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <iostream>
#else
#include <iostream.h>
#include "Fixed2CodingSystem.h"
#include "macros.h"
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <iostream>
#else
#include <iostream.h>
#include "splib.h"
#include "IdentityCodingSystem.h"
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <iostream>
#else
#include <iostream.h>
#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 <iostream>
#else
#include <iostream.h>
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();
#include "Owner.h"
#include "CodingSystem.h"
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <streambuf>
using namespace std;
#else
#include "SJISCodingSystem.h"
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <iostream>
#else
#include <iostream.h>
#include "UTF8CodingSystem.h"
#include "constant.h"
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <iostream>
#else
#include <iostream.h>
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 <iostream>
#else
#include <iostream.h>
#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
#include "sptchar.h"
#include "macros.h"
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <iostream>
#include <fstream>
#else
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);
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_;
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)
#else /* not SP_NEW_H_MISSING */
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <new>
#else
#include <new.h>
#include <fcntl.h>
#include <unistd.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <strstream>
#else
#include <strstream.h>
*** 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 <fstream>
#include <strstream>
#else
#include <sys/wait.h>
#include <Xm/TextF.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <fstream>
#include <strstream>
#else
*** 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 <strstream>
#else
#include <strstream.h>
*** 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 <strstream>
#else
#include <strstream.h>
#include <Xm/TextF.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <fstream>
#include <strstream>
#else
#include <Xm/TextF.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <fstream>
#else
#include <fstream.h>
#include <stdio.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <strstream>
#else
#include <strstream.h>
#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 <iostream>
using namespace std;
#else
#include <sys/stat.h>
#include <time.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <iostream>
#include <strstream>
#include <fstream>
}
}
-#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
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);
#include <unistd.h>
-#if defined(linux) || defined(CSRG_BASED) || defined(sun)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <fstream>
#include <strstream>
#else
#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 <regex.h>
#else
#include <regexp.h>
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;
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:"^.*",
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:"^.*",
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:"^.*",
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:"^.*",
{
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)
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,
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)