mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Generify source code
Previously we would fail in some parts of the code if we did not have a premade configuration, now we use any code that was marked as Linux, BSD and Solaris as our basis in order to support building unknown Unix systems.
This commit is contained in:
parent
06863e826e
commit
45cee195bd
70 changed files with 46 additions and 1250 deletions
123
cde/.gitignore
vendored
123
cde/.gitignore
vendored
|
@ -22,130 +22,14 @@ imports/motif
|
||||||
# exports of libraries/headers
|
# exports of libraries/headers
|
||||||
exports
|
exports
|
||||||
|
|
||||||
# admin/IntegTools/
|
|
||||||
admin/IntegTools/post_install/*.list
|
|
||||||
admin/IntegTools/post_install/*.lst
|
|
||||||
|
|
||||||
admin/IntegTools/post_install/linux/CDE-MIN.list
|
|
||||||
admin/IntegTools/post_install/linux/CDE-MIN.lst
|
|
||||||
admin/IntegTools/post_install/linux/CDE-RUN.list
|
|
||||||
admin/IntegTools/post_install/linux/CDE-RUN.lst
|
|
||||||
admin/IntegTools/post_install/linux/CDE-SHLIBS.list
|
|
||||||
admin/IntegTools/post_install/linux/CDE-SHLIBS.lst
|
|
||||||
admin/IntegTools/post_install/linux/CDE-TT.list
|
|
||||||
admin/IntegTools/post_install/linux/CDE-TT.lst
|
|
||||||
admin/IntegTools/post_install/linux/configMin
|
|
||||||
admin/IntegTools/post_install/linux/configRun
|
|
||||||
admin/IntegTools/post_install/linux/configShlibs
|
|
||||||
admin/IntegTools/post_install/linux/configTT
|
|
||||||
|
|
||||||
admin/IntegTools/post_install/freebsd/CDE-MIN.list
|
|
||||||
admin/IntegTools/post_install/freebsd/CDE-MIN.lst
|
|
||||||
admin/IntegTools/post_install/freebsd/CDE-RUN.list
|
|
||||||
admin/IntegTools/post_install/freebsd/CDE-RUN.lst
|
|
||||||
admin/IntegTools/post_install/freebsd/CDE-SHLIBS.list
|
|
||||||
admin/IntegTools/post_install/freebsd/CDE-SHLIBS.lst
|
|
||||||
admin/IntegTools/post_install/freebsd/CDE-TT.list
|
|
||||||
admin/IntegTools/post_install/freebsd/CDE-TT.lst
|
|
||||||
admin/IntegTools/post_install/freebsd/configMin
|
|
||||||
admin/IntegTools/post_install/freebsd/configRun
|
|
||||||
admin/IntegTools/post_install/freebsd/configShlibs
|
|
||||||
admin/IntegTools/post_install/freebsd/configTT
|
|
||||||
|
|
||||||
admin/IntegTools/post_install/openbsd/CDE-MIN.list
|
|
||||||
admin/IntegTools/post_install/openbsd/CDE-MIN.lst
|
|
||||||
admin/IntegTools/post_install/openbsd/CDE-RUN.list
|
|
||||||
admin/IntegTools/post_install/openbsd/CDE-RUN.lst
|
|
||||||
admin/IntegTools/post_install/openbsd/CDE-SHLIBS.list
|
|
||||||
admin/IntegTools/post_install/openbsd/CDE-SHLIBS.lst
|
|
||||||
admin/IntegTools/post_install/openbsd/CDE-TT.list
|
|
||||||
admin/IntegTools/post_install/openbsd/CDE-TT.lst
|
|
||||||
admin/IntegTools/post_install/openbsd/configMin
|
|
||||||
admin/IntegTools/post_install/openbsd/configRun
|
|
||||||
admin/IntegTools/post_install/openbsd/configShlibs
|
|
||||||
admin/IntegTools/post_install/openbsd/configTT
|
|
||||||
|
|
||||||
admin/IntegTools/post_install/netbsd/CDE-MIN.list
|
|
||||||
admin/IntegTools/post_install/netbsd/CDE-MIN.lst
|
|
||||||
admin/IntegTools/post_install/netbsd/CDE-RUN.list
|
|
||||||
admin/IntegTools/post_install/netbsd/CDE-RUN.lst
|
|
||||||
admin/IntegTools/post_install/netbsd/CDE-SHLIBS.list
|
|
||||||
admin/IntegTools/post_install/netbsd/CDE-SHLIBS.lst
|
|
||||||
admin/IntegTools/post_install/netbsd/CDE-TT.list
|
|
||||||
admin/IntegTools/post_install/netbsd/CDE-TT.lst
|
|
||||||
admin/IntegTools/post_install/netbsd/configMin
|
|
||||||
admin/IntegTools/post_install/netbsd/configRun
|
|
||||||
admin/IntegTools/post_install/netbsd/configShlibs
|
|
||||||
admin/IntegTools/post_install/netbsd/configTT
|
|
||||||
|
|
||||||
admin/IntegTools/post_install/sun/CDE-MIN.list
|
|
||||||
admin/IntegTools/post_install/sun/CDE-MIN.lst
|
|
||||||
admin/IntegTools/post_install/sun/CDE-RUN.list
|
|
||||||
admin/IntegTools/post_install/sun/CDE-RUN.lst
|
|
||||||
admin/IntegTools/post_install/sun/CDE-SHLIBS.list
|
|
||||||
admin/IntegTools/post_install/sun/CDE-SHLIBS.lst
|
|
||||||
admin/IntegTools/post_install/sun/CDE-TT.list
|
|
||||||
admin/IntegTools/post_install/sun/CDE-TT.lst
|
|
||||||
admin/IntegTools/post_install/sun/configMin
|
|
||||||
admin/IntegTools/post_install/sun/configRun
|
|
||||||
admin/IntegTools/post_install/sun/configShlibs
|
|
||||||
admin/IntegTools/post_install/sun/configTT
|
|
||||||
|
|
||||||
admin/IntegTools/post_install/configDemos
|
|
||||||
admin/IntegTools/post_install/configFonts
|
|
||||||
admin/IntegTools/post_install/configHelp
|
|
||||||
admin/IntegTools/post_install/configHelpPrg
|
|
||||||
admin/IntegTools/post_install/configHelpRun
|
|
||||||
admin/IntegTools/post_install/configIcons
|
|
||||||
admin/IntegTools/post_install/configInc
|
|
||||||
admin/IntegTools/post_install/configMan
|
|
||||||
admin/IntegTools/post_install/configManDev
|
|
||||||
admin/IntegTools/post_install/configMsgCat
|
|
||||||
admin/IntegTools/post_install/configPrg
|
|
||||||
admin/IntegTools/post_install/configShlibs
|
|
||||||
|
|
||||||
install.dt
|
|
||||||
install.dt.hp
|
|
||||||
install.dt.ibm
|
|
||||||
install.dt.sun
|
|
||||||
dinstall.dt
|
|
||||||
dinstallCDE
|
|
||||||
installCDE
|
|
||||||
updateCDE
|
|
||||||
|
|
||||||
installCDE.*.log
|
installCDE.*.log
|
||||||
|
|
||||||
cscope.out
|
cscope.out
|
||||||
|
|
||||||
# Makefiles (generated by Imakefiles)
|
# Makefiles
|
||||||
Makefile
|
Makefile
|
||||||
xmakefile
|
|
||||||
|
|
||||||
# generated db files
|
# examples
|
||||||
databases/*\.db
|
|
||||||
databases/*\.tmp
|
|
||||||
databases/CDE-MIN.udb
|
|
||||||
databases/CDE-RUN.udb
|
|
||||||
databases/CDE-C.udb
|
|
||||||
databases/CDE-DE.udb
|
|
||||||
databases/CDE-ES.udb
|
|
||||||
databases/CDE-FR.udb
|
|
||||||
databases/CDE-IT.udb
|
|
||||||
databases/CDE-JP.udb
|
|
||||||
databases/CDE-INFOLIB-*\.udb
|
|
||||||
databases/CDE-HELP-*\.udb
|
|
||||||
databases/CDE-MSG-*\.udb
|
|
||||||
databases/CDE-SHLIBS\.udb
|
|
||||||
|
|
||||||
# config
|
|
||||||
config/imake/imake
|
|
||||||
config/makedepend/makedepend
|
|
||||||
config/util/lndir
|
|
||||||
config/util/makestrs
|
|
||||||
config/util/mergelib
|
|
||||||
config/util/xmkmf
|
|
||||||
|
|
||||||
# exampls
|
|
||||||
examples/tt/broadcast
|
examples/tt/broadcast
|
||||||
|
|
||||||
# Compiled binaries and misc generated program files
|
# Compiled binaries and misc generated program files
|
||||||
|
@ -367,9 +251,6 @@ programs/dtappbuilder/src/abmf/dtcodegen.cat
|
||||||
programs/dtappbuilder/src/libABil/bil_parse.c
|
programs/dtappbuilder/src/libABil/bil_parse.c
|
||||||
programs/dtappbuilder/src/libABil/bil_parse.h
|
programs/dtappbuilder/src/libABil/bil_parse.h
|
||||||
|
|
||||||
# imake
|
|
||||||
config/imake/Makefile.proto
|
|
||||||
|
|
||||||
# doc
|
# doc
|
||||||
book.log
|
book.log
|
||||||
book.out.idx
|
book.out.idx
|
||||||
|
|
|
@ -86,7 +86,6 @@
|
||||||
# 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)
|
|
||||||
# undef __SVR4_I386_ABI_L1__
|
# undef __SVR4_I386_ABI_L1__
|
||||||
# ifndef WORD_BIT
|
# ifndef WORD_BIT
|
||||||
# define WORD_BIT 32
|
# define WORD_BIT 32
|
||||||
|
@ -94,7 +93,6 @@
|
||||||
# ifndef LONG_BIT
|
# ifndef LONG_BIT
|
||||||
# define LONG_BIT 32
|
# define LONG_BIT 32
|
||||||
# endif
|
# endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#define db_VERSION "3.dt" /* was "3.10" */
|
#define db_VERSION "3.dt" /* was "3.10" */
|
||||||
#define dbd_VERSION "V3.dt\032" /* was "V3.00\032" */
|
#define dbd_VERSION "V3.dt\032" /* was "V3.00\032" */
|
||||||
|
|
|
@ -52,9 +52,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(__linux__) || defined(SunOS) || defined(CSRG_BASED)
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CSRG_BASED) || defined(__linux__)
|
#if defined(CSRG_BASED) || defined(__linux__)
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
|
|
|
@ -242,15 +242,7 @@ DocParser::process(istream &input, ostringstream &output,
|
||||||
break;
|
break;
|
||||||
case AttributeSection:
|
case AttributeSection:
|
||||||
{
|
{
|
||||||
#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \
|
|
||||||
!defined(CSRG_BASED) && !defined(sun)
|
|
||||||
volatile
|
|
||||||
#endif
|
|
||||||
AttributeList *attrs = 0;
|
AttributeList *attrs = 0;
|
||||||
#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \
|
|
||||||
!defined(CSRG_BASED) && !defined(sun)
|
|
||||||
volatile
|
|
||||||
#endif
|
|
||||||
AttributeList *olias_attrs = 0;
|
AttributeList *olias_attrs = 0;
|
||||||
|
|
||||||
mtry
|
mtry
|
||||||
|
|
|
@ -141,20 +141,8 @@ BinaryOperatorNode::evaluate() const
|
||||||
{
|
{
|
||||||
// calculate children trees and then have feature value do the operation
|
// calculate children trees and then have feature value do the operation
|
||||||
|
|
||||||
#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \
|
|
||||||
!defined(CSRG_BASED) && !defined(sun)
|
|
||||||
volatile
|
|
||||||
#endif
|
|
||||||
FeatureValue *left = 0;
|
FeatureValue *left = 0;
|
||||||
#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \
|
|
||||||
!defined(CSRG_BASED) && !defined(sun)
|
|
||||||
volatile
|
|
||||||
#endif
|
|
||||||
FeatureValue *right = 0;
|
FeatureValue *right = 0;
|
||||||
#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \
|
|
||||||
!defined(CSRG_BASED) && !defined(sun)
|
|
||||||
volatile
|
|
||||||
#endif
|
|
||||||
FeatureValue *result = 0;
|
FeatureValue *result = 0;
|
||||||
|
|
||||||
mtry
|
mtry
|
||||||
|
|
|
@ -85,14 +85,6 @@ typedef unsigned int size_t;
|
||||||
typedef unsigned int sigset_t;
|
typedef unsigned int sigset_t;
|
||||||
#endif
|
#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)
|
|
||||||
#define VSPRINTF_CHARSTAR
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If you don't have POSIX 1003.1 signals, the signal code surrounding the
|
* If you don't have POSIX 1003.1 signals, the signal code surrounding the
|
||||||
* temporary file creation is intended to block all of the possible signals
|
* temporary file creation is intended to block all of the possible signals
|
||||||
|
|
|
@ -102,12 +102,6 @@ Destructable::~Destructable()
|
||||||
inline void
|
inline void
|
||||||
Destructable::destruct()
|
Destructable::destruct()
|
||||||
{
|
{
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
delete this;
|
delete this;
|
||||||
#else
|
|
||||||
// Have to call this here since some compilers don't allow
|
|
||||||
// qualified calls through object pointer.
|
|
||||||
Destructable::~Destructable();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -26,10 +26,6 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
|
|
||||||
#include <sysent.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
|
@ -52,14 +52,7 @@
|
||||||
#ifndef _funcs_h
|
#ifndef _funcs_h
|
||||||
#define _funcs_h 1
|
#define _funcs_h 1
|
||||||
|
|
||||||
#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
|
|
||||||
#include <libc.h>
|
|
||||||
#endif
|
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#else
|
|
||||||
#include <sysent.h>
|
|
||||||
#endif
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -22,12 +22,7 @@
|
||||||
*/
|
*/
|
||||||
/* $XConsortium: streambuf.C /main/8 1996/08/21 15:55:14 drk $ */
|
/* $XConsortium: streambuf.C /main/8 1996/08/21 15:55:14 drk $ */
|
||||||
#include "utility/c_streambuf.h"
|
#include "utility/c_streambuf.h"
|
||||||
|
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#else
|
|
||||||
#include <libc.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define DEF_BUF_SIZ 4096
|
#define DEF_BUF_SIZ 4096
|
||||||
|
|
||||||
|
|
|
@ -7,16 +7,10 @@ libraima_la_CFLAGS = -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
|
||||||
-DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \
|
-DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \
|
||||||
-DNO_TRANS -DUNIX -D_POSIX_SOURCE -DMULTIBYTE
|
-DNO_TRANS -DUNIX -D_POSIX_SOURCE -DMULTIBYTE
|
||||||
|
|
||||||
if LINUX
|
|
||||||
libraima_la_CFLAGS += -D_XOPEN_SOURCE=700
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BSD
|
|
||||||
libraima_la_CFLAGS += -D_XOPEN_SOURCE=700
|
|
||||||
endif
|
|
||||||
|
|
||||||
if SOLARIS
|
if SOLARIS
|
||||||
libraima_la_CFLAGS += -D_XOPEN_SOURCE=500 -DNO_REGCOMP
|
libraima_la_CFLAGS += -D_XOPEN_SOURCE=500
|
||||||
|
else
|
||||||
|
libraima_la_CFLAGS += -D_XOPEN_SOURCE=700
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,15 +36,7 @@
|
||||||
#ifndef __DYNARRAY_H_
|
#ifndef __DYNARRAY_H_
|
||||||
#define __DYNARRAY_H_
|
#define __DYNARRAY_H_
|
||||||
|
|
||||||
#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
|
|
||||||
#include <generic.h>
|
|
||||||
#endif
|
|
||||||
#if defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
|
||||||
#define _DELETE_ARRAY(sz) delete[]
|
#define _DELETE_ARRAY(sz) delete[]
|
||||||
#else
|
|
||||||
#define _DELETE_ARRAY(sz) delete[(sz)]
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// this is used to create an ARRAY of a TYPE
|
// this is used to create an ARRAY of a TYPE
|
||||||
#define declare_array(ARRAY, TYPE, BUMP) \
|
#define declare_array(ARRAY, TYPE, BUMP) \
|
||||||
|
|
|
@ -41,14 +41,6 @@ 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)
|
|
||||||
// Rejects valid inline declarations, claiming they have both internal and
|
|
||||||
// external linkage.
|
|
||||||
#else
|
|
||||||
inline static void *operator new(size_t size) { return malloc((unsigned)size); }
|
|
||||||
inline static void operator delete(void *p) { if (p) free((char*)p); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <codelibs/dynarray.h>
|
#include <codelibs/dynarray.h>
|
||||||
declare_array(privbuf_charbuf, char, 128)
|
declare_array(privbuf_charbuf, char, 128)
|
||||||
declare_array(privbuf_strvec, char*, 128)
|
declare_array(privbuf_strvec, char*, 128)
|
||||||
|
|
|
@ -66,28 +66,11 @@ 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)
|
|
||||||
char **strsep(const char *str, const char *sep,
|
|
||||||
boolean whsp = TRUE, int *num = NULL);
|
|
||||||
const char *strcmbn(const char **vec, const char *sep = " ");
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#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)
|
|
||||||
char **strsep(const char *str, const char *sep,
|
|
||||||
boolean whsp, int *num);
|
|
||||||
#endif
|
|
||||||
const char *strcmbn(const char **vec, const char *sep);
|
const char *strcmbn(const char **vec, const char *sep);
|
||||||
|
|
||||||
#endif /* __STDC__ */
|
#endif /* __STDC__ */
|
||||||
|
|
||||||
|
|
||||||
#ifdef __OBSOLETE
|
|
||||||
size_t nl_strlen(const char *str); /* __OBSOLETE */
|
|
||||||
int strcharsize(const char *str); /* __OBSOLETE */
|
|
||||||
#endif /* __OBSOLETE */
|
|
||||||
|
|
||||||
#else /* C */
|
#else /* C */
|
||||||
|
|
||||||
extern void strfree();
|
extern void strfree();
|
||||||
|
@ -102,12 +85,6 @@ extern unsigned strhashi();
|
||||||
|
|
||||||
extern char *strupper(), *strlower();
|
extern char *strupper(), *strlower();
|
||||||
|
|
||||||
|
|
||||||
#ifdef __OBSOLETE
|
|
||||||
extern int strcharsize(); /* __OBSOLETE */
|
|
||||||
extern size_t nl_strlen(); /* __OBSOLETE */
|
|
||||||
#endif /* __OBSOLETE */
|
|
||||||
|
|
||||||
#endif /* C */
|
#endif /* C */
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
@ -145,12 +122,6 @@ inline char *strdup(const char *s)
|
||||||
|
|
||||||
/* macros for funcs that work on top of privbuf versions */
|
/* macros for funcs that work on top of privbuf versions */
|
||||||
|
|
||||||
/* for backward compatibility only - __OBSOLETE */
|
|
||||||
#ifdef __OBSOLETE
|
|
||||||
#define strpos strstrx /* __OBSOLETE */
|
|
||||||
#define strrpos strrstrx /* __OBSOLETE */
|
|
||||||
#endif /* __OBSOLETE */
|
|
||||||
|
|
||||||
#endif /* C || __STDC__ */
|
#endif /* C || __STDC__ */
|
||||||
|
|
||||||
#endif /* __STRINGX_H_ */
|
#endif /* __STRINGX_H_ */
|
||||||
|
|
|
@ -33,11 +33,7 @@
|
||||||
#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)
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
# include <varargs.h>
|
|
||||||
#endif
|
|
||||||
#include "TermHeader.h"
|
#include "TermHeader.h"
|
||||||
#include "TermPrimDebug.h"
|
#include "TermPrimDebug.h"
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
|
@ -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(CSRG_BASED)
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#endif
|
#endif
|
||||||
#include "dbck.h"
|
#include "dbck.h"
|
||||||
|
|
|
@ -58,9 +58,6 @@ typedef int Bool;
|
||||||
|
|
||||||
extern char *ProgramName;
|
extern char *ProgramName;
|
||||||
|
|
||||||
#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
|
|
||||||
extern char *malloc(), *realloc();
|
|
||||||
#endif
|
|
||||||
int process_command(), auth_initialize(), auth_finalize();
|
int process_command(), auth_initialize(), auth_finalize();
|
||||||
extern int print_help();
|
extern int print_help();
|
||||||
extern int verbose;
|
extern int verbose;
|
||||||
|
|
|
@ -214,11 +214,7 @@ main(int argc, char** argv, char **envp)
|
||||||
void install_signal_handler();
|
void install_signal_handler();
|
||||||
SVCXPRT *transp;
|
SVCXPRT *transp;
|
||||||
struct sockaddr_in saddr;
|
struct sockaddr_in saddr;
|
||||||
# if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
socklen_t asize = sizeof(saddr);
|
socklen_t asize = sizeof(saddr);
|
||||||
# else
|
|
||||||
size_t asize = sizeof(saddr);
|
|
||||||
# endif
|
|
||||||
int is_aix = 0;
|
int is_aix = 0;
|
||||||
|
|
||||||
int do_garbage_collect = 0;
|
int do_garbage_collect = 0;
|
||||||
|
|
|
@ -37,13 +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)
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#else
|
|
||||||
#if !defined(sun)
|
|
||||||
#include <osfcn.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
|
@ -33,11 +33,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#else
|
|
||||||
#include <osfcn.h>
|
|
||||||
#endif
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include "api/c/api_api.h"
|
#include "api/c/api_api.h"
|
||||||
#include "Tt/tt_c.h"
|
#include "Tt/tt_c.h"
|
||||||
|
|
|
@ -32,11 +32,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#else
|
|
||||||
#include <osfcn.h>
|
|
||||||
#endif
|
|
||||||
#include "Tt/tt_c.h"
|
#include "Tt/tt_c.h"
|
||||||
#include "util/tt_iostream.h"
|
#include "util/tt_iostream.h"
|
||||||
#include "tttar_utils.h"
|
#include "tttar_utils.h"
|
||||||
|
|
|
@ -4,11 +4,6 @@ SUBDIRS = api db mp util tttk
|
||||||
|
|
||||||
lib_LTLIBRARIES = libtt.la
|
lib_LTLIBRARIES = libtt.la
|
||||||
|
|
||||||
# if you are on a system that does not support realpath(), you may need to
|
|
||||||
# include realpath.c in the _SOURCES
|
|
||||||
#
|
|
||||||
#libtt_la_SOURCES = realpath.c
|
|
||||||
|
|
||||||
libtt_la_SOURCES =
|
libtt_la_SOURCES =
|
||||||
|
|
||||||
# fake things so libtool creates this as a C++ library
|
# fake things so libtool creates this as a C++ library
|
||||||
|
|
|
@ -1,160 +0,0 @@
|
||||||
/*
|
|
||||||
* CDE - Common Desktop Environment
|
|
||||||
*
|
|
||||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
|
||||||
*
|
|
||||||
* These libraries and programs are free software; you can
|
|
||||||
* redistribute them and/or modify them under the terms of the GNU
|
|
||||||
* Lesser General Public License as published by the Free Software
|
|
||||||
* Foundation; either version 2 of the License, or (at your option)
|
|
||||||
* any later version.
|
|
||||||
*
|
|
||||||
* These libraries and programs are distributed in the hope that
|
|
||||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
|
||||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
||||||
* PURPOSE. See the GNU Lesser General Public License for more
|
|
||||||
* details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with these libraries and programs; if not, write
|
|
||||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
|
||||||
* Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
/*%% (c) Copyright 1993, 1994 Hewlett-Packard Company */
|
|
||||||
/*%% (c) Copyright 1993, 1994 International Business Machines Corp. */
|
|
||||||
/*%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. */
|
|
||||||
/*%% (c) Copyright 1993, 1994 Novell, Inc. */
|
|
||||||
/*%% $XConsortium: realpath.c /main/3 1995/10/23 09:49:50 rswiston $ */
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/param.h>
|
|
||||||
#include <strings.h>
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
/* This is used when the operating system does not provide us with
|
|
||||||
* a realpath implementation. It's named differently so there is
|
|
||||||
* no name clash between it and the system version of realpath.
|
|
||||||
*/
|
|
||||||
|
|
||||||
char *
|
|
||||||
_tt_internal_realpath(pathname, finalpath)
|
|
||||||
char *pathname;
|
|
||||||
char *finalpath;
|
|
||||||
{
|
|
||||||
struct stat sbuf;
|
|
||||||
char curpath[MAXPATHLEN],
|
|
||||||
workpath[MAXPATHLEN],
|
|
||||||
linkpath[MAXPATHLEN],
|
|
||||||
namebuf[MAXPATHLEN],
|
|
||||||
*where,
|
|
||||||
*ptr,
|
|
||||||
*last;
|
|
||||||
int len;
|
|
||||||
int nlink = 0; /* To keep track of loops in the path. */
|
|
||||||
|
|
||||||
strcpy(curpath, pathname);
|
|
||||||
|
|
||||||
if (*pathname != '/') {
|
|
||||||
#if defined(__STDC__)
|
|
||||||
if (!getcwd(workpath)) {
|
|
||||||
#else
|
|
||||||
if (!getwd(workpath)) {
|
|
||||||
#endif
|
|
||||||
strcpy(finalpath, ".");
|
|
||||||
return(NULL);
|
|
||||||
}
|
|
||||||
} else *workpath = NULL;
|
|
||||||
|
|
||||||
/* curpath is the path we're still resolving */
|
|
||||||
/* linkpath is the path a symbolic link points to */
|
|
||||||
/* workpath is the path we've resolved */
|
|
||||||
|
|
||||||
loop:
|
|
||||||
where = curpath;
|
|
||||||
while (*where != NULL) {
|
|
||||||
if (!strcmp(where, ".")) {
|
|
||||||
where++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* deal with "./" */
|
|
||||||
if (!strncmp(where, "./", 2)) {
|
|
||||||
where += 2;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* deal with "../" */
|
|
||||||
if (!strncmp(where, "../", 3)) {
|
|
||||||
where += 3;
|
|
||||||
ptr = last = workpath;
|
|
||||||
while (*ptr) {
|
|
||||||
if (*ptr == '/') last = ptr;
|
|
||||||
ptr++;
|
|
||||||
}
|
|
||||||
*last = NULL;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
ptr = strchr(where, '/');
|
|
||||||
if (!ptr)
|
|
||||||
ptr = where + strlen(where) - 1;
|
|
||||||
else
|
|
||||||
*ptr = NULL;
|
|
||||||
|
|
||||||
strcpy(namebuf, workpath);
|
|
||||||
|
|
||||||
for (last = namebuf; *last; last++) continue;
|
|
||||||
|
|
||||||
/* tack on a trailing, or leading, `/` */
|
|
||||||
if (last == namebuf || *--last != '/') {
|
|
||||||
strcat(namebuf, "/");
|
|
||||||
}
|
|
||||||
|
|
||||||
strcat(namebuf, where);
|
|
||||||
|
|
||||||
where = ++ptr;
|
|
||||||
if (lstat(namebuf, &sbuf) == -1) {
|
|
||||||
strcpy(finalpath, namebuf);
|
|
||||||
return(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((sbuf.st_mode & S_IFLNK) == S_IFLNK) {
|
|
||||||
/* Look for loop in path such as link to self. */
|
|
||||||
nlink++;
|
|
||||||
if (nlink > MAXSYMLINKS) {
|
|
||||||
errno = ELOOP;
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
len = readlink(namebuf, linkpath, MAXPATHLEN);
|
|
||||||
if (len == 0) {
|
|
||||||
strcpy(finalpath, namebuf);
|
|
||||||
return(NULL);
|
|
||||||
}
|
|
||||||
*(linkpath + len) = NULL; /* readlink doesn't null-terminate result */
|
|
||||||
if (*linkpath == '/') *workpath = NULL;
|
|
||||||
if (*where) {
|
|
||||||
strcat(linkpath, "/");
|
|
||||||
strcat(linkpath, where);
|
|
||||||
}
|
|
||||||
strcpy(curpath, linkpath);
|
|
||||||
goto loop;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((sbuf.st_mode & S_IFDIR) == S_IFDIR) {
|
|
||||||
strcpy(workpath, namebuf);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*where) {
|
|
||||||
strcpy(finalpath, namebuf);
|
|
||||||
return(NULL); /* path/notadir/morepath */
|
|
||||||
} else
|
|
||||||
strcpy(workpath, namebuf);
|
|
||||||
}
|
|
||||||
strcpy(finalpath, workpath);
|
|
||||||
return(finalpath);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,146 +0,0 @@
|
||||||
/*
|
|
||||||
* CDE - Common Desktop Environment
|
|
||||||
*
|
|
||||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
|
||||||
*
|
|
||||||
* These libraries and programs are free software; you can
|
|
||||||
* redistribute them and/or modify them under the terms of the GNU
|
|
||||||
* Lesser General Public License as published by the Free Software
|
|
||||||
* Foundation; either version 2 of the License, or (at your option)
|
|
||||||
* any later version.
|
|
||||||
*
|
|
||||||
* These libraries and programs are distributed in the hope that
|
|
||||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
|
||||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
||||||
* PURPOSE. See the GNU Lesser General Public License for more
|
|
||||||
* details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with these libraries and programs; if not, write
|
|
||||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
|
||||||
* Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
/*%% (c) Copyright 1993, 1994 Hewlett-Packard Company */
|
|
||||||
/*%% (c) Copyright 1993, 1994 International Business Machines Corp. */
|
|
||||||
/*%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. */
|
|
||||||
/*%% (c) Copyright 1993, 1994 Novell, Inc. */
|
|
||||||
/*%% $XConsortium: realpath.hp.c /main/3 1995/10/23 09:49:57 rswiston $ */
|
|
||||||
/* @(#)realpath.hp.c 1.3 93/07/30
|
|
||||||
* Version of realpath for HP/UX systems */
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/param.h>
|
|
||||||
#include <strings.h>
|
|
||||||
|
|
||||||
char *
|
|
||||||
realpath(pathname, finalpath)
|
|
||||||
char *pathname;
|
|
||||||
char *finalpath;
|
|
||||||
{
|
|
||||||
struct stat sbuf;
|
|
||||||
char curpath[MAXPATHLEN],
|
|
||||||
workpath[MAXPATHLEN],
|
|
||||||
linkpath[MAXPATHLEN],
|
|
||||||
namebuf[MAXPATHLEN],
|
|
||||||
*where,
|
|
||||||
*ptr,
|
|
||||||
*last;
|
|
||||||
int len;
|
|
||||||
|
|
||||||
strcpy(curpath, pathname);
|
|
||||||
|
|
||||||
if (*pathname != '/') {
|
|
||||||
#if defined(__STDC__)
|
|
||||||
if (!getcwd(workpath)) {
|
|
||||||
#else
|
|
||||||
if (!getwd(workpath)) {
|
|
||||||
#endif
|
|
||||||
strcpy(finalpath, ".");
|
|
||||||
return(NULL);
|
|
||||||
}
|
|
||||||
} else *workpath = NULL;
|
|
||||||
|
|
||||||
/* curpath is the path we're still resolving */
|
|
||||||
/* linkpath is the path a symbolic link points to */
|
|
||||||
/* workpath is the path we've resolved */
|
|
||||||
|
|
||||||
loop:
|
|
||||||
where = curpath;
|
|
||||||
while (*where != NULL) {
|
|
||||||
if (!strcmp(where, ".")) {
|
|
||||||
where++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* deal with "./" */
|
|
||||||
if (!strncmp(where, "./", 2)) {
|
|
||||||
where += 2;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* deal with "../" */
|
|
||||||
if (!strncmp(where, "../", 3)) {
|
|
||||||
where += 3;
|
|
||||||
ptr = last = workpath;
|
|
||||||
while (*ptr) {
|
|
||||||
if (*ptr == '/') last = ptr;
|
|
||||||
ptr++;
|
|
||||||
}
|
|
||||||
*last = NULL;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
ptr = strchr(where, '/');
|
|
||||||
if (!ptr)
|
|
||||||
ptr = where + strlen(where) - 1;
|
|
||||||
else
|
|
||||||
*ptr = NULL;
|
|
||||||
|
|
||||||
strcpy(namebuf, workpath);
|
|
||||||
for (last = namebuf; *last; last++) continue;
|
|
||||||
/* tack on a trailing, or leading, `/` */
|
|
||||||
if (last == namebuf || *--last != '/') {
|
|
||||||
strcat(namebuf, "/");
|
|
||||||
}
|
|
||||||
strcat(namebuf, where);
|
|
||||||
|
|
||||||
where = ++ptr;
|
|
||||||
if (lstat(namebuf, &sbuf) == -1) {
|
|
||||||
strcpy(finalpath, namebuf);
|
|
||||||
return(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((sbuf.st_mode & S_IFLNK) == S_IFLNK) {
|
|
||||||
len = readlink(namebuf, linkpath, MAXPATHLEN);
|
|
||||||
if (len == 0) {
|
|
||||||
strcpy(finalpath, namebuf);
|
|
||||||
return(NULL);
|
|
||||||
}
|
|
||||||
*(linkpath + len) = NULL; /* readlink doesn't null-terminate result */
|
|
||||||
if (*linkpath == '/') *workpath = NULL;
|
|
||||||
if (*where) {
|
|
||||||
strcat(linkpath, "/");
|
|
||||||
strcat(linkpath, where);
|
|
||||||
}
|
|
||||||
strcpy(curpath, linkpath);
|
|
||||||
goto loop;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((sbuf.st_mode & S_IFDIR) == S_IFDIR) {
|
|
||||||
strcpy(workpath, namebuf);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*where) {
|
|
||||||
strcpy(finalpath, namebuf);
|
|
||||||
return(NULL); /* path/notadir/morepath */
|
|
||||||
} else
|
|
||||||
strcpy(workpath, namebuf);
|
|
||||||
}
|
|
||||||
strcpy(finalpath, workpath);
|
|
||||||
return(finalpath);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -65,9 +65,6 @@
|
||||||
*
|
*
|
||||||
* OPT_PATCH -- if defined, build patch info into objects
|
* OPT_PATCH -- if defined, build patch info into objects
|
||||||
*
|
*
|
||||||
* OPT_BUG_SUNOS_4 -- used to flag special hacks only needed because
|
|
||||||
* of bugs or quirks in SunOS 4.x.
|
|
||||||
*
|
|
||||||
* OPT_BUG_SUNOS_5 -- used to flag special hacks only needed because
|
* OPT_BUG_SUNOS_5 -- used to flag special hacks only needed because
|
||||||
* of bugs or quirks in SunOS 5.x.
|
* of bugs or quirks in SunOS 5.x.
|
||||||
*
|
*
|
||||||
|
@ -77,9 +74,9 @@
|
||||||
* OPT_XDR_LONG_TYPE -- used for (64-bit) architectures where
|
* OPT_XDR_LONG_TYPE -- used for (64-bit) architectures where
|
||||||
* <rcp/xdr.h> defines x_putlong and x_getlong to not take "long*".
|
* <rcp/xdr.h> defines x_putlong and x_getlong to not take "long*".
|
||||||
*
|
*
|
||||||
* OPT_POSIX_SIGNAL -- set to assume posix-style sigaction() call.
|
* OPT_POSIX_SIGNAL -- set to assume posix-style sigaction() call (default).
|
||||||
* OPT_BSD_SIGNAL -- set to assume bsd-style signal() call.
|
* OPT_BSD_SIGNAL -- set to assume bsd-style signal() call.
|
||||||
* If *neither* OPT_POSIX_SIGNAL or OPT_BSD_SIGNAL is defined, use
|
* If OPT_POSIX_SIGNAL is undefined and OPT_BSD_SIGNAL is not set, use
|
||||||
* the old SVR2-style sigset().
|
* the old SVR2-style sigset().
|
||||||
*
|
*
|
||||||
* OPT_BSD_WAIT -- set to assume bsd-style wait() calls, which expect
|
* OPT_BSD_WAIT -- set to assume bsd-style wait() calls, which expect
|
||||||
|
@ -117,9 +114,6 @@
|
||||||
* the tttarfile file will appear after extracts, a small flaw but not a
|
* the tttarfile file will appear after extracts, a small flaw but not a
|
||||||
* fatal one.
|
* fatal one.
|
||||||
*
|
*
|
||||||
* OPT_HAS_REALPATH -- set if the system provides a realpath() library
|
|
||||||
* function; otherwise we'll use our local copy.
|
|
||||||
*
|
|
||||||
* OPT_PING_TRIES - The number of times to rpc-ping ttsession to
|
* OPT_PING_TRIES - The number of times to rpc-ping ttsession to
|
||||||
* see if ttsession is alive.
|
* see if ttsession is alive.
|
||||||
*
|
*
|
||||||
|
@ -191,136 +185,50 @@
|
||||||
# define GNU_STRCAST
|
# define GNU_STRCAST
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
#undef OPT_CPP_PATH
|
||||||
* To avoid ugly cpp command-line options, we instead centralize
|
#define OPT_CPP_PATH CPP_PROGRAM
|
||||||
* in the following code all knowledge about deducing the OS version
|
|
||||||
* from the definitions cpp gives us.
|
#ifdef sun
|
||||||
*/
|
#define OPT_CPP_OPTIONS "-B"
|
||||||
#if defined(sun)
|
|
||||||
# if !defined(OS_VERSION)
|
|
||||||
# if defined(OSMajorVersion)
|
|
||||||
# define OS_VERSION OSMajorVersion
|
|
||||||
# define OS_MINOR_VERSION OSMinorVersion
|
|
||||||
#else
|
#else
|
||||||
# if !defined(_STDIO_H) && !defined(__stdio_h)
|
#define OPT_BUG_RPCINTR
|
||||||
# include <stdio.h>
|
#define OPT_CPP_OPTIONS ""
|
||||||
|
#define OPT_AUTOMOUNT_PATH_FIX
|
||||||
|
#define OPT_DEFINE_SIG_PF
|
||||||
#endif
|
#endif
|
||||||
# if defined(_SIZE_T)
|
|
||||||
# define OS_VERSION 5
|
#ifdef __linux__
|
||||||
|
#define OPT_LOCAL_MOUNT_TYPE "ext2fs"
|
||||||
#else
|
#else
|
||||||
# define OS_VERSION 4
|
#define OPT_LOCAL_MOUNT_TYPE MNTTYPE_UFS
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define OPT_POSIX_SIGNAL
|
||||||
|
#define OPT_CATGETS
|
||||||
|
#define OPT_TAR_HAS_EXCLUDE_OPTION
|
||||||
|
|
||||||
#if defined(_AIX)
|
#if defined(_AIX)
|
||||||
# undef OPT_UNIX_SOCKET_RPC
|
# undef OPT_BUG_RPCINTR
|
||||||
# undef OPT_TLI
|
# undef OPT_LOCAL_MOUNT_TYPE
|
||||||
# undef OPT_DLOPEN_X11
|
|
||||||
# undef OPT_DLOPEN_CE
|
|
||||||
# undef OPT_ADDMSG_DIRECT
|
|
||||||
# define OPT_BUG_AIX
|
|
||||||
# undef OPT_SECURE_RPC
|
|
||||||
# undef OPT_CLASSING_ENGINE
|
|
||||||
# undef OPT_BSD_SIGNAL
|
|
||||||
# define OPT_POSIX_SIGNAL
|
|
||||||
# undef OPT_BSD_WAIT
|
|
||||||
# undef OPT_DGETTEXT
|
|
||||||
# define OPT_CATGETS
|
|
||||||
# define OPT_GETDTABLESIZE
|
|
||||||
# undef OPT_SYSINFO
|
|
||||||
# define OPT_CPP_PATH "/usr/ccs/lib/cpp"
|
|
||||||
# define OPT_CPP_OPTIONS ""
|
|
||||||
# undef OPT_SVR4_GETMNTENT
|
|
||||||
# undef OPT_LOCKF_MNTENT
|
|
||||||
# define OPT_DEFINE_SIG_PF
|
|
||||||
# undef OPT_TAR_HAS_EXCLUDE_OPTION
|
# undef OPT_TAR_HAS_EXCLUDE_OPTION
|
||||||
# undef OPT_HAS_REALPATH
|
# define OPT_BUG_AIX
|
||||||
# define OPT_AUTOMOUNT_PATH_FIX
|
# define OPT_GETDTABLESIZE
|
||||||
/* # define OPT_XTHREADS 1 */ /* Defaulted by -DXTHREADS */
|
/* # define OPT_XTHREADS 1 */ /* Defaulted by -DXTHREADS */
|
||||||
|
|
||||||
#elif defined(sun) && (OS_VERSION <= 4)
|
|
||||||
|
|
||||||
# define OPT_UNIX_SOCKET_RPC
|
|
||||||
# undef OPT_TLI
|
|
||||||
/* for 4.1.1 systems turning on any dlopen features on the */
|
|
||||||
/* client side would break clients with ld errors unless they */
|
|
||||||
/* linked with -ldl. OPT_DLOPEN_CE is ok since clients don't */
|
|
||||||
/* ever execute ce_* functions. */
|
|
||||||
# undef OPT_DLOPEN_X11
|
|
||||||
# undef OPT_DLOPEN_CE
|
|
||||||
# undef OPT_ADDMSG_DIRECT
|
|
||||||
# define OPT_SECURE_RPC
|
|
||||||
# undef OPT_CLASSING_ENGINE
|
|
||||||
# undef OPT_PATCH
|
|
||||||
# define OPT_BSD_SIGNAL
|
|
||||||
# define OPT_BSD_WAIT
|
|
||||||
# define OPT_DGETTEXT
|
|
||||||
# undef OPT_CATGETS
|
|
||||||
# undef OPT_GETDTABLESIZE
|
|
||||||
# undef OPT_SYSINFO
|
|
||||||
# define OPT_CPP_PATH "/usr/lib/cpp"
|
|
||||||
# define OPT_CPP_OPTIONS "-B"
|
|
||||||
# undef OPT_SVR4_GETMNTENT
|
|
||||||
# undef OPT_LOCKF_MNTENT
|
|
||||||
# define OPT_LOCAL_MOUNT_TYPE MNTTYPE_42
|
|
||||||
# undef OPT_OLD_RPC
|
|
||||||
# undef OPT_DEFINE_SIG_PF
|
|
||||||
# define OPT_TAR_HAS_EXCLUDE_OPTION
|
|
||||||
|
|
||||||
# define OPT_BUG_SUNOS_4
|
|
||||||
|
|
||||||
# define OPT_HAS_REALPATH
|
|
||||||
# undef OPT_AUTOMOUNT_PATH_FIX
|
|
||||||
|
|
||||||
#elif defined(sun) && (OS_VERSION >= 5)
|
#elif defined(sun) && (OS_VERSION >= 5)
|
||||||
|
|
||||||
# undef OPT_UNIX_SOCKET_RPC
|
|
||||||
# define OPT_TLI
|
# define OPT_TLI
|
||||||
# undef OPT_DLOPEN_X11
|
|
||||||
# undef OPT_DLOPEN_CE
|
|
||||||
# undef OPT_ADDMSG_DIRECT
|
|
||||||
# define OPT_SECURE_RPC
|
# define OPT_SECURE_RPC
|
||||||
# undef OPT_CLASSING_ENGINE
|
|
||||||
# undef OPT_BSD_SIGNAL
|
|
||||||
# define OPT_POSIX_SIGNAL
|
|
||||||
# undef OPT_BSD_WAIT
|
|
||||||
# undef OPT_DGETTEXT
|
|
||||||
# define OPT_CATGETS
|
|
||||||
# undef OPT_GETDTABLESIZE
|
|
||||||
# define OPT_SYSINFO
|
# define OPT_SYSINFO
|
||||||
# define OPT_CPP_PATH "/usr/ccs/lib/cpp"
|
|
||||||
# define OPT_CPP_OPTIONS "-B"
|
|
||||||
# define OPT_SVR4_GETMNTENT
|
# define OPT_SVR4_GETMNTENT
|
||||||
# define OPT_LOCKF_MNTENT
|
# define OPT_LOCKF_MNTENT
|
||||||
# define OPT_LOCAL_MOUNT_TYPE MNTTYPE_UFS
|
|
||||||
# undef OPT_DEFINE_SIG_PF
|
|
||||||
# define OPT_TAR_HAS_EXCLUDE_OPTION
|
|
||||||
|
|
||||||
# define OPT_HAS_REALPATH
|
|
||||||
# undef OPT_AUTOMOUNT_PATH_FIX
|
|
||||||
|
|
||||||
/* Does not work on X86 */
|
|
||||||
# if defined(i386) && OS_MINOR_VERSION <= 4
|
|
||||||
# undef OPT_GARBAGE_THREADS
|
|
||||||
# undef OPT_SOLARIS_THREADED_TRIES
|
|
||||||
# else
|
|
||||||
# define OPT_SOLARIS_THREADS 1
|
# define OPT_SOLARIS_THREADS 1
|
||||||
/* # define OPT_XTHREADS 1 */ /* Defaulted by -DXTHREADS */
|
/* # define OPT_XTHREADS 1 */ /* Defaulted by -DXTHREADS */
|
||||||
# define OPT_GARBAGE_THREADS 1
|
# define OPT_GARBAGE_THREADS 1
|
||||||
# define OPT_SOLARIS_THREADED_TRIES 10
|
# define OPT_SOLARIS_THREADED_TRIES 10
|
||||||
# endif
|
|
||||||
|
|
||||||
/* Solaris 2.5 and above, supports clnt_create_timed(3N) */
|
|
||||||
# if (OS_MINOR_VERSION >= 5)
|
|
||||||
# define OPT_HAS_CLNT_CREATE_TIMED 1
|
# define OPT_HAS_CLNT_CREATE_TIMED 1
|
||||||
# define OPT_CLNT_CREATE_TIMEOUT 30
|
# define OPT_CLNT_CREATE_TIMEOUT 30
|
||||||
# endif
|
|
||||||
|
|
||||||
/* TURN THESE OFF FOR NOW */
|
|
||||||
# undef OPT_GARBAGE_IN_PARALLEL
|
|
||||||
# undef OPT_GARBAGE_THREADS
|
|
||||||
|
|
||||||
/* Turn ON/OFF parallel threads for garbage collection */
|
/* Turn ON/OFF parallel threads for garbage collection */
|
||||||
# if defined(OPT_DO_AUTO_GARBAGE_COLLECT) && defined(OPT_SOLARIS_THREADS)
|
# if defined(OPT_DO_AUTO_GARBAGE_COLLECT) && defined(OPT_SOLARIS_THREADS)
|
||||||
|
@ -328,140 +236,23 @@
|
||||||
# define OPT_GARBAGE_THREADS 1
|
# define OPT_GARBAGE_THREADS 1
|
||||||
# else
|
# else
|
||||||
# define OPT_GARBAGE_IN_PARALLEL 0 /* used as a const */
|
# define OPT_GARBAGE_IN_PARALLEL 0 /* used as a const */
|
||||||
# undef OPT_GARBAGE_THREADS
|
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
|
|
||||||
# undef OPT_UNIX_SOCKET_RPC
|
|
||||||
# undef OPT_TLI
|
|
||||||
# undef OPT_DLOPEN_X11
|
|
||||||
# undef OPT_DLOPEN_CE
|
|
||||||
# undef OPT_ADDMSG_DIRECT
|
|
||||||
# undef OPT_SECURE_RPC
|
|
||||||
# undef OPT_CLASSING_ENGINE
|
|
||||||
# undef OPT_PATCH
|
|
||||||
# define OPT_POSIX_SIGNAL
|
|
||||||
# undef OPT_BSD_WAIT
|
|
||||||
# undef OPT_DGETTEXT
|
|
||||||
# define OPT_CATGETS
|
|
||||||
# undef OPT_GETDTABLESIZE
|
|
||||||
# undef OPT_SYSINFO
|
|
||||||
# define OPT_CPP_PATH "/usr/bin/cpp"
|
|
||||||
# define OPT_CPP_OPTIONS ""
|
|
||||||
# undef OPT_SVR4_GETMNTENT
|
|
||||||
# undef OPT_LOCKF_MNTENT
|
|
||||||
# define OPT_LOCAL_MOUNT_TYPE "ext2fs"
|
|
||||||
# undef OPT_OLD_RPC
|
|
||||||
# define OPT_DEFINE_SIG_PF
|
|
||||||
# define OPT_TAR_HAS_EXCLUDE_OPTION
|
|
||||||
# define OPT_HAS_REALPATH
|
|
||||||
# define OPT_AUTOMOUNT_PATH_FIX
|
|
||||||
# define OPT_BUG_RPCINTR
|
|
||||||
# undef OPT_XTHREADS
|
|
||||||
# define OPT_CONST_CORRECT
|
# define OPT_CONST_CORRECT
|
||||||
|
|
||||||
#elif defined(__OpenBSD__)
|
#elif defined(__OpenBSD__)
|
||||||
|
|
||||||
# undef OPT_UNIX_SOCKET_RPC
|
|
||||||
# undef OPT_TLI
|
|
||||||
# undef OPT_DLOPEN_X11
|
|
||||||
# undef OPT_DLOPEN_CE
|
|
||||||
# undef OPT_ADDMSG_DIRECT
|
|
||||||
# undef OPT_SECURE_RPC
|
|
||||||
# undef OPT_CLASSING_ENGINE
|
|
||||||
# undef OPT_PATCH
|
|
||||||
# define OPT_POSIX_SIGNAL
|
|
||||||
# undef OPT_BSD_WAIT
|
|
||||||
# undef OPT_DGETTEXT
|
|
||||||
# define OPT_CATGETS
|
|
||||||
# undef OPT_GETDTABLESIZE
|
|
||||||
# undef OPT_SYSINFO
|
|
||||||
# define OPT_CPP_PATH "/usr/libexec/cpp"
|
|
||||||
# define OPT_CPP_OPTIONS ""
|
|
||||||
# undef OPT_SVR4_GETMNTENT
|
|
||||||
# undef OPT_LOCKF_MNTENT
|
|
||||||
# define OPT_LOCAL_MOUNT_TYPE MNTTYPE_UFS
|
|
||||||
# undef OPT_OLD_RPC
|
|
||||||
# define OPT_DEFINE_SIG_PF
|
|
||||||
# define OPT_TAR_HAS_EXCLUDE_OPTION
|
|
||||||
# define OPT_HAS_REALPATH
|
|
||||||
# define OPT_AUTOMOUNT_PATH_FIX
|
|
||||||
# define OPT_BUG_RPCINTR
|
|
||||||
# undef OPT_XTHREADS
|
|
||||||
|
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
# undef OPT_UNIX_SOCKET_RPC
|
|
||||||
# undef OPT_TLI
|
|
||||||
# undef OPT_DLOPEN_X11
|
|
||||||
# undef OPT_DLOPEN_CE
|
|
||||||
# undef OPT_ADDMSG_DIRECT
|
|
||||||
# undef OPT_SECURE_RPC
|
|
||||||
# undef OPT_CLASSING_ENGINE
|
|
||||||
# undef OPT_PATCH
|
|
||||||
# define OPT_POSIX_SIGNAL
|
|
||||||
# undef OPT_BSD_WAIT
|
|
||||||
# undef OPT_DGETTEXT
|
|
||||||
# define OPT_CATGETS
|
|
||||||
# undef OPT_GETDTABLESIZE
|
|
||||||
# undef OPT_SYSINFO
|
|
||||||
# if defined(OSMAJORVERSION) && (OSMAJORVERSION >= 5)
|
|
||||||
# define OPT_CPP_PATH "/usr/bin/cpp"
|
|
||||||
# else
|
|
||||||
# define OPT_CPP_PATH "/usr/libexec/cpp"
|
|
||||||
# endif
|
|
||||||
# define OPT_CPP_OPTIONS ""
|
|
||||||
# undef OPT_SVR4_GETMNTENT
|
|
||||||
# undef OPT_LOCKF_MNTENT
|
|
||||||
# define OPT_LOCAL_MOUNT_TYPE MNTTYPE_UFS
|
|
||||||
# undef OPT_OLD_RPC
|
|
||||||
# define OPT_DEFINE_SIG_PF
|
|
||||||
# define OPT_TAR_HAS_EXCLUDE_OPTION
|
|
||||||
# define OPT_HAS_REALPATH
|
|
||||||
# define OPT_AUTOMOUNT_PATH_FIX
|
|
||||||
# define OPT_BUG_RPCINTR
|
|
||||||
# undef OPT_XTHREADS
|
|
||||||
# define OPT_CONST_CORRECT
|
# define OPT_CONST_CORRECT
|
||||||
|
|
||||||
#elif defined(__NetBSD__)
|
#elif defined(__NetBSD__)
|
||||||
# undef OPT_UNIX_SOCKET_RPC
|
|
||||||
# undef OPT_TLI
|
|
||||||
# undef OPT_DLOPEN_X11
|
|
||||||
# undef OPT_DLOPEN_CE
|
|
||||||
# undef OPT_ADDMSG_DIRECT
|
|
||||||
# undef OPT_SECURE_RPC
|
|
||||||
# undef OPT_CLASSING_ENGINE
|
|
||||||
# undef OPT_PATCH
|
|
||||||
# define OPT_POSIX_SIGNAL
|
|
||||||
# undef OPT_BSD_WAIT
|
|
||||||
# undef OPT_DGETTEXT
|
|
||||||
# define OPT_CATGETS
|
|
||||||
# undef OPT_GETDTABLESIZE
|
|
||||||
# undef OPT_SYSINFO
|
|
||||||
# define OPT_CPP_PATH "/usr/bin/cpp"
|
|
||||||
# define OPT_CPP_OPTIONS ""
|
|
||||||
# undef OPT_SVR4_GETMNTENT
|
|
||||||
# undef OPT_LOCKF_MNTENT
|
|
||||||
# define OPT_LOCAL_MOUNT_TYPE MNTTYPE_UFS
|
|
||||||
# undef OPT_OLD_RPC
|
|
||||||
# define OPT_DEFINE_SIG_PF
|
|
||||||
# define OPT_TAR_HAS_EXCLUDE_OPTION
|
|
||||||
# define OPT_HAS_REALPATH
|
|
||||||
# define OPT_AUTOMOUNT_PATH_FIX
|
|
||||||
# define OPT_BUG_RPCINTR
|
|
||||||
# undef OPT_XTHREADS
|
|
||||||
# define OPT_CONST_CORRECT
|
# define OPT_CONST_CORRECT
|
||||||
# define HAS_STATVFS
|
# define HAS_STATVFS
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* Unknown configuration, complain */
|
/* Unknown configuration, complain */
|
||||||
}}}} You must edit lib/tt_options.h and add a section defining the options for your configuration.
|
#warning "Your system is unknown to us, things might not build properly without editing tt_options.h"
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CPP_PROGRAM
|
|
||||||
# undef OPT_CPP_PATH
|
|
||||||
# define OPT_CPP_PATH CPP_PROGRAM
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _TT_OPTIONS_H */
|
#endif /* _TT_OPTIONS_H */
|
||||||
|
|
|
@ -45,9 +45,6 @@ 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)
|
|
||||||
#include <osfcn.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define X_INCLUDE_NETDB_H
|
#define X_INCLUDE_NETDB_H
|
||||||
#define XOS_USE_XT_LOCKING
|
#define XOS_USE_XT_LOCKING
|
||||||
|
|
|
@ -34,9 +34,6 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
|
|
||||||
#include <osfcn.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
#define XOS_USE_XT_LOCKING
|
#define XOS_USE_XT_LOCKING
|
||||||
|
|
|
@ -59,23 +59,10 @@
|
||||||
#undef rindex
|
#undef rindex
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Not everybody has realpath() in libc, sometimes we have to define
|
|
||||||
// it ourselves, see realpath*.c in tt/lib
|
|
||||||
|
|
||||||
#if !defined(OPT_HAS_REALPATH)
|
|
||||||
extern "C" { char *_tt_internal_realpath(char*, char*); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Use the system realpath on OS's that have it, otherwise
|
|
||||||
// use the ToolTalk implementation of it.
|
|
||||||
char *
|
char *
|
||||||
_tt_get_realpath(char *pathname, char *finalpath)
|
_tt_get_realpath(char *pathname, char *finalpath)
|
||||||
{
|
{
|
||||||
#ifdef OPT_HAS_REALPATH
|
|
||||||
return realpath(pathname, finalpath);
|
return realpath(pathname, finalpath);
|
||||||
#else
|
|
||||||
return _tt_internal_realpath(pathname, finalpath);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -51,9 +51,7 @@
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
#include <wctype.h>
|
#include <wctype.h>
|
||||||
#endif
|
|
||||||
#include "util/tt_string.h"
|
#include "util/tt_string.h"
|
||||||
#include "util/tt_assert.h"
|
#include "util/tt_assert.h"
|
||||||
#include "util/tt_xdr_utils.h"
|
#include "util/tt_xdr_utils.h"
|
||||||
|
|
|
@ -36,11 +36,7 @@
|
||||||
* Generic control function
|
* Generic control function
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
#include "isam_impl.h"
|
#include "isam_impl.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,25 +72,13 @@
|
||||||
|
|
||||||
typedef int (* intfunc)();
|
typedef int (* intfunc)();
|
||||||
|
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
int
|
int
|
||||||
iscntl(int isfd, int func, ...)
|
iscntl(int isfd, int func, ...)
|
||||||
#else
|
|
||||||
int
|
|
||||||
iscntl(isfd, func, va_alist)
|
|
||||||
int isfd;
|
|
||||||
int func;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
va_list pvar;
|
va_list pvar;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
va_start(pvar, func);
|
va_start(pvar, func);
|
||||||
#else
|
|
||||||
va_start(pvar);
|
|
||||||
#endif
|
|
||||||
switch (func) {
|
switch (func) {
|
||||||
|
|
||||||
case ISCNTL_MASKSIGNALS:
|
case ISCNTL_MASKSIGNALS:
|
||||||
|
|
|
@ -38,11 +38,9 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MAXHEADLINES 3
|
#define MAXHEADLINES 3
|
||||||
#define FNAMELEN 513
|
#define FNAMELEN 513
|
||||||
|
@ -170,19 +168,11 @@ struct search {
|
||||||
EXTERN SEARCH *path INIT(NULL) ;
|
EXTERN SEARCH *path INIT(NULL) ;
|
||||||
EXTERN SEARCH **endpath INIT(&path) ;
|
EXTERN SEARCH **endpath INIT(&path) ;
|
||||||
EXTERN char dirsep
|
EXTERN char dirsep
|
||||||
#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
|
||||||
INIT('/')
|
INIT('/')
|
||||||
#else
|
|
||||||
****define directory separator here****
|
|
||||||
#endif
|
|
||||||
;
|
;
|
||||||
|
|
||||||
#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
|
||||||
#define CSEP '/'
|
#define CSEP '/'
|
||||||
#define SSEP "/"
|
#define SSEP "/"
|
||||||
#else
|
|
||||||
****define directory separator here****
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Location in .TEX file of two \wlog messages */
|
/* Location in .TEX file of two \wlog messages */
|
||||||
EXTERN long wlog ;
|
EXTERN long wlog ;
|
||||||
|
|
|
@ -349,10 +349,7 @@ m_free(string, "GetDefaultHeaderString return");
|
||||||
/* construct a qualified file name */
|
/* construct a qualified file name */
|
||||||
static int mb_getqualified(char *qualname, char *unqualname)
|
static int mb_getqualified(char *qualname, char *unqualname)
|
||||||
{
|
{
|
||||||
#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
|
||||||
|
|
||||||
FILE *f;
|
FILE *f;
|
||||||
#endif
|
|
||||||
char fn[FNAMELEN];
|
char fn[FNAMELEN];
|
||||||
char tokstr [ 20 ], *gp, *p, *pp, *fnp, curdir[FNAMELEN-1];
|
char tokstr [ 20 ], *gp, *p, *pp, *fnp, curdir[FNAMELEN-1];
|
||||||
int roomleft = FNAMELEN - 1;
|
int roomleft = FNAMELEN - 1;
|
||||||
|
@ -374,7 +371,6 @@ else
|
||||||
|
|
||||||
fnp = fn;
|
fnp = fn;
|
||||||
|
|
||||||
#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
|
||||||
qualname[0] = '\0';
|
qualname[0] = '\0';
|
||||||
gp = qualname + strlen(qualname);
|
gp = qualname + strlen(qualname);
|
||||||
roomleft = roomleft - strlen(qualname);
|
roomleft = roomleft - strlen(qualname);
|
||||||
|
@ -402,49 +398,6 @@ else
|
||||||
strcat(qualname,SSEP);
|
strcat(qualname,SSEP);
|
||||||
roomleft--;
|
roomleft--;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
/* if MS-DOS, force to upper case, then get drive spec */
|
|
||||||
strupr ( fn );
|
|
||||||
if ( fn[1] == ':' ) {
|
|
||||||
strncpy ( qualname, fn, 2 );
|
|
||||||
fnp += 2;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
getcwd(qualname, roomleft);
|
|
||||||
}
|
|
||||||
qualname[2] = '\0';
|
|
||||||
gp = qualname + strlen ( qualname );
|
|
||||||
roomleft = roomleft - strlen ( qualname );
|
|
||||||
/* if path is from root, tack that on, else tack on the current
|
|
||||||
directory (for the referenced drive, if MS-DOS) */
|
|
||||||
if ( *fnp == CSEP ) {
|
|
||||||
strcat ( qualname, SSEP );
|
|
||||||
roomleft--;
|
|
||||||
++fnp;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
/* assume current directory always !!! */
|
|
||||||
*gp = CSEP;
|
|
||||||
getcwd(curdir, FNAMELEN-1);
|
|
||||||
if (*curdir != *qualname) {
|
|
||||||
m_err1("Relative directory %s for non-current drive, can't qualify",
|
|
||||||
unqualname);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
if (strlen(curdir) > 3) {
|
|
||||||
if ((strlen(curdir+3)+1) < roomleft) { /* "1" for SSEP */
|
|
||||||
strcpy( gp+1, curdir+3 );
|
|
||||||
strcat ( qualname, SSEP );
|
|
||||||
roomleft = roomleft - strlen(curdir+3) - 1; /* "1" for SSEP */
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
m_err1("Internal error. File name too long for qualifying: %s",
|
|
||||||
unqualname);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
strcpy(tokstr, " \r\n\t");
|
strcpy(tokstr, " \r\n\t");
|
||||||
strcat(tokstr, SSEP);
|
strcat(tokstr, SSEP);
|
||||||
|
@ -488,11 +441,6 @@ do {
|
||||||
while (1);
|
while (1);
|
||||||
*strrchr(qualname, CSEP) = '\0';
|
*strrchr(qualname, CSEP) = '\0';
|
||||||
|
|
||||||
#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
|
||||||
#else
|
|
||||||
strupr ( qualname );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return ( 0 );
|
return ( 0 );
|
||||||
} /* end mb_getqualified */
|
} /* end mb_getqualified */
|
||||||
|
|
||||||
|
|
|
@ -350,9 +350,7 @@ m_free(string, "GetDefaultHeaderString return");
|
||||||
/* construct a qualified file name */
|
/* construct a qualified file name */
|
||||||
static int mb_getqualified(char *qualname, char *unqualname)
|
static int mb_getqualified(char *qualname, char *unqualname)
|
||||||
{
|
{
|
||||||
#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
|
||||||
FILE *f;
|
FILE *f;
|
||||||
#endif
|
|
||||||
char fn[FNAMELEN];
|
char fn[FNAMELEN];
|
||||||
char tokstr [ 20 ], *gp, *p, *pp, *fnp, curdir[FNAMELEN-1];
|
char tokstr [ 20 ], *gp, *p, *pp, *fnp, curdir[FNAMELEN-1];
|
||||||
int roomleft = FNAMELEN - 1;
|
int roomleft = FNAMELEN - 1;
|
||||||
|
@ -374,7 +372,6 @@ else
|
||||||
|
|
||||||
fnp = fn;
|
fnp = fn;
|
||||||
|
|
||||||
#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
|
||||||
qualname[0] = '\0';
|
qualname[0] = '\0';
|
||||||
gp = qualname + strlen(qualname);
|
gp = qualname + strlen(qualname);
|
||||||
roomleft = roomleft - strlen(qualname);
|
roomleft = roomleft - strlen(qualname);
|
||||||
|
@ -402,49 +399,6 @@ else
|
||||||
strcat(qualname,SSEP);
|
strcat(qualname,SSEP);
|
||||||
roomleft--;
|
roomleft--;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
/* if MS-DOS, force to upper case, then get drive spec */
|
|
||||||
strupr ( fn );
|
|
||||||
if ( fn[1] == ':' ) {
|
|
||||||
strncpy ( qualname, fn, 2 );
|
|
||||||
fnp += 2;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
getcwd(qualname, roomleft);
|
|
||||||
}
|
|
||||||
qualname[2] = '\0';
|
|
||||||
gp = qualname + strlen ( qualname );
|
|
||||||
roomleft = roomleft - strlen ( qualname );
|
|
||||||
/* if path is from root, tack that on, else tack on the current
|
|
||||||
directory (for the referenced drive, if MS-DOS) */
|
|
||||||
if ( *fnp == CSEP ) {
|
|
||||||
strcat ( qualname, SSEP );
|
|
||||||
roomleft--;
|
|
||||||
++fnp;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
/* assume current directory always !!! */
|
|
||||||
*gp = CSEP;
|
|
||||||
getcwd(curdir, FNAMELEN-1);
|
|
||||||
if (*curdir != *qualname) {
|
|
||||||
m_err1("Relative directory %s for non-current drive, can't qualify",
|
|
||||||
unqualname);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
if (strlen(curdir) > 3) {
|
|
||||||
if ((strlen(curdir+3)+1) < roomleft) { /* "1" for SSEP */
|
|
||||||
strcpy( gp+1, curdir+3 );
|
|
||||||
strcat ( qualname, SSEP );
|
|
||||||
roomleft = roomleft - strlen(curdir+3) - 1; /* "1" for SSEP */
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
m_err1("Internal error. File name too long for qualifying: %s",
|
|
||||||
unqualname);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
strcpy(tokstr, " \r\n\t");
|
strcpy(tokstr, " \r\n\t");
|
||||||
strcat(tokstr, SSEP);
|
strcat(tokstr, SSEP);
|
||||||
|
@ -488,11 +442,6 @@ do {
|
||||||
while (1);
|
while (1);
|
||||||
*strrchr(qualname, CSEP) = '\0';
|
*strrchr(qualname, CSEP) = '\0';
|
||||||
|
|
||||||
#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
|
||||||
#else
|
|
||||||
strupr ( qualname );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return ( 0 );
|
return ( 0 );
|
||||||
} /* end mb_getqualified */
|
} /* end mb_getqualified */
|
||||||
|
|
||||||
|
|
|
@ -38,11 +38,9 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MB_MAX_LEN
|
#ifndef MB_MAX_LEN
|
||||||
#define MB_MAX_LEN 4
|
#define MB_MAX_LEN 4
|
||||||
|
|
|
@ -171,12 +171,7 @@ static unsigned char anno_double_bits[] = {
|
||||||
0x0a, 0x20, 0xea, 0x2f, 0x0a, 0x20, 0xea, 0x2f, 0x0a, 0x20, 0xfa, 0x3f,
|
0x0a, 0x20, 0xea, 0x2f, 0x0a, 0x20, 0xea, 0x2f, 0x0a, 0x20, 0xfa, 0x3f,
|
||||||
0x02, 0x08, 0xfe, 0x0f, 0x00, 0x00};
|
0x02, 0x08, 0xfe, 0x0f, 0x00, 0x00};
|
||||||
|
|
||||||
#if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED)
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#else
|
|
||||||
#include <sys/signal.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
|
@ -63,9 +63,6 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
|
|
||||||
#include <sysent.h>
|
|
||||||
#endif
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
|
|
@ -77,9 +77,7 @@
|
||||||
#include <WWL/WXmPushButton.h>
|
#include <WWL/WXmPushButton.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#if defined(SVR4) || defined(SYSV) || defined(__linux__) || defined(CSRG_BASED)
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#define CLASS QueryTermView
|
#define CLASS QueryTermView
|
||||||
|
|
||||||
|
|
|
@ -71,20 +71,12 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
#if defined(_IBMR2) || defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
class xList : public List_base
|
class xList : public List_base
|
||||||
#else
|
|
||||||
class xList : private List_base
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
// NOTE: This friend declaration is too general because cfront
|
// NOTE: This friend declaration is too general because cfront
|
||||||
// barfs when I do it the correct way. 22:05 22-Jul-93 DJB
|
// barfs when I do it the correct way. 22:05 22-Jul-93 DJB
|
||||||
#ifdef SC3
|
#ifdef SC3
|
||||||
friend class List_Iterator<T>;
|
friend class List_Iterator<T>;
|
||||||
#else
|
|
||||||
#if !defined(_IBMR2) && !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
|
|
||||||
template <class T> friend class List_Iterator;
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
public:
|
public:
|
||||||
xList() { }
|
xList() { }
|
||||||
|
@ -118,11 +110,7 @@ public:
|
||||||
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
#if defined(_IBMR2) || defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
class List_Iterator : public List_Iterator_base
|
class List_Iterator : public List_Iterator_base
|
||||||
#else
|
|
||||||
class List_Iterator : private List_Iterator_base
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
friend class xList<T>;
|
friend class xList<T>;
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -45,13 +45,8 @@
|
||||||
#define WArgList_h
|
#define WArgList_h
|
||||||
|
|
||||||
// Allow setting of resources by name in arg list
|
// Allow setting of resources by name in arg list
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
#define CASTRNAM (char*)
|
#define CASTRNAM (char*)
|
||||||
#define CASTVAL (void*)(size_t)
|
#define CASTVAL (void*)(size_t)
|
||||||
#else
|
|
||||||
#define CASTRNAM
|
|
||||||
#define CASTVAL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define RSRC_SET(RSC,TYP,RNAM) \
|
#define RSRC_SET(RSC,TYP,RNAM) \
|
||||||
inline WArgList& RSC(TYP val) { return Add(CASTRNAM RNAM, CASTVAL val); }
|
inline WArgList& RSC(TYP val) { return Add(CASTRNAM RNAM, CASTVAL val); }
|
||||||
|
|
|
@ -45,19 +45,10 @@
|
||||||
#define wwl_h
|
#define wwl_h
|
||||||
|
|
||||||
// Widget Wrapper Library by:
|
// Widget Wrapper Library by:
|
||||||
//
|
|
||||||
// ___ 0 Jean-Daniel Fekete uucp : jdf@lri.lri.fr
|
|
||||||
// / \ / LRI - Bat 490 bitnet: jdf@FRLRI61.bitnet
|
|
||||||
// / _/ / Universite de Paris-Sud voice : +33 (1) 69 41 65 91
|
|
||||||
// /__ \/ F-91405 ORSAY Cedex +33 (1) 69 41 66 29
|
|
||||||
|
|
||||||
#include <X11/Intrinsic.h>
|
#include <X11/Intrinsic.h>
|
||||||
#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
|
|
||||||
#include <generic.h>
|
|
||||||
#else
|
|
||||||
#define name2(__n1,__n2) __paste2(__n1,__n2)
|
#define name2(__n1,__n2) __paste2(__n1,__n2)
|
||||||
#define __paste2(__p1,__p2) __p1##__p2
|
#define __paste2(__p1,__p2) __p1##__p2
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <Xm/Xm.h>
|
#include <Xm/Xm.h>
|
||||||
#include "WXmString.h"
|
#include "WXmString.h"
|
||||||
|
@ -78,13 +69,8 @@ class WComposite;
|
||||||
typedef void (* XtProc)();
|
typedef void (* XtProc)();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
#define CASTRNAM (char*)
|
#define CASTRNAM (char*)
|
||||||
#define CASTVAL (void*)(size_t)
|
#define CASTVAL (void*)(size_t)
|
||||||
#else
|
|
||||||
#define CASTRNAM
|
|
||||||
#define CASTVAL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define DEFINE_GETTER(rsc,typ,rnam) \
|
#define DEFINE_GETTER(rsc,typ,rnam) \
|
||||||
inline typ rsc() const \
|
inline typ rsc() const \
|
||||||
|
|
|
@ -42,11 +42,7 @@
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#if !defined(__DECCXX) && !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
|
|
||||||
#include <osfcn.h>
|
|
||||||
#else
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
/* use prototypes in function declarations */
|
/* use prototypes in function declarations */
|
||||||
#define YY_USE_PROTOS
|
#define YY_USE_PROTOS
|
||||||
|
|
|
@ -64,11 +64,7 @@ Dtlogin*startup: Xstartup
|
||||||
Dtlogin*reset: Xreset
|
Dtlogin*reset: Xreset
|
||||||
Dtlogin*setup: Xsetup
|
Dtlogin*setup: Xsetup
|
||||||
|
|
||||||
#if defined (_AIX) || defined (sun) || defined(CSRG_BASED) || defined(__linux__)
|
|
||||||
Dtlogin*failsafeClient: Xfailsafe
|
Dtlogin*failsafeClient: Xfailsafe
|
||||||
#else
|
|
||||||
Dtlogin*failsafeClient: /usr/bin/X11/xterm
|
|
||||||
#endif
|
|
||||||
|
|
||||||
XCOMM #########################################################################
|
XCOMM #########################################################################
|
||||||
XCOMM To specify the system env vars to be exported to the users session
|
XCOMM To specify the system env vars to be exported to the users session
|
||||||
|
|
|
@ -63,11 +63,7 @@
|
||||||
# include <time.h>
|
# include <time.h>
|
||||||
# include <utime.h>
|
# include <utime.h>
|
||||||
# include <pwd.h>
|
# include <pwd.h>
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
# include <stdarg.h>
|
# include <stdarg.h>
|
||||||
#else
|
|
||||||
# include <varargs.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(SYSV) || defined(SVR4) || defined(__linux__)
|
#if defined(SYSV) || defined(SVR4) || defined(__linux__)
|
||||||
#ifndef F_TLOCK
|
#ifndef F_TLOCK
|
||||||
|
|
|
@ -213,7 +213,6 @@ bitsToBytes (unsigned long bits[2], char bytes[64])
|
||||||
* the OS's random number device.
|
* the OS's random number device.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
#define READ_LIMIT (sizeof (long) * 2)
|
#define READ_LIMIT (sizeof (long) * 2)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -254,45 +253,6 @@ sumFile (char *name, long sum[2])
|
||||||
|
|
||||||
#undef READ_LIMIT
|
#undef READ_LIMIT
|
||||||
|
|
||||||
#else /* linux || CSRG_BASED */
|
|
||||||
|
|
||||||
static int
|
|
||||||
sumFile (char *name, long sum[2])
|
|
||||||
{
|
|
||||||
long buf[1024*2];
|
|
||||||
int cnt;
|
|
||||||
int fd;
|
|
||||||
int loops;
|
|
||||||
int reads;
|
|
||||||
int i;
|
|
||||||
int ret_status = 0;
|
|
||||||
|
|
||||||
fd = open (name, 0);
|
|
||||||
if (fd < 0) {
|
|
||||||
LogError((unsigned char *) "Cannot open randomFile \"%s\", errno = %d\n", name, errno);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#ifdef FRAGILE_DEV_MEM
|
|
||||||
if (strcmp(name, "/dev/mem") == 0) lseek (fd, (off_t) 0x100000, SEEK_SET);
|
|
||||||
#endif
|
|
||||||
reads = FILE_LIMIT;
|
|
||||||
sum[0] = 0;
|
|
||||||
sum[1] = 0;
|
|
||||||
while ((cnt = read (fd, (char *) buf, sizeof (buf))) > 0 && --reads > 0) {
|
|
||||||
loops = cnt / (2 * sizeof (long));
|
|
||||||
for (i = 0; i < loops; i+= 2) {
|
|
||||||
sum[0] += buf[i];
|
|
||||||
sum[1] += buf[i+1];
|
|
||||||
ret_status = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (cnt < 0)
|
|
||||||
LogError((unsigned char *) "Cannot read randomFile \"%s\", errno = %d\n", name, errno);
|
|
||||||
close (fd);
|
|
||||||
return ret_status;
|
|
||||||
}
|
|
||||||
#endif /* linux || CSRG_BASED */
|
|
||||||
|
|
||||||
void
|
void
|
||||||
GenerateAuthData (char *auth, int len)
|
GenerateAuthData (char *auth, int len)
|
||||||
{
|
{
|
||||||
|
|
|
@ -125,9 +125,6 @@ class BufferMemory : public Buffer {
|
||||||
virtual int getSize(void); // get total size of the buffer
|
virtual int getSize(void); // get total size of the buffer
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
|
|
||||||
class Chunk;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
BufferMemory(const Buffer&); // try and avoid copies
|
BufferMemory(const Buffer&); // try and avoid copies
|
||||||
void initBuffer(int size); // common constructor
|
void initBuffer(int size); // common constructor
|
||||||
|
|
|
@ -975,14 +975,7 @@ RFCTransport::signalRegister(void)
|
||||||
if (initialized) return;
|
if (initialized) return;
|
||||||
initialized = 1;
|
initialized = 1;
|
||||||
|
|
||||||
#if 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;
|
act.sa_handler = (void (*)(int))&RFCTransport::childHandler;
|
||||||
#else
|
|
||||||
// SunOS 5.4 and before defined prototype signal handler
|
|
||||||
act.sa_handler = (void (*)())&RFCTransport::childHandler;
|
|
||||||
#endif
|
|
||||||
sigemptyset(&act.sa_mask);
|
sigemptyset(&act.sa_mask);
|
||||||
sigaddset(&act.sa_mask, SIGCHLD);
|
sigaddset(&act.sa_mask, SIGCHLD);
|
||||||
act.sa_flags = 0;
|
act.sa_flags = 0;
|
||||||
|
|
|
@ -41,22 +41,6 @@
|
||||||
|
|
||||||
#include "dtscreen.h"
|
#include "dtscreen.h"
|
||||||
|
|
||||||
#if !defined(_AIX) && !defined(__linux__) && !defined(sun) && !defined(CSRG_BASED)
|
|
||||||
int
|
|
||||||
usleep(unsigned long usec)
|
|
||||||
{
|
|
||||||
#ifdef SYSV
|
|
||||||
poll((struct poll *) 0, (size_t) 0, usec / 1000); /* ms resolution */
|
|
||||||
#else
|
|
||||||
struct timeval timeout;
|
|
||||||
timeout.tv_usec = usec % (unsigned long) 1000000;
|
|
||||||
timeout.tv_sec = usec / (unsigned long) 1000000;
|
|
||||||
select(0, (void *) 0, (void *) 0, (void *) 0, &timeout);
|
|
||||||
#endif
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif /* !_AIX && */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* returns the number of seconds since 01-Jan-70.
|
* returns the number of seconds since 01-Jan-70.
|
||||||
* This is used to control rate and timeout in many of the animations.
|
* This is used to control rate and timeout in many of the animations.
|
||||||
|
|
|
@ -88,15 +88,6 @@ typedef struct {
|
||||||
int size[MAXCOLORS];
|
int size[MAXCOLORS];
|
||||||
} wormstruct;
|
} wormstruct;
|
||||||
|
|
||||||
#if !defined(CSRG_BASED) && !defined(sun) && !defined(__linux__)
|
|
||||||
int
|
|
||||||
round(float x)
|
|
||||||
{
|
|
||||||
return ((int) floor((double) x));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
worm_doit(perwindow *pwin, wormstruct *wp, int which, unsigned long color)
|
worm_doit(perwindow *pwin, wormstruct *wp, int which, unsigned long color)
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,11 +31,7 @@
|
||||||
|
|
||||||
#include "Options.h"
|
#include "Options.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#else
|
|
||||||
#include <iostream.h>
|
|
||||||
#endif
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
|
||||||
|
|
|
@ -75,11 +75,7 @@
|
||||||
#include "dtappgather.h"
|
#include "dtappgather.h"
|
||||||
#include "DirIterator.h"
|
#include "DirIterator.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#else
|
|
||||||
#include <iostream.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Options * options;
|
Options * options;
|
||||||
|
|
||||||
|
@ -88,7 +84,7 @@ void LegacyCleanUp
|
||||||
CDEEnvironment * user
|
CDEEnvironment * user
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
//XXX:
|
||||||
// For now, remove the old ApplicationManager subdirectory
|
// For now, remove the old ApplicationManager subdirectory
|
||||||
// so that we don't leave old CDE users with extra baggage
|
// so that we don't leave old CDE users with extra baggage
|
||||||
// under $HOME.
|
// under $HOME.
|
||||||
|
|
|
@ -136,25 +136,13 @@ void ManSearchPath::Print()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
std::ostream & operator<<
|
std::ostream & operator<<
|
||||||
(
|
(
|
||||||
std::ostream & os,
|
std::ostream & os,
|
||||||
const ManSearchPath & sp
|
const ManSearchPath & sp
|
||||||
)
|
)
|
||||||
#else
|
|
||||||
ostream & operator<<
|
|
||||||
(
|
|
||||||
ostream & os,
|
|
||||||
const ManSearchPath & sp
|
|
||||||
)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
os << sp.GetEnvVar() << std::endl;
|
os << sp.GetEnvVar() << std::endl;
|
||||||
#else
|
|
||||||
os << sp.GetEnvVar() << endl;
|
|
||||||
#endif
|
|
||||||
sp.PrettyPrint(os);
|
sp.PrettyPrint(os);
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,11 +33,7 @@
|
||||||
|
|
||||||
#include "Options.h"
|
#include "Options.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#else
|
|
||||||
#include <iostream.h>
|
|
||||||
#endif
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
|
||||||
|
|
|
@ -387,33 +387,18 @@ void SearchPath::Print()
|
||||||
*
|
*
|
||||||
****************************************************************/
|
****************************************************************/
|
||||||
|
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
void SearchPath::PrettyPrint
|
void SearchPath::PrettyPrint
|
||||||
(
|
(
|
||||||
std::ostream & os
|
std::ostream & os
|
||||||
) const
|
) const
|
||||||
#else
|
|
||||||
void SearchPath::PrettyPrint
|
|
||||||
(
|
|
||||||
ostream & os
|
|
||||||
) const
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
CTokenizedString path (GetSearchPath(), Separator().data());
|
CTokenizedString path (GetSearchPath(), Separator().data());
|
||||||
CString subpath = path.next();
|
CString subpath = path.next();
|
||||||
while (!subpath.isNull()) {
|
while (!subpath.isNull()) {
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
os << " " << subpath << std::endl;
|
os << " " << subpath << std::endl;
|
||||||
#else
|
|
||||||
os << " " << subpath << endl;
|
|
||||||
#endif
|
|
||||||
subpath = path.next();
|
subpath = path.next();
|
||||||
}
|
}
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
os << std::endl;
|
os << std::endl;
|
||||||
#else
|
|
||||||
os << endl;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -424,25 +409,13 @@ void SearchPath::PrettyPrint
|
||||||
*
|
*
|
||||||
****************************************************************/
|
****************************************************************/
|
||||||
|
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
std::ostream & operator<<
|
std::ostream & operator<<
|
||||||
(
|
(
|
||||||
std::ostream & os,
|
std::ostream & os,
|
||||||
const SearchPath & sp
|
const SearchPath & sp
|
||||||
)
|
)
|
||||||
#else
|
|
||||||
ostream & operator<<
|
|
||||||
(
|
|
||||||
ostream & os,
|
|
||||||
const SearchPath & sp
|
|
||||||
)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
os << sp.GetEnvVar() << "SEARCHPATH:" << std::endl;
|
os << sp.GetEnvVar() << "SEARCHPATH:" << std::endl;
|
||||||
#else
|
|
||||||
os << sp.GetEnvVar() << "SEARCHPATH:" << endl;
|
|
||||||
#endif
|
|
||||||
sp.PrettyPrint(os);
|
sp.PrettyPrint(os);
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,11 +34,7 @@
|
||||||
|
|
||||||
#include "Environ.h"
|
#include "Environ.h"
|
||||||
#include "cstring.h"
|
#include "cstring.h"
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#else
|
|
||||||
#include <iostream.h>
|
|
||||||
#endif
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
class SearchPath {
|
class SearchPath {
|
||||||
|
@ -51,15 +47,9 @@ class SearchPath {
|
||||||
virtual void Print();
|
virtual void Print();
|
||||||
virtual void AddPredefinedPath();
|
virtual void AddPredefinedPath();
|
||||||
|
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
virtual void PrettyPrint (std::ostream &) const;
|
virtual void PrettyPrint (std::ostream &) const;
|
||||||
|
|
||||||
friend std::ostream & operator<< (std::ostream &, const SearchPath &);
|
friend std::ostream & operator<< (std::ostream &, const SearchPath &);
|
||||||
#else
|
|
||||||
virtual void PrettyPrint (ostream &) const;
|
|
||||||
|
|
||||||
friend ostream & operator<< (ostream &, const SearchPath &);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char * GetEnvVar() const { return environment_var; }
|
const char * GetEnvVar() const { return environment_var; }
|
||||||
CString GetSearchPath() const { return final_search_path; }
|
CString GetSearchPath() const { return final_search_path; }
|
||||||
|
@ -186,11 +176,7 @@ class ManSearchPath : public SearchPath {
|
||||||
virtual void ExportPath ();
|
virtual void ExportPath ();
|
||||||
virtual void Print();
|
virtual void Print();
|
||||||
|
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
friend std::ostream & operator<< (std::ostream &, const ManSearchPath &);
|
friend std::ostream & operator<< (std::ostream &, const ManSearchPath &);
|
||||||
#else
|
|
||||||
friend ostream & operator<< (ostream &, const ManSearchPath &);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void MakePath (const CString &);
|
virtual void MakePath (const CString &);
|
||||||
|
|
|
@ -95,32 +95,15 @@ TTFile & TTFile::operator=
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
std::ostream & operator<<
|
std::ostream & operator<<
|
||||||
(
|
(
|
||||||
std::ostream & os,
|
std::ostream & os,
|
||||||
TTFile & file
|
TTFile & file
|
||||||
)
|
)
|
||||||
#else
|
|
||||||
ostream & operator<<
|
|
||||||
(
|
|
||||||
ostream & os,
|
|
||||||
TTFile & file
|
|
||||||
)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (file.ttFileOpFailed())
|
if (file.ttFileOpFailed())
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
return os << "Error in filename mapping; status = "
|
return os << "Error in filename mapping; status = "
|
||||||
<< file.getStatus() << std::endl;
|
<< file.getStatus() << std::endl;
|
||||||
#else
|
|
||||||
return os << "Error in filename mapping; status = "
|
|
||||||
<< file.getStatus() << endl;
|
|
||||||
#endif
|
|
||||||
else
|
else
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
return os << file.data() << std::endl;
|
return os << file.data() << std::endl;
|
||||||
#else
|
|
||||||
return os << file.data() << endl;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,11 +65,7 @@ class TTFile : public CString {
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
void TT_Exception (char *);
|
void TT_Exception (char *);
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
friend std::ostream & operator<< (std::ostream &, TTFile &);
|
friend std::ostream & operator<< (std::ostream &, TTFile &);
|
||||||
#else
|
|
||||||
friend ostream & operator<< (ostream &, TTFile &);
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int ttFileOpFailed () { return status != TT_OK; }
|
int ttFileOpFailed () { return status != TT_OK; }
|
||||||
|
|
|
@ -34,11 +34,7 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#else
|
|
||||||
#include <iostream.h>
|
|
||||||
#endif
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
|
@ -50,10 +46,8 @@
|
||||||
#endif
|
#endif
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(sun) || defined(_AIX) || defined(__linux__) || defined(CSRG_BASED)
|
|
||||||
#define UID_NO_CHANGE ((uid_t) -1)
|
#define UID_NO_CHANGE ((uid_t) -1)
|
||||||
#define GID_NO_CHANGE ((gid_t) -1)
|
#define GID_NO_CHANGE ((gid_t) -1)
|
||||||
#endif
|
|
||||||
|
|
||||||
UnixEnvironment::UnixEnvironment()
|
UnixEnvironment::UnixEnvironment()
|
||||||
{
|
{
|
||||||
|
|
|
@ -566,19 +566,11 @@ int i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
std::ostream & operator<<
|
std::ostream & operator<<
|
||||||
(
|
(
|
||||||
std::ostream & os,
|
std::ostream & os,
|
||||||
const CString & s
|
const CString & s
|
||||||
)
|
)
|
||||||
#else
|
|
||||||
ostream & operator<<
|
|
||||||
(
|
|
||||||
ostream & os,
|
|
||||||
const CString & s
|
|
||||||
)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (s.isNull())
|
if (s.isNull())
|
||||||
return os << "(null)";
|
return os << "(null)";
|
||||||
|
|
|
@ -32,11 +32,7 @@
|
||||||
#ifndef _CSTRING_H_
|
#ifndef _CSTRING_H_
|
||||||
#define _CSTRING_H_
|
#define _CSTRING_H_
|
||||||
|
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#else
|
|
||||||
#include <iostream.h>
|
|
||||||
#endif
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
class CString {
|
class CString {
|
||||||
|
@ -72,11 +68,7 @@ class CString {
|
||||||
int isNull() const;
|
int isNull() const;
|
||||||
void replace (const CString &, const CString &);
|
void replace (const CString &, const CString &);
|
||||||
|
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
friend std::ostream & operator<< (std::ostream &, const CString &);
|
friend std::ostream & operator<< (std::ostream &, const CString &);
|
||||||
#else
|
|
||||||
friend ostream & operator<< (ostream &, const CString &);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
char * contents;
|
char * contents;
|
||||||
|
|
|
@ -65,7 +65,6 @@ endif
|
||||||
|
|
||||||
if FREEBSD
|
if FREEBSD
|
||||||
LOCAL_CPP_DEFINES += -DFREEBSD -D__FreeBSD__
|
LOCAL_CPP_DEFINES += -DFREEBSD -D__FreeBSD__
|
||||||
SUBDIRS += config
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if SOLARIS
|
if SOLARIS
|
||||||
|
@ -78,7 +77,6 @@ endif
|
||||||
|
|
||||||
if NETBSD
|
if NETBSD
|
||||||
LOCAL_CPP_DEFINES += -D__NetBSD__
|
LOCAL_CPP_DEFINES += -D__NetBSD__
|
||||||
SUBDIRS += config
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if BSD
|
if BSD
|
||||||
|
|
|
@ -945,11 +945,7 @@ GetUdcFontName(
|
||||||
{
|
{
|
||||||
FILE *fp ;
|
FILE *fp ;
|
||||||
pid_t chld_pid = 0;
|
pid_t chld_pid = 0;
|
||||||
#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(__linux__)
|
|
||||||
int chld_stat ;
|
int chld_stat ;
|
||||||
#else
|
|
||||||
union wait chld_stat ;
|
|
||||||
#endif
|
|
||||||
struct ptobhead head ;
|
struct ptobhead head ;
|
||||||
char *p, *tmp_font ;
|
char *p, *tmp_font ;
|
||||||
char readbuf[BUFSIZE], fntbuf[BUFSIZE] ;
|
char readbuf[BUFSIZE], fntbuf[BUFSIZE] ;
|
||||||
|
|
|
@ -163,12 +163,7 @@ WriteBdfHeader( struct ptobhead *head )
|
||||||
char buf[BUFSIZE], *p;
|
char buf[BUFSIZE], *p;
|
||||||
|
|
||||||
pid_t chld_pid = 0;
|
pid_t chld_pid = 0;
|
||||||
#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(__linux__)
|
|
||||||
int chld_stat ;
|
int chld_stat ;
|
||||||
#else
|
|
||||||
union wait chld_stat ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
if (head->snf_file != NULL) {
|
if (head->snf_file != NULL) {
|
||||||
if (pipe(fd) != 0) {
|
if (pipe(fd) != 0) {
|
||||||
|
|
|
@ -98,7 +98,7 @@ extern XmMenuState _XmGetMenuState();
|
||||||
|
|
||||||
static unsigned int GetEventInverseMask(XEvent *event);
|
static unsigned int GetEventInverseMask(XEvent *event);
|
||||||
|
|
||||||
#if (defined(__linux__) || defined(sun) || defined(CSRG_BASED)) && !defined(_NFILE)
|
#if !defined(_NFILE)
|
||||||
#define _NFILE FOPEN_MAX
|
#define _NFILE FOPEN_MAX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,6 @@
|
||||||
|
|
||||||
if SOLARIS
|
if SOLARIS
|
||||||
LANG=fr
|
LANG=fr
|
||||||
endif
|
else
|
||||||
|
|
||||||
if LINUX
|
|
||||||
LANG=fr_FR.UTF-8
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BSD
|
|
||||||
LANG=fr_FR.UTF-8
|
LANG=fr_FR.UTF-8
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -3,12 +3,6 @@
|
||||||
|
|
||||||
if SOLARIS
|
if SOLARIS
|
||||||
LANG=de
|
LANG=de
|
||||||
endif
|
else
|
||||||
|
|
||||||
if LINUX
|
|
||||||
LANG=de_DE.UTF-8
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BSD
|
|
||||||
LANG=de_DE.UTF-8
|
LANG=de_DE.UTF-8
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -3,12 +3,6 @@
|
||||||
|
|
||||||
if SOLARIS
|
if SOLARIS
|
||||||
LANG=it
|
LANG=it
|
||||||
endif
|
else
|
||||||
|
|
||||||
if LINUX
|
|
||||||
LANG=it_IT.UTF-8
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BSD
|
|
||||||
LANG=it_IT.UTF-8
|
LANG=it_IT.UTF-8
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -3,12 +3,6 @@
|
||||||
|
|
||||||
if SOLARIS
|
if SOLARIS
|
||||||
LANG=ja
|
LANG=ja
|
||||||
endif
|
else
|
||||||
|
|
||||||
if LINUX
|
|
||||||
LANG=ja_JP.UTF-8
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BSD
|
|
||||||
LANG=ja_JP.UTF-8
|
LANG=ja_JP.UTF-8
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -3,12 +3,6 @@
|
||||||
|
|
||||||
if SOLARIS
|
if SOLARIS
|
||||||
LANG=es
|
LANG=es
|
||||||
endif
|
else
|
||||||
|
|
||||||
if LINUX
|
|
||||||
LANG=es_ES.UTF-8
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BSD
|
|
||||||
LANG=es_ES.UTF-8
|
LANG=es_ES.UTF-8
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -29,12 +29,8 @@
|
||||||
#ifndef TT_CXX_H
|
#ifndef TT_CXX_H
|
||||||
#define TT_CXX_H
|
#define TT_CXX_H
|
||||||
|
|
||||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
#else
|
|
||||||
#include <iostream.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <Tt/tt_c.h>
|
#include <Tt/tt_c.h>
|
||||||
|
|
||||||
|
|
|
@ -190,12 +190,10 @@ signalHandler(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(SVR4) || defined(aix) || defined(__linux__) || defined(CSRG_BASED)
|
|
||||||
#if !defined(SIG_PF)
|
#if !defined(SIG_PF)
|
||||||
typedef void (*sig_pf_t)(int);
|
typedef void (*sig_pf_t)(int);
|
||||||
#define SIG_PF sig_pf_t
|
#define SIG_PF sig_pf_t
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
_tt_sigset(
|
_tt_sigset(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue