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:
Chase
2022-08-03 23:15:45 -05:00
committed by Jon Trulson
parent 06863e826e
commit 45cee195bd
70 changed files with 46 additions and 1250 deletions

View File

@@ -242,15 +242,7 @@ DocParser::process(istream &input, ostringstream &output,
break;
case AttributeSection:
{
#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \
!defined(CSRG_BASED) && !defined(sun)
volatile
#endif
AttributeList *attrs = 0;
#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \
!defined(CSRG_BASED) && !defined(sun)
volatile
#endif
AttributeList *olias_attrs = 0;
mtry

View File

@@ -141,20 +141,8 @@ BinaryOperatorNode::evaluate() const
{
// 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;
#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \
!defined(CSRG_BASED) && !defined(sun)
volatile
#endif
FeatureValue *right = 0;
#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \
!defined(CSRG_BASED) && !defined(sun)
volatile
#endif
FeatureValue *result = 0;
mtry

View File

@@ -85,14 +85,6 @@ typedef unsigned int size_t;
typedef unsigned int sigset_t;
#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
* temporary file creation is intended to block all of the possible signals

View File

@@ -102,12 +102,6 @@ Destructable::~Destructable()
inline void
Destructable::destruct()
{
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
delete this;
#else
// Have to call this here since some compilers don't allow
// qualified calls through object pointer.
Destructable::~Destructable();
#endif
}
#endif

View File

@@ -26,10 +26,6 @@
#include <sys/types.h>
#include <unistd.h>
#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
#include <sysent.h>
#endif
#include <fcntl.h>
#include <string.h>

View File

@@ -52,14 +52,7 @@
#ifndef _funcs_h
#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>
#else
#include <sysent.h>
#endif
#include <time.h>
#include <errno.h>
#include <string.h>

View File

@@ -22,12 +22,7 @@
*/
/* $XConsortium: streambuf.C /main/8 1996/08/21 15:55:14 drk $ */
#include "utility/c_streambuf.h"
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <stdlib.h>
#else
#include <libc.h>
#endif
#define DEF_BUF_SIZ 4096