Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

config.H

Go to the documentation of this file.
00001 /*
00002  * Copyright 2000, Brown University, Providence, RI.
00003  * 
00004  *                         All Rights Reserved
00005  * 
00006  * Permission to use, copy, modify, and distribute this software and its
00007  * documentation for any purpose other than its incorporation into a
00008  * commercial product is hereby granted without fee, provided that the
00009  * above copyright notice appear in all copies and that both that
00010  * copyright notice and this permission notice appear in supporting
00011  * documentation, and that the name of Brown University not be used in
00012  * advertising or publicity pertaining to distribution of the software
00013  * without specific, written prior permission.
00014  * 
00015  * BROWN UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
00016  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ANY
00017  * PARTICULAR PURPOSE.  IN NO EVENT SHALL BROWN UNIVERSITY BE LIABLE FOR
00018  * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
00019  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00020  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
00021  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
00022  */
00023 //
00024 //
00025 // jot configuration file
00026 //
00027 // XXX - At some point, this should be replaced by autoconf
00028 //
00029 #ifndef _STD_GLUE_CONFIG_H
00030 #define _STD_GLUE_CONFIG_H
00031 
00032 
00033 // The value of Greal tells glue whether to use floats or doubles as the
00034 // base type in its math lib and maybe some other places too.  When compiling,
00035 // you can change this value by setting GLUE_REAL.  It defaults here to 
00036 // double.
00037 
00038 #ifndef GLUE_REAL
00039 #  define GLUE_REAL double
00040 #endif
00041 
00042 typedef GLUE_REAL Greal;
00043 
00044 
00045 
00046 #if (defined(__GNUC__) && (__GNUC__ > 2 || \
00047                          (__GNUC__ == 2 && __GNUC_MINOR__ >= 97))) || \
00048     (defined(_STANDARD_C_PLUS_PLUS)) || (_MSC_VER >= 1300) 
00049 // #define GLUE_BACKWARD_IOSTREAM
00050 #define GLUE_NEW_STYLE_IOSTREAM
00051 #include <iostream>
00052 
00053 #ifndef _MSC_VER
00054 #ifndef _STANDARD_C_PLUS_PLUS
00055 // Make sure max() is defined
00056 #include <bits/stl_algobase.h>
00057 #else
00058 // Make sure iostream.h isn't included - XXXX hack
00059 #define IOSTREAMH
00060 // Make sure max() is defined
00061 #include <stl_algobase.h>
00062 #endif
00063 #endif
00064 using namespace std;
00065 
00066 #else
00067 #include <iostream.h>
00068 #endif
00069 
00070 // Let us define 'bool' to look the same as the proposed standard C++ 
00071 // data type 'bool'. Try to avoid redefining it if some other header 
00072 // file already defined it.
00073 //
00074 #if !defined(true) && !defined(__GNUC__) && !defined(WIN32) && !defined(_ABIN32) && !defined(__VACPP_MULTI__)
00075 #if !defined(__SUNPRO_CC) || __SUNPRO_CC < 0x500
00076 #if !defined(sgi) || !defined(_BOOL)
00077 #if !defined(__KCC) && !defined(__PGI)
00078 typedef int bool;     
00079 const   int true  = 1;
00080 const   int false = 0;
00081 #define GLUE_BOOL_EQUALS_INT
00082 #endif
00083 #endif
00084 #endif
00085 #endif
00086 
00087 
00088 #ifdef __CYGWIN__
00089 #include <stdlib.h>
00090 #include <limits.h>
00091 #endif
00092 
00093 #if defined(__KCC) || defined(__GNUC__) || defined(sgi) || defined(WIN32) || defined(_AIX) || (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x500)
00094 // If return type is a nested class, make sure to return the fully specified
00095 // type (ie, TexManip::ConsType, not ConsType)
00096 #define GLUE_NEEDS_FULL_CLASS_TYPE
00097 #endif
00098 
00099 // For some reason makedepend defines __GNUC__, so we consider __GNUC__
00100 // set only if MAKE_DEPEND isn't
00101 #if defined(WIN32) || defined(_AIX) || defined(sgi) || (defined(__GNUC__) && !defined(MAKE_DEPEND))
00102 #define GLUE_NEEDS_TEMPLATES_IN_H_FILE
00103 #endif
00104 
00105 #if defined(_AIX) || defined(__APPLE__) || defined(MACOSX)
00106 #define unix
00107 #endif
00108 
00109 // if under WINDOWS, SUNWspro 5.0 and later, or g++ 2.96 and later
00110 #if defined(WIN32) || (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x500) || \
00111    (defined(__GNUC__) && (__GNUC__ > 2 || \
00112                          (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)))
00113 #define GLUE_AVOID_STATIC_LOCAL_INLINE_VAR
00114 #endif
00115 // Currently egcs++ can't handle a templated operator(double s, const T&)
00116 #ifdef __GNUC__
00117 #define GLUE_NEEDS_DOUBLE_STAR_EXPLICIT
00118 #endif
00119 
00120 #if defined(_AIX) || defined(__GNUC__)
00121 #define TEMPLATE_INLINE inline
00122 #else
00123 #define TEMPLATE_INLINE
00124 #endif
00125 
00126 #if defined(__GNUC__) || (defined(sgi) && __mips > 2)
00127 #define GLUE_TYPENAME typename
00128 #else
00129 #define GLUE_TYPENAME
00130 #endif
00131 
00132 #if (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x500)
00133 #define GLUE_NEW_STYLE_IOSTREAM
00134 #define GLUE_OLD_STYLE_STRSTREAM
00135 using namespace std;
00136 #endif
00137 
00138 #if defined(__PGI)
00139 #define GLUE_NEW_STYLE_IOSTREAM
00140 #define GLUE_AVOID_STATIC_LOCAL_INLINE_VAR
00141 #endif
00142 
00143 
00144 #if (defined (_MSC_VER) && _MSC_VER < 1300) || (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x500)
00145 inline istream &operator>>(istream &is, bool &b)
00146    { int x; is>>x; b = (bool)x;return is;}
00147 #endif
00148 
00149 #ifdef WIN32
00150 #define ssize_t int
00151 // Disable "this" used in base member initializer warning
00152 // XXX - should disable on a per-class basis
00153 #pragma warning(disable: 4355)
00154 #endif
00155 
00156 #if defined(GLUE_NEW_STYLE_IOSTREAM)
00157 #   define WHITESPACE(X) ws(X)
00158 #else
00159 #   define WHITESPACE(X) X >> ws
00160 #endif
00161 
00162 #endif

Generated on Mon Sep 15 16:25:56 2003 for gluebase by doxygen1.2.18