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

@@ -171,12 +171,7 @@ static unsigned char anno_double_bits[] = {
0x0a, 0x20, 0xea, 0x2f, 0x0a, 0x20, 0xea, 0x2f, 0x0a, 0x20, 0xfa, 0x3f,
0x02, 0x08, 0xfe, 0x0f, 0x00, 0x00};
#if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED)
#include <signal.h>
#else
#include <sys/signal.h>
#endif
#include <unistd.h>
#include <stdio.h>

View File

@@ -63,9 +63,6 @@
#include <ctype.h>
#include <stdio.h>
#include <unistd.h>
#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
#include <sysent.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>

View File

@@ -77,9 +77,7 @@
#include <WWL/WXmPushButton.h>
#include <stdlib.h>
#if defined(SVR4) || defined(SYSV) || defined(__linux__) || defined(CSRG_BASED)
#include <limits.h>
#endif
#define CLASS QueryTermView

View File

@@ -71,20 +71,12 @@ private:
};
template <class T>
#if defined(_IBMR2) || defined(__linux__) || defined(CSRG_BASED) || defined(sun)
class xList : public List_base
#else
class xList : private List_base
#endif
{
// NOTE: This friend declaration is too general because cfront
// barfs when I do it the correct way. 22:05 22-Jul-93 DJB
#ifdef SC3
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
public:
xList() { }
@@ -118,11 +110,7 @@ public:
template <class T>
#if defined(_IBMR2) || defined(__linux__) || defined(CSRG_BASED) || defined(sun)
class List_Iterator : public List_Iterator_base
#else
class List_Iterator : private List_Iterator_base
#endif
{
friend class xList<T>;
public:

View File

@@ -45,13 +45,8 @@
#define WArgList_h
// Allow setting of resources by name in arg list
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#define CASTRNAM (char*)
#define CASTVAL (void*)(size_t)
#else
#define CASTRNAM
#define CASTVAL
#endif
#define RSRC_SET(RSC,TYP,RNAM) \
inline WArgList& RSC(TYP val) { return Add(CASTRNAM RNAM, CASTVAL val); }

View File

@@ -45,19 +45,10 @@
#define wwl_h
// 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>
#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
#include <generic.h>
#else
#define name2(__n1,__n2) __paste2(__n1,__n2)
#define __paste2(__p1,__p2) __p1##__p2
#endif
#include <Xm/Xm.h>
#include "WXmString.h"
@@ -78,13 +69,8 @@ class WComposite;
typedef void (* XtProc)();
#endif
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#define CASTRNAM (char*)
#define CASTVAL (void*)(size_t)
#else
#define CASTRNAM
#define CASTVAL
#endif
#define DEFINE_GETTER(rsc,typ,rnam) \
inline typ rsc() const \

View File

@@ -42,11 +42,7 @@
#ifdef __cplusplus
#include <stdlib.h>
#if !defined(__DECCXX) && !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
#include <osfcn.h>
#else
#include <unistd.h>
#endif
/* use prototypes in function declarations */
#define YY_USE_PROTOS