remove OSF1 support
This commit is contained in:
@@ -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