remove OSF1 support
This commit is contained in:
@@ -83,38 +83,3 @@ typedef Stack<int> _Stack_int_;
|
||||
#pragma define ( Stack<int> )
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __osf__
|
||||
|
||||
#pragma define_template hashTable<CC_String,autoNumberListT>
|
||||
#pragma define_template hashTable<CC_String,autoNumber>
|
||||
|
||||
#ifndef CDE_NEXT
|
||||
#pragma define_template CC_TPtrSlistDictionary<CC_String,autoNumberListT>
|
||||
#pragma define_template CC_TPtrSlistDictionary<CC_String,autoNumber>
|
||||
#endif
|
||||
|
||||
#pragma define_template CC_TPtrSlist<autoNumber>
|
||||
|
||||
#pragma define_template hashTableIterator<CC_String,autoNumber>
|
||||
#pragma define_template hashTableIterator<CC_String,autoNumberListT>
|
||||
|
||||
#pragma define_template Stack<int>
|
||||
|
||||
// still unresolved
|
||||
|
||||
#pragma define_template CC_TPtrSlist<kv_pair<CC_String, autoNumberListT> >
|
||||
#pragma define_template kv_pair<CC_String, autoNumber>
|
||||
#pragma define_template kv_pair<CC_String, autoNumberListT>
|
||||
#pragma define_template CC_TPtrSlist<kv_pair<CC_String, autoNumber> >
|
||||
#pragma define_template pointer_vector<CC_TPtrSlist<kv_pair<CC_String, autoNumber> > >
|
||||
#pragma define_template pointer_vector<CC_TPtrSlist<kv_pair<CC_String, autoNumberListT> > >
|
||||
|
||||
// The following are initializations for a static member
|
||||
// function that the DEC compiler wouldn't let me initialize
|
||||
// in the template definition
|
||||
|
||||
CC_Boolean kv_pair<CC_String, autoNumberListT>::f_needRemove = FALSE;
|
||||
CC_Boolean kv_pair<CC_String, autoNumber>::f_needRemove = FALSE;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#define DATA_BUF_SIZ 4096
|
||||
|
||||
#if defined(SC3) || defined(__osf__)
|
||||
#if defined(SC3)
|
||||
static ostrstream& terminate(ostrstream& ost)
|
||||
{
|
||||
char* pstring = ost.str();
|
||||
@@ -48,7 +48,7 @@ static ostrstream& terminate(ostrstream& ost)
|
||||
|
||||
DocParser::DocParser(Resolver &r)
|
||||
: f_resolver(r), f_ignoring_element(0),
|
||||
#if defined(SC3) || defined(__osf__)
|
||||
#if defined(SC3)
|
||||
f_buffer(new char[DATA_BUF_SIZ]),
|
||||
f_output(f_buffer, DATA_BUF_SIZ)
|
||||
#else
|
||||
@@ -60,7 +60,7 @@ DocParser::DocParser(Resolver &r)
|
||||
|
||||
DocParser::~DocParser()
|
||||
{
|
||||
#if defined(SC3) || defined(__osf__)
|
||||
#if defined(SC3)
|
||||
if (f_buffer) delete[] f_buffer;
|
||||
#else
|
||||
// this causes a free memory read when f_output is deleted as part of this
|
||||
@@ -91,7 +91,7 @@ DocParser::rawParse(istream &input)
|
||||
{
|
||||
case StartTag:
|
||||
{
|
||||
#if defined(SC3) || defined(__osf__)
|
||||
#if defined(SC3)
|
||||
Symbol name(gElemSymTab->intern(terminate(f_output).str()));
|
||||
f_output.rdbuf()->freeze(0);
|
||||
#else
|
||||
@@ -150,7 +150,7 @@ DocParser::process(istream &input, ostringstream &output,
|
||||
|
||||
unsigned int child = 1 ; // sibling numbers for child elements
|
||||
|
||||
#if !defined(SC3) && !defined(__osf__)
|
||||
#if !defined(SC3)
|
||||
string pstring;
|
||||
#endif
|
||||
string data;
|
||||
@@ -187,7 +187,7 @@ DocParser::process(istream &input, ostringstream &output,
|
||||
/////////////////////////////
|
||||
// first child of this node
|
||||
/////////////////////////////
|
||||
#if defined(SC3) || defined(__osf__)
|
||||
#if defined(SC3)
|
||||
Symbol name(gElemSymTab->intern(terminate(f_output).str()));
|
||||
|
||||
update_last_seen_child_name(last_seen_child_name,
|
||||
@@ -198,7 +198,7 @@ DocParser::process(istream &input, ostringstream &output,
|
||||
process(input, output, name, child++, child_relative_sibling_number);
|
||||
#else
|
||||
data = f_output.str().c_str();
|
||||
//#if !defined(SC3) && !defined(__osf__)
|
||||
//#if !defined(SC3)
|
||||
// data[f_output.str().size()] = '\0';
|
||||
//#endif
|
||||
Symbol name(gElemSymTab->intern(data.c_str()));
|
||||
@@ -214,13 +214,13 @@ DocParser::process(istream &input, ostringstream &output,
|
||||
// hit an end tag right after start tag
|
||||
#ifdef DEBUG
|
||||
{
|
||||
#if defined(SC3) || defined(__osf__)
|
||||
#if defined(SC3)
|
||||
data = terminate(f_output).str();
|
||||
f_output.rdbuf()->freeze(0);
|
||||
#else
|
||||
data = f_output.str().c_str();
|
||||
//#ifdef _IBMR2
|
||||
//#if !defined(SC3) && !defined(__osf__)
|
||||
//#if !defined(SC3)
|
||||
// data[f_output.str().size()] = '\0';
|
||||
//#endif
|
||||
#endif
|
||||
@@ -242,21 +242,13 @@ DocParser::process(istream &input, ostringstream &output,
|
||||
break;
|
||||
case AttributeSection:
|
||||
{
|
||||
#if !defined(SC3) && \
|
||||
!defined(__osf__) && \
|
||||
!defined(_IBMR2) && \
|
||||
!defined(linux) && \
|
||||
!defined(CSRG_BASED) && \
|
||||
!defined(sun)
|
||||
#if !defined(SC3) && !defined(_IBMR2) && !defined(linux) && \
|
||||
!defined(CSRG_BASED) && !defined(sun)
|
||||
volatile
|
||||
#endif
|
||||
AttributeList *attrs = 0;
|
||||
#if !defined(SC3) && \
|
||||
!defined(__osf__) && \
|
||||
!defined(_IBMR2) && \
|
||||
!defined(linux) && \
|
||||
!defined(CSRG_BASED) && \
|
||||
!defined(sun)
|
||||
#if !defined(SC3) && !defined(_IBMR2) && !defined(linux) && \
|
||||
!defined(CSRG_BASED) && !defined(sun)
|
||||
volatile
|
||||
#endif
|
||||
AttributeList *olias_attrs = 0;
|
||||
@@ -313,7 +305,7 @@ DocParser::process(istream &input, ostringstream &output,
|
||||
// the str() call seems to add the null byte to the stream
|
||||
// and increment the pcount, so we must make sure it gets
|
||||
// called first
|
||||
#if defined(SC3) || defined(__osf__)
|
||||
#if defined(SC3)
|
||||
char *pstring = terminate(f_output).str();
|
||||
int size = f_output.pcount();
|
||||
f_resolver.data(pstring, size);
|
||||
@@ -337,7 +329,7 @@ DocParser::process(istream &input, ostringstream &output,
|
||||
// second child and beyond.
|
||||
/////////////////////////////
|
||||
data = f_output.str().c_str();
|
||||
#if defined(SC3) || defined(__osf__)
|
||||
#if defined(SC3)
|
||||
f_output.rdbuf()->freeze(0);
|
||||
#endif
|
||||
|
||||
@@ -370,7 +362,7 @@ debug(cerr, f_output.str().size());
|
||||
// the str() call seems to add the null byte to the stream
|
||||
// and increment the pcount, so we must make sure it gets
|
||||
// called first
|
||||
#if defined(SC3) || defined(__osf__)
|
||||
#if defined(SC3)
|
||||
char *pstring = f_output.str();
|
||||
int size = f_output.pcount();
|
||||
*(pstring + size) = 0;
|
||||
@@ -386,7 +378,7 @@ debug(cerr, f_output.str().size());
|
||||
}
|
||||
#ifdef DEBUG
|
||||
{
|
||||
#if defined(SC3) || defined(__osf__)
|
||||
#if defined(SC3)
|
||||
data = terminate(f_output).str();
|
||||
f_output.rdbuf()->freeze(0);
|
||||
#else
|
||||
@@ -419,7 +411,7 @@ DocParser::process_attributes(istream &input, ostringstream &output,
|
||||
AttributeList *&attrs,
|
||||
AttributeList *&olias_attrs)
|
||||
{
|
||||
#if !defined(SC3) && !defined(__osf__)
|
||||
#if !defined(SC3)
|
||||
string theData;
|
||||
#endif
|
||||
TagType tt ;
|
||||
@@ -436,7 +428,7 @@ DocParser::process_attributes(istream &input, ostringstream &output,
|
||||
{
|
||||
case StartTag:
|
||||
{
|
||||
#if !defined(SC3) && !defined(__osf__)
|
||||
#if !defined(SC3)
|
||||
theData = f_output.str().c_str();
|
||||
#endif
|
||||
if (!attrs)
|
||||
@@ -444,7 +436,7 @@ DocParser::process_attributes(istream &input, ostringstream &output,
|
||||
|
||||
newAttribute =
|
||||
process_attribute(input, output,
|
||||
#if defined(SC3) || defined(__osf__)
|
||||
#if defined(SC3)
|
||||
gSymTab->intern(terminate(f_output).str()),
|
||||
gSymTab->intern(f_streambuf->str()),
|
||||
#else
|
||||
@@ -462,7 +454,7 @@ DocParser::process_attributes(istream &input, ostringstream &output,
|
||||
throw(CASTDPUTEXCEPT docParserUnexpectedTag());
|
||||
break;
|
||||
case OliasAttribute:
|
||||
#if !defined(SC3) && !defined(__osf__)
|
||||
#if !defined(SC3)
|
||||
theData = f_output.str().c_str();
|
||||
#endif
|
||||
// mirrors attribute
|
||||
@@ -471,7 +463,7 @@ DocParser::process_attributes(istream &input, ostringstream &output,
|
||||
|
||||
newAttribute =
|
||||
process_attribute(input, output,
|
||||
#if defined(SC3) || defined(__osf__)
|
||||
#if defined(SC3)
|
||||
gSymTab->intern(terminate(f_output).str()),
|
||||
gSymTab->intern(f_streambuf->str()),
|
||||
#else
|
||||
@@ -528,7 +520,7 @@ DocParser::process_attribute(istream &input, ostringstream &output,
|
||||
DocParser::read_data(input, output);
|
||||
} else
|
||||
(void)read_data(input, output);
|
||||
#if defined(SC3) || defined(__osf__)
|
||||
#if defined(SC3)
|
||||
char *data = f_output.str();
|
||||
*(data + f_output.pcount()) = 0;
|
||||
f_output.rdbuf()->freeze(0);
|
||||
|
||||
@@ -82,7 +82,7 @@ private:
|
||||
private:
|
||||
unsigned int f_ignoring_element ;
|
||||
Resolver &f_resolver;
|
||||
#if defined(SC3) || defined(__osf__)
|
||||
#if defined(SC3)
|
||||
char* const f_buffer;
|
||||
ostrstream f_output;
|
||||
#else
|
||||
|
||||
@@ -141,20 +141,17 @@ BinaryOperatorNode::evaluate() const
|
||||
{
|
||||
// calculate children trees and then have feature value do the operation
|
||||
|
||||
#if !defined(SC3) && !defined(_IBMR2) && \
|
||||
!defined(__osf__) && !defined(linux) && \
|
||||
#if !defined(SC3) && !defined(_IBMR2) && !defined(linux) && \
|
||||
!defined(CSRG_BASED) && !defined(sun)
|
||||
volatile
|
||||
#endif
|
||||
FeatureValue *left = 0;
|
||||
#if !defined(SC3) && !defined(_IBMR2) && \
|
||||
!defined(__osf__) && !defined(linux) && \
|
||||
#if !defined(SC3) && !defined(_IBMR2) && !defined(linux) && \
|
||||
!defined(CSRG_BASED) && !defined(sun)
|
||||
volatile
|
||||
#endif
|
||||
FeatureValue *right = 0;
|
||||
#if !defined(SC3) && !defined(_IBMR2) && \
|
||||
!defined(__osf__) && !defined(linux) && \
|
||||
#if !defined(SC3) && !defined(_IBMR2) && !defined(linux) && \
|
||||
!defined(CSRG_BASED) && !defined(sun)
|
||||
volatile
|
||||
#endif
|
||||
|
||||
@@ -148,87 +148,3 @@ typedef pointer_vector<FeatureValue> _pointer_vector_FeatureValue_;
|
||||
#pragma define( value_vector<PathTermPtr> )
|
||||
#pragma define( pointer_vector<FeatureValue> )
|
||||
#endif
|
||||
|
||||
#ifdef __osf__
|
||||
|
||||
// The following are initializations for a static member
|
||||
// function that the DEC compiler wouldn't let me initialize
|
||||
// in the template definition
|
||||
|
||||
|
||||
CC_Boolean kv_pair<SymbolName, unsigned int>::f_needRemove = FALSE;
|
||||
CC_Boolean kv_pair<unsigned int, BitVector>::f_needRemove = FALSE;
|
||||
CC_Boolean kv_pair<Symbol, Expression>::f_needRemove = FALSE;
|
||||
CC_Boolean kv_pair<FeatureDef, FeatureDef>::f_needRemove = FALSE;
|
||||
|
||||
#pragma define_template CC_TPtrSlist<CC_String>
|
||||
#pragma define_template CC_TPtrDlist<CC_String>
|
||||
|
||||
#pragma define_template CC_TPtrSlist<Attribute>
|
||||
#pragma define_template CC_TPtrSlist<Feature>
|
||||
#pragma define_template CC_TPtrSlist<PathFeature>
|
||||
#pragma define_template CC_TPtrSlist<FeatureValue>
|
||||
#pragma define_template CC_TPtrSlist<FeatureDef>
|
||||
#pragma define_template CC_TPtrSlist<TypeValues>
|
||||
#pragma define_template CC_TPtrSlist<char>
|
||||
|
||||
#pragma define_template CC_TPtrDlist<PathFeature>
|
||||
#pragma define_template CC_TPtrDlist<Symbol>
|
||||
#pragma define_template CC_TPtrDlist<ResolverStackElement>
|
||||
#pragma define_template CC_TPtrDlist<char>
|
||||
|
||||
#pragma define_template hashTable<SymbolName, unsigned int>
|
||||
#pragma define_template hashTable<Symbol, Expression>
|
||||
#pragma define_template hashTable<unsigned int,BitVector>
|
||||
|
||||
#pragma define_template hashTableIterator<SymbolName,unsigned int>
|
||||
#pragma define_template hashTableIterator<unsigned int,BitVector>
|
||||
#pragma define_template hashTableIterator<Symbol, Expression>
|
||||
#pragma define_template hashTableIterator<FeatureDef, FeatureDef>
|
||||
|
||||
|
||||
#ifndef CDE_NEXT
|
||||
#pragma define_template CC_TPtrSlistDictionary<SymbolName,unsigned int>
|
||||
#pragma define_template CC_TPtrSlistDictionary<unsigned int,BitVector>
|
||||
#pragma define_template CC_TPtrSlistDictionary<Symbol,Expression>
|
||||
#pragma define_template CC_TPtrSlistDictionary<SymbolName,unsigned int>
|
||||
#endif
|
||||
|
||||
typedef dlist_array<CC_String> _ordvec_cstring_ ;
|
||||
typedef CC_TValSlist<posRecord> _f54_;
|
||||
typedef value_vector<PathTermPtr> _PathTermPtrvalue_vector_;
|
||||
typedef pointer_vector<FeatureValue> _pointer_vector_FeatureValue_;
|
||||
|
||||
#pragma define_template dlist_array<CC_String>
|
||||
#pragma define_template CC_TValSlist<posRecord>
|
||||
#pragma define_template value_vector<PathTermPtr>
|
||||
#pragma define_template pointer_vector<FeatureValue>
|
||||
|
||||
// unresolved references
|
||||
|
||||
#pragma define_template CC_TPtrDlist<PathTerm>
|
||||
#pragma define_template CC_TPtrDlistIterator<PathTerm>
|
||||
#pragma define_template CC_TValSlistIterator<posRecord>
|
||||
#pragma define_template CC_TPtrSlist<Symbol>
|
||||
#pragma define_template dlist_array<Symbol>
|
||||
#pragma define_template CC_TPtrSlist<ResolverStackElement>
|
||||
#pragma define_template kv_pair<SymbolName, unsigned int>
|
||||
#pragma define_template CC_TPtrSlist<kv_pair<SymbolName, unsigned int> >
|
||||
#pragma define_template pointer_vector<CC_TPtrSlist<kv_pair<SymbolName, unsigned int> > >
|
||||
#pragma define_template CC_TPtrSlist<kv_pair<unsigned int, BitVector> >
|
||||
#pragma define_template pointer_vector<CC_TPtrSlist<kv_pair<unsigned int, BitVector> > >
|
||||
#pragma define_template CC_TPtrSlist<Symbol>
|
||||
#pragma define_template kv_pair<Symbol, Expression>
|
||||
#pragma define_template CC_TPtrSlist<kv_pair<Symbol, Expression> >
|
||||
#pragma define_template pointer_vector<CC_TPtrSlist<kv_pair<Symbol, Expression> > >
|
||||
#pragma define_template CC_TPtrSlist<kv_pair<FeatureDef, FeatureDef> >
|
||||
#pragma define_template pointer_vector<CC_TPtrSlist<kv_pair<FeatureDef, FeatureDef> > >
|
||||
#pragma define_template CC_TValSlist<int>
|
||||
#pragma define_template CC_TValSlistIterator<int>
|
||||
#pragma define_template CC_TValSlistIterator<char>
|
||||
// #pragma define_template CC_TValSlistIterator<char*>
|
||||
// #pragma define_template C_TValSlistIterator<TableDefn*>
|
||||
#pragma define_template kv_pair<unsigned int, BitVector>
|
||||
#pragma define_template kv_pair<FeatureDef, FeatureDef>
|
||||
#pragma define_template CC_TPtrSlist<PathTerm>
|
||||
#endif
|
||||
|
||||
@@ -43,8 +43,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#if !defined(__osf__) && !defined(linux) && \
|
||||
!defined(CSRG_BASED) && !defined(sun)
|
||||
#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -43,8 +43,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#if !defined(__osf__) && !defined(linux) && \
|
||||
!defined(CSRG_BASED) && !defined(sun)
|
||||
#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -89,8 +89,7 @@ typedef unsigned int sigset_t;
|
||||
* If your system's vsnprintf returns a char *, not an int,
|
||||
* change the 0 to a 1.
|
||||
*/
|
||||
#if !defined(_AIX) && !defined(__osf__) && !defined(linux) && \
|
||||
!defined(CSRG_BASED) && !defined(sun)
|
||||
#if !defined(_AIX) && !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
|
||||
#define VSPRINTF_CHARSTAR
|
||||
#endif
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(__osf__) || defined(linux) || defined(CSRG_BASED) || defined(sun)
|
||||
#if defined(linux) || defined(CSRG_BASED) || defined(sun)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <osfcn.h>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(__osf__) || defined(linux) || defined(CSRG_BASED) || defined(sun)
|
||||
#if defined(linux) || defined(CSRG_BASED) || defined(sun)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <osfcn.h>
|
||||
|
||||
@@ -26,10 +26,6 @@
|
||||
#include "utility/pm_random.h"
|
||||
#include "utility/funcs.h"
|
||||
|
||||
#if defined(__osf__)
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#ifdef REGRESSION_TEST
|
||||
|
||||
extern
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
#include "dti_cc/cc_exceptions.h"
|
||||
|
||||
#if !defined(__osf__)
|
||||
template <class K, class V> CC_Boolean kv_pair<K, V>::f_needRemove = FALSE;
|
||||
#endif
|
||||
|
||||
template <class K, class V>
|
||||
kv_pair<K, V>::~kv_pair()
|
||||
|
||||
@@ -91,11 +91,7 @@ oid_t::oid_t(const char* source, Boolean ascii_format, Boolean swap_order)
|
||||
memcpy((char*)&v_i_code, source, sizeof(v_i_code));
|
||||
|
||||
if ( swap_order == true )
|
||||
#ifdef __osf__
|
||||
ORDER_SWAP_INT(v_i_code);
|
||||
#else
|
||||
ORDER_SWAP_LONG(v_i_code);
|
||||
#endif
|
||||
|
||||
} else {
|
||||
istringstream in((char*)source);
|
||||
@@ -252,11 +248,7 @@ void oid_t::to_char_string(char* sink, Boolean swap_order) const
|
||||
|
||||
if ( swap_order == true ) {
|
||||
i_code_t x = v_i_code;
|
||||
#ifdef __osf__
|
||||
ORDER_SWAP_INT(x);
|
||||
#else
|
||||
ORDER_SWAP_LONG(x);
|
||||
#endif
|
||||
memcpy(sink, (char*)&x, sizeof(x));
|
||||
} else
|
||||
memcpy(sink, (char*)&v_i_code, sizeof(v_i_code));
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
#define desc_print3(s, n, x) s << " " << n << "=" << (x) << ":\\" << endl
|
||||
#define desc_print_end3(s, n, x) s << " " << n << "=" << (x) << endl
|
||||
|
||||
#if !defined ( __STDC__) && !defined (hpux) && !defined(__osf__)
|
||||
#if !defined ( __STDC__) && !defined (hpux)
|
||||
#define desc_print(s, x) s << " " << "x" << "=" << (x) << ":\\\n"
|
||||
#define desc_print_end(s, x) s << " " << "x" << "=" << (x) << "\n"
|
||||
#else
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(__osf__) || defined(linux) || defined(CSRG_BASED) || defined(sun)
|
||||
#if defined(linux) || defined(CSRG_BASED) || defined(sun)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <osfcn.h>
|
||||
|
||||
@@ -118,11 +118,7 @@ public:
|
||||
};
|
||||
|
||||
void swap_order() {
|
||||
#ifdef __osf__
|
||||
ORDER_SWAP_INT(fwd_ptr);
|
||||
#else
|
||||
ORDER_SWAP_LONG(fwd_ptr);
|
||||
#endif
|
||||
ORDER_SWAP_UINT(header.int_view);
|
||||
swapped = true;
|
||||
};
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
#if !defined ( __STDC__) && !defined (hpux) && !defined(__osf__)
|
||||
#if !defined ( __STDC__) && !defined (hpux)
|
||||
#define debug(s, x) s << "x" << " = " << (x) << "\n"
|
||||
#else
|
||||
#define debug(s, x) s << #x << " = " << (x) << "\n"
|
||||
|
||||
@@ -26,8 +26,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if !defined(hpux) && !defined(__osf__) && \
|
||||
!defined(linux) && !defined(CSRG_BASED) && !defined(sun)
|
||||
#if !defined(hpux) && !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
|
||||
#include <sysent.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -71,13 +71,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
#ifdef __osf__
|
||||
extern "C"
|
||||
{
|
||||
int statvfs(const char *, struct statvfs *);
|
||||
int getdomainname(char *, int);
|
||||
}
|
||||
#endif /* __osf__ */
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define BUFLEN 512
|
||||
@@ -748,7 +741,7 @@ Boolean cc_is_digit(istream& in)
|
||||
|
||||
unsigned long disk_space(const char* path)
|
||||
{
|
||||
#if defined(__osf__) || defined (hpux) || defined (SVR4) || defined(CSRG_BASED)
|
||||
#if defined (hpux) || defined (SVR4) || defined(CSRG_BASED)
|
||||
struct statvfs statfs_buf;
|
||||
#else
|
||||
struct statfs statfs_buf;
|
||||
@@ -756,7 +749,7 @@ unsigned long disk_space(const char* path)
|
||||
|
||||
long free_bytes;
|
||||
|
||||
#if defined(__osf__) || defined (hpux) || defined (SVR4) || defined(CSRG_BASED)
|
||||
#if defined (hpux) || defined (SVR4) || defined(CSRG_BASED)
|
||||
if ( statvfs(path, &statfs_buf) == 0 ) {
|
||||
free_bytes = statfs_buf.f_bavail * statfs_buf.f_frsize ;
|
||||
#else
|
||||
|
||||
@@ -52,11 +52,10 @@
|
||||
#ifndef _funcs_h
|
||||
#define _funcs_h 1
|
||||
|
||||
#if !defined(__osf__) && !defined(linux) && \
|
||||
!defined(CSRG_BASED) && !defined(sun)
|
||||
#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
|
||||
#include <libc.h>
|
||||
#endif
|
||||
#if defined(hpux) || defined(sgi) ||defined(__osf__) || \
|
||||
#if defined(hpux) || defined(sgi) || \
|
||||
defined(linux) || defined(CSRG_BASED) || defined(sun)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
@@ -113,35 +112,19 @@ char * cuserid(char *s);
|
||||
|
||||
inline float flog2(unsigned int x) {
|
||||
return (float)(log((double)x) / log((double)2));
|
||||
#if defined(__osf__)
|
||||
} // return log_2(x)
|
||||
#else
|
||||
}; // return log_2(x)
|
||||
#endif /* (__osf__) */
|
||||
}; // return log_2(x)
|
||||
|
||||
inline float flog2(const float x) {
|
||||
return (float)log((double)x) / (float)log((float)2);
|
||||
#if defined(__osf__)
|
||||
}
|
||||
#else
|
||||
};
|
||||
#endif /* (__osf__) */
|
||||
|
||||
inline int pow2(const int x) {
|
||||
return (int)pow((double)2, (double)x);
|
||||
#if defined(__osf__)
|
||||
} // x's power of 2
|
||||
#else
|
||||
}; // x's power of 2
|
||||
#endif /* (__osf__) */
|
||||
|
||||
inline int pow2(const float x) {
|
||||
return (int)pow((double)2, (double)x);
|
||||
#if defined(__osf__)
|
||||
} // x's power of 2
|
||||
#else
|
||||
}; // x's power of 2
|
||||
#endif /* (__osf__) */
|
||||
|
||||
int pos_of_LSB(const unsigned int x); // position of the MSB
|
||||
|
||||
@@ -150,27 +133,15 @@ unsigned getbits(unsigned, unsigned, unsigned);
|
||||
|
||||
inline void char_swap(char& c1, char& c2) {
|
||||
char tmp = c1; c1 = c2; c2 = tmp;
|
||||
#if defined(__osf__)
|
||||
} // switch two chars
|
||||
#else
|
||||
}; // switch two chars
|
||||
#endif /* (__osf__) */
|
||||
|
||||
inline void short_swap(short& s1, short& s2) {
|
||||
short tmp = s1; s1 = s2; s2 = tmp;
|
||||
#if defined(__osf__)
|
||||
}// switch two shorts
|
||||
#else
|
||||
};// switch two shorts
|
||||
#endif /* (__osf__) */
|
||||
|
||||
inline void int_swap(int& i1, int& i2) {
|
||||
int tmp = i1; i1 = i2; i2 = tmp;
|
||||
#if defined(__osf__)
|
||||
} // switch two ints
|
||||
#else
|
||||
}; // switch two ints
|
||||
#endif /* (__osf__) */
|
||||
|
||||
// file functions
|
||||
|
||||
|
||||
@@ -77,7 +77,6 @@
|
||||
|
||||
/* little endian to/from big endian swap macros. */
|
||||
|
||||
#ifndef __osf__
|
||||
#define ORDER_SWAP_LONG(x) \
|
||||
{ \
|
||||
long tmp_long = x; \
|
||||
@@ -85,21 +84,7 @@
|
||||
((unsigned char*)&x)[1] = ((unsigned char*)&tmp_long)[2]; \
|
||||
((unsigned char*)&x)[2] = ((unsigned char*)&tmp_long)[1]; \
|
||||
((unsigned char*)&x)[3] = ((unsigned char*)&tmp_long)[0]; \
|
||||
}
|
||||
#else
|
||||
#define ORDER_SWAP_LONG(x) \
|
||||
{ \
|
||||
long tmp_long = x; \
|
||||
((unsigned char*)&x)[0] = ((unsigned char*)&tmp_long)[7]; \
|
||||
((unsigned char*)&x)[1] = ((unsigned char*)&tmp_long)[6]; \
|
||||
((unsigned char*)&x)[2] = ((unsigned char*)&tmp_long)[5]; \
|
||||
((unsigned char*)&x)[3] = ((unsigned char*)&tmp_long)[4]; \
|
||||
((unsigned char*)&x)[4] = ((unsigned char*)&tmp_long)[3]; \
|
||||
((unsigned char*)&x)[5] = ((unsigned char*)&tmp_long)[2]; \
|
||||
((unsigned char*)&x)[6] = ((unsigned char*)&tmp_long)[1]; \
|
||||
((unsigned char*)&x)[7] = ((unsigned char*)&tmp_long)[0]; \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define ORDER_SWAP_FLOAT(x) \
|
||||
{ \
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
/* $XConsortium: streambuf.C /main/8 1996/08/21 15:55:14 drk $ */
|
||||
#include "utility/c_streambuf.h"
|
||||
|
||||
#if defined(__osf__) || defined(linux) || \
|
||||
defined(CSRG_BASED) || defined(sun)
|
||||
#if defined(linux) || defined(CSRG_BASED) || defined(sun)
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <libc.h>
|
||||
|
||||
@@ -79,7 +79,7 @@ typedef void (*print_func_ptr_t)(ostream&, const void*);
|
||||
|
||||
//enum Boolean { true, false };
|
||||
|
||||
#if !defined(__osf__) && !defined(linux) && !defined(CSRG_BASED)
|
||||
#if !defined(linux) && !defined(CSRG_BASED)
|
||||
typedef long mmdb_pos_t;
|
||||
#else
|
||||
typedef int mmdb_pos_t;
|
||||
|
||||
@@ -78,7 +78,7 @@ void xtime::stop(float &cpu_time, long &elp_time)
|
||||
|
||||
void xtime::start()
|
||||
{
|
||||
#if defined (SVR4) && !defined (_IBMR2) && !defined(sun) && !defined(__osf__)
|
||||
#if defined (SVR4) && !defined (_IBMR2) && !defined(sun)
|
||||
if ( gettimeofday(&v_tv) != 0 ) {
|
||||
#else
|
||||
if ( gettimeofday(&v_tv, &v_tz) != 0 ) {
|
||||
@@ -89,7 +89,7 @@ void xtime::start()
|
||||
|
||||
v_elapsed_stamp = v_tv.tv_sec;
|
||||
|
||||
#if defined(SVR4) || defined(__osf__)
|
||||
#if defined(SVR4)
|
||||
if ( times(&v_time_regs) == -1 )
|
||||
#else
|
||||
if ( times(&v_time_regs) != 0 )
|
||||
|
||||
Reference in New Issue
Block a user