Remove Unixware and openserver support
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
#if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#if !defined(USL) && !defined(sun)
|
||||
#if !defined(sun)
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
#endif
|
||||
@@ -49,9 +49,6 @@
|
||||
#define S_ISLNK(m) (((m)&IFMT) == IFLNK)
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#if defined(OPT_BUG_USL)
|
||||
#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)
|
||||
#endif
|
||||
#include <sys/wait.h>
|
||||
#include "api/c/tt_c.h"
|
||||
#include "util/tt_gettext.h"
|
||||
|
||||
@@ -37,10 +37,8 @@
|
||||
#ifdef __osf__
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#ifndef USL
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
#endif
|
||||
#if defined(OPT_BUG_SUNOS_4)
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#if !defined(USL) && !defined(sun)
|
||||
#if !defined(sun)
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
#endif
|
||||
@@ -49,9 +49,6 @@
|
||||
#define S_ISLNK(m) (((m)&IFMT) == IFLNK)
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#if defined(OPT_BUG_USL)
|
||||
#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)
|
||||
#endif
|
||||
#include <sys/wait.h>
|
||||
#include "api/c/tt_c.h"
|
||||
#include "util/tt_path.h"
|
||||
|
||||
@@ -45,12 +45,6 @@
|
||||
#if defined(sgi) || defined(CSRG_BASED)
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
#if defined(USL)
|
||||
#include "tt_options.h"
|
||||
#if defined(OPT_BUG_USL)
|
||||
extern "C" int getopt(int, char *const *, const char *);
|
||||
#endif
|
||||
#endif
|
||||
#include "mp/mp_global.h"
|
||||
#include "mp/mp_mp.h"
|
||||
#include "mp_otype.h"
|
||||
|
||||
@@ -50,15 +50,6 @@
|
||||
#include <unistd.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#if defined(OPT_BUG_UW_2)
|
||||
extern "C" {
|
||||
int putenv(char *);
|
||||
FILE *popen(const char *, const char *);
|
||||
FILE *fdopen(int, const char *);
|
||||
int pclose(FILE *);
|
||||
}
|
||||
#endif
|
||||
|
||||
#define TT_TYPE_TABLE_BUCKETS 19
|
||||
|
||||
static int use_cpp;
|
||||
|
||||
@@ -80,12 +80,7 @@ char **global_envp;
|
||||
// This is the PID or TID of the procedure that is
|
||||
// performing the garbage collection.
|
||||
//
|
||||
#if defined(USL)
|
||||
int _tt_garbage_id = 0; // TID or PID.
|
||||
#else
|
||||
int _tt_garbage_id = -1; // TID or PID.
|
||||
#endif
|
||||
|
||||
int _tt_run_garbage_collect(int in_parallel);
|
||||
|
||||
static const char * sesProp = _TT_FILEJOIN_PROPNAME;
|
||||
@@ -2737,7 +2732,7 @@ _tt_run_garbage_collect(int in_parallel)
|
||||
//
|
||||
// FORK and EXEC ourself '-G'.
|
||||
//
|
||||
#if defined(OPT_BUG_AIX) || defined(OPT_BUG_USL)
|
||||
#if defined(OPT_BUG_AIX)
|
||||
#define vfork fork
|
||||
#endif
|
||||
switch (_tt_garbage_id = (int)vfork()) {
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#if defined(__osf__) || defined(linux) || defined(sun) || defined(CSRG_BASED)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#if !defined(USL) && !defined(sun)
|
||||
#if !defined(sun)
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
#endif
|
||||
@@ -52,10 +52,6 @@
|
||||
#include "tt_options.h"
|
||||
#include "archiver.h"
|
||||
|
||||
#if defined(OPT_BUG_USL)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
TT_INSERT_COPYRIGHT
|
||||
|
||||
#ifdef OPT_PATCH
|
||||
|
||||
@@ -36,10 +36,8 @@
|
||||
#if defined(__osf__) || defined(linux) || defined(CSRG_BASED) || defined(sun)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#ifndef USL
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <sys/param.h>
|
||||
#include "api/c/api_api.h"
|
||||
#include "api/c/tt_c.h"
|
||||
|
||||
@@ -45,9 +45,6 @@
|
||||
#include <dirent.h>
|
||||
#include "tttar_utils.h"
|
||||
#include "tttar_file_utils.h"
|
||||
#if defined(OPT_BUG_USL)
|
||||
#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)
|
||||
#endif
|
||||
|
||||
extern char *_tt_get_realpath(char *, char *);
|
||||
|
||||
|
||||
@@ -35,16 +35,7 @@
|
||||
#if defined(__osf__) || defined(linux) || defined(CSRG_BASED) || defined(sun)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#if defined (USL)
|
||||
#include "tt_options.h"
|
||||
#if defined(OPT_BUG_USL)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <osfcn.h>
|
||||
#endif /* if defined(OPT_BUG_USL) */
|
||||
#else
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
#endif /* __osf__ */
|
||||
#include "api/c/tt_c.h"
|
||||
#include "util/tt_iostream.h"
|
||||
|
||||
@@ -28,10 +28,6 @@
|
||||
#endif
|
||||
#include "tt_options.h"
|
||||
|
||||
#ifdef USL
|
||||
# define FILE _FILE_
|
||||
#endif
|
||||
|
||||
#ifdef _AIX
|
||||
# define size_t unsigned long
|
||||
# define pid_t int
|
||||
@@ -2555,10 +2551,6 @@ internalC++ _tt_ReadAuthFileEntry(FILE*)
|
||||
internalC++ _tt_UnlockAuthFile(char*)
|
||||
internalC++ _tt_WriteAuthFileEntry(FILE*,_tt_AuthFileEntry*)
|
||||
|
||||
#ifdef OPT_BUG_USL
|
||||
internal _xti_strerror
|
||||
#endif
|
||||
|
||||
#ifdef _AIX
|
||||
/* Including <pthread.h> defines these symbols everywhere on AIX machines. */
|
||||
internal __page_size
|
||||
|
||||
@@ -268,7 +268,7 @@ startup_ttsession(_Tt_string &start_ttcmd)
|
||||
#endif
|
||||
SIG_PF istat, qstat, cstat;
|
||||
|
||||
#if defined(_AIX) || defined(OPT_BUG_USL)
|
||||
#if defined(_AIX)
|
||||
#define vfork fork
|
||||
#endif
|
||||
if((pid = vfork()) == 0) {
|
||||
|
||||
@@ -310,13 +310,6 @@ call(int procnum, xdrproc_t inproc, char *in,
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(OPT_BUG_USL)
|
||||
if (timeout <= 0)
|
||||
{
|
||||
outproc = (xdrproc_t) NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// tcp write errors (when the rpc_server on the other end dies)
|
||||
// cause a SIGPIPE. We need to make sure the SIGPIPE is caught,
|
||||
@@ -325,14 +318,10 @@ call(int procnum, xdrproc_t inproc, char *in,
|
||||
if (sigaction(SIGPIPE, 0, &curr_action) != 0) {
|
||||
_tt_syslog( 0, LOG_ERR, "sigaction(): %m" );
|
||||
}
|
||||
#if defined(OPT_BUG_SUNOS_5) || defined(OPT_BUG_UW_1)
|
||||
#if defined(OPT_BUG_SUNOS_5)
|
||||
if ((SIG_TYP)curr_action.sa_handler == SIG_DFL)
|
||||
#else
|
||||
#if defined(OPT_BUG_UW_2)
|
||||
if ((void(*)(int))curr_action.sa_handler == SIG_DFL)
|
||||
#else
|
||||
if (curr_action.sa_handler == SIG_DFL)
|
||||
#endif
|
||||
#endif
|
||||
{
|
||||
need2reset_sigpipe = 1;
|
||||
@@ -357,16 +346,6 @@ call(int procnum, xdrproc_t inproc, char *in,
|
||||
outproc, out,
|
||||
total_timeout);
|
||||
}
|
||||
#if defined(OPT_BUG_USL)
|
||||
if (timeout <= 0)
|
||||
{
|
||||
total_timeout.tv_sec = 10;
|
||||
total_timeout.tv_usec = 0;
|
||||
clnt_control(_client, CLSET_TIMEOUT, (char *) &total_timeout);
|
||||
clnt_call(_client, NULLPROC, (xdrproc_t) xdr_void, (char *)NULL,
|
||||
(xdrproc_t) xdr_void, (char *) NULL, total_timeout);
|
||||
}
|
||||
#endif
|
||||
if (need2reset_sigpipe) {
|
||||
signal(SIGPIPE, SIG_DFL);
|
||||
}
|
||||
|
||||
@@ -51,9 +51,6 @@
|
||||
#if defined(OPT_TLI)
|
||||
# include <mp/mp_rpc_fns.h>
|
||||
# include <tiuser.h>
|
||||
# if defined(OPT_BUG_USL)
|
||||
extern int t_errno;
|
||||
# endif
|
||||
#else
|
||||
# include <netinet/tcp.h>
|
||||
#endif
|
||||
@@ -66,15 +63,6 @@ extern "C" unsigned long inet_addr(char *);
|
||||
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#if defined(OPT_BUG_USL)
|
||||
extern char *t_errlist[];
|
||||
|
||||
char *t_strerror(int t_errno)
|
||||
{
|
||||
return(t_errlist[t_errno]);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Constructs a socket object. Using (char *)0 for host means use the
|
||||
* current host. Specifying a portnum of 0 indicates that the first
|
||||
@@ -431,9 +419,6 @@ send(char *msg, int len)
|
||||
return(0);
|
||||
}
|
||||
#else
|
||||
#if defined(OPT_BUG_USL)
|
||||
t_sync(_sock);
|
||||
#endif
|
||||
if ((rval = t_snd(_sock, msg, len, 0)) == len) {
|
||||
return(rval);
|
||||
} else {
|
||||
|
||||
@@ -80,9 +80,6 @@
|
||||
* OPT_BUG_SGI -- used to flag special hacks only needed because of
|
||||
* bugs or quirks in SGI IRIX.
|
||||
*
|
||||
* OPT_BUG_USL -- used to flag special hacks only needed because of
|
||||
* bugs or quirks in UnixWare, etc.
|
||||
*
|
||||
* OPT_XDR_LONG_TYPE -- used for (64-bit) architectures where
|
||||
* <rcp/xdr.h> defines x_putlong and x_getlong to not take "long*".
|
||||
*
|
||||
@@ -411,49 +408,6 @@
|
||||
# undef OPT_TAR_HAS_EXCLUDE_OPTION
|
||||
# define OPT_BUG_RPCINTR
|
||||
|
||||
#elif defined(USL)
|
||||
# if !defined(__STDIO_H)
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# undef OPT_UNIX_SOCKET_RPC
|
||||
# define OPT_TLI
|
||||
# if defined(PROF) /* can't use dlopen if profiling. */
|
||||
# undef OPT_DLOPEN_X11
|
||||
# undef OPT_DLOPEN_CE
|
||||
# else
|
||||
# define OPT_DLOPEN_X11
|
||||
# define OPT_DLOPEN_CE
|
||||
# endif
|
||||
# undef OPT_ADDMSG_DIRECT
|
||||
# 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
|
||||
# undef OPT_GETDTABLESIZE
|
||||
# define OPT_SYSINFO
|
||||
# define OPT_STRERROR
|
||||
# define OPT_CPP_PATH "/usr/ccs/lib/cpp"
|
||||
# define OPT_CPP_OPTIONS ""
|
||||
# define OPT_SVR4_GETMNTENT
|
||||
/* the reason for locking MNTENT is to sync with the Solaris automounter,
|
||||
* which doesn't apply on UnixWare. It probably wouldn't hurt to
|
||||
* do the lockf there, but things seem to be working without it...
|
||||
*/
|
||||
# undef OPT_LOCKF_MNTENT
|
||||
# define OPT_BUG_USL
|
||||
# if defined(OSMAJORVERSION) && (OSMAJORVERSION > 1)
|
||||
# define OPT_BUG_UW_2
|
||||
# else
|
||||
# define OPT_BUG_UW_1
|
||||
# endif
|
||||
# define OPT_LOCAL_MOUNT_TYPE "vxfs"
|
||||
# define OPT_DEFINE_SIG_PF
|
||||
# define OPT_TAR_HAS_EXCLUDE_OPTION
|
||||
# define OPT_HAS_REALPATH
|
||||
|
||||
#elif defined(__osf__)
|
||||
# define OPT_UNIX_SOCKET_RPC
|
||||
# undef OPT_TLI
|
||||
|
||||
@@ -48,7 +48,7 @@ extern "C" in_addr_t inet_addr(const char *);
|
||||
#ifdef __osf__
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#if !defined(USL) && !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
|
||||
#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
#endif /* __osf */
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#ifdef __osf__
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#if !defined (USL) && !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
|
||||
#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
#endif /* __osf__ */
|
||||
@@ -45,13 +45,6 @@
|
||||
#define X_INCLUDE_TIME_H
|
||||
#define XOS_USE_XT_LOCKING
|
||||
#include <X11/Xos_r.h>
|
||||
|
||||
#if defined (USL)
|
||||
#include <tt_options.h>
|
||||
#if defined(OPT_BUG_UW_2)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <util/tt_log.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
@@ -59,10 +59,6 @@
|
||||
#undef rindex
|
||||
#endif
|
||||
|
||||
#if defined(OPT_BUG_USL)
|
||||
#define S_ISLNK(mode) ((mode & 0xF000) == S_IFLNK)
|
||||
#endif
|
||||
|
||||
// Not everybody has realpath() in libc, sometimes we have to define
|
||||
// it ourselves, see realpath*.c in tt/lib
|
||||
|
||||
|
||||
@@ -253,14 +253,11 @@ _tt_sigset(
|
||||
* arguments anyway. sa_sigaction is, fortunately, the same on all
|
||||
* Solaris versions.
|
||||
* Once the requirement to compile on Solaris 2.4 goes away, we can
|
||||
* simply remove the OPT_BUG_SUNOS_5 ifdefs here, leaving only the
|
||||
* UnixWare one.
|
||||
* simply remove the OPT_BUG_SUNOS_5 ifdefs here.
|
||||
*/
|
||||
struct sigaction act;
|
||||
#if defined(OPT_BUG_SUNOS_5)
|
||||
act.sa_sigaction = (void (*)(int, siginfo_t *, void *)) handler;
|
||||
#elif defined(OPT_BUG_USL)
|
||||
act.sa_handler = (void (*)()) handler;
|
||||
#else
|
||||
act.sa_handler = handler;
|
||||
#endif
|
||||
@@ -377,7 +374,7 @@ _tt_vsyslog(
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(OPT_BUG_AIX) || defined(OPT_BUG_HPUX) || defined(OPT_BUG_USL) || defined(__osf__)
|
||||
#if defined(OPT_BUG_AIX) || defined(OPT_BUG_HPUX) || defined(__osf__)
|
||||
char buf[5000];
|
||||
vsprintf( buf, _format, args );
|
||||
syslog( priority, buf );
|
||||
|
||||
@@ -63,12 +63,6 @@
|
||||
typedef void (*SIG_PF)(int);
|
||||
#endif
|
||||
|
||||
#if defined(OPT_BUG_USL)
|
||||
#if !defined(MNTTYPE_NFS)
|
||||
#define MNTTYPE_NFS "nfs"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
_Tt_string _tt_gethostname(void);
|
||||
int _tt_getdtablesize(void);
|
||||
int _tt_zoomdtablesize(void);
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
extern "C" {
|
||||
#include <wchar.h>
|
||||
};
|
||||
#elif defined(OPT_BUG_SUNOS_5) || defined(OPT_BUG_USL)
|
||||
#elif defined(OPT_BUG_SUNOS_5)
|
||||
#include <widec.h>
|
||||
#include <wctype.h>
|
||||
#elif defined(OPT_BUG_AIX)
|
||||
|
||||
@@ -147,14 +147,6 @@ _Tt_xdr_size_stream() {
|
||||
ops.x_putlong = tt_x_putlong;
|
||||
ops.x_putbytes = tt_x_putbytes;
|
||||
ops.x_inline = (inline_t *(*)(...))tt_x_inline;
|
||||
#elif defined(OPT_BUG_USL)
|
||||
ops.x_putlong = tt_x_putlong;
|
||||
ops.x_putbytes = (bool_t (*)(XDR *, caddr_t, u_int)) tt_x_putbytes;
|
||||
#if defined(OPT_BUG_UW_1)
|
||||
ops.x_inline = (long *(*)(struct __XDR *, const int)) tt_x_inline;
|
||||
#else
|
||||
ops.x_inline = (long *(*)(struct XDR *, int)) tt_x_inline;
|
||||
#endif /* OPT_BUG_UW1 */
|
||||
#else
|
||||
ops.x_putlong = tt_x_putlong;
|
||||
ops.x_putbytes = tt_x_putbytes;
|
||||
|
||||
@@ -51,19 +51,13 @@ static int gettransient(int, netconfig *, netbuf *);
|
||||
#if defined(OPT_BUG_SUNOS_5)
|
||||
extern "C" { char * nc_sperror(); }
|
||||
#endif
|
||||
# if defined(OPT_BUG_USL)
|
||||
extern int t_errno;
|
||||
extern char *t_strerror(int t_errno);
|
||||
# endif
|
||||
#else
|
||||
#include <rpc/pmap_clnt.h>
|
||||
#include <netinet/tcp.h>
|
||||
static int gettransient(int,int,int *);
|
||||
#endif /* OPT_TLI */
|
||||
|
||||
#if defined(OPT_BUG_USL)
|
||||
typedef void (*SERVICE_FN_TYPE)(const struct svc_req *, const SVCXPRT*);
|
||||
#elif defined(OPT_BUG_AIX)
|
||||
#if defined(OPT_BUG_AIX)
|
||||
typedef void (*SERVICE_FN_TYPE)();
|
||||
#else
|
||||
typedef void (*SERVICE_FN_TYPE)(struct svc_req *, SVCXPRT*);
|
||||
|
||||
Reference in New Issue
Block a user