/usr/include/givaro/givconfig.h is in libgivaro-dev 3.2.13-1.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | #ifndef _GIVARO_INTERNAL_CONFIG_H_
#define _GIVARO_INTERNAL_CONFIG_H_ 1
// ==========================================================================
// $Source: /var/lib/cvs/Givaro/src/kernel/system/givconfig.h,v $
// Copyright(c)'94-97 by Givaro Team
// see the copyright file.
// Authors: T. Gautier
// $Id: givconfig.h,v 1.8 2007-10-02 14:37:45 jgdumas Exp $
// ==========================================================================
// Description: configuration file for Givaro
// * GIVARO_HAVE_ANSI_NAMESPACE:
// value: defined/undefined
// purpose: define it in order to use name space in place of prefix
// * GIVARO_HAVE_ANSI_SPECIALIZED:
// value: defined/undefined
// purpose: define it in order to use ANSI declaration for specialization
// of template functions.
// * GIVARO_HAVE_ANSI_EXCEPTION:
// value: defined/undefined
// purpose: define it in order to use ANSI exception classes hierarchy
// as based classes for exceptions.
// * GIVARO_HAVE_ANSI_LIBRARY:
// value: defined/undefined
// purpose: define it in order to use ANSI library utilities (except for
// container) as allocation without throwing exception, new str stream,
// std header files...
// * GIVARO_HAVE_LBLAS:
// value: defined/undefined
// purpose: define it in order to use blas numerical library for some operations
// as floating point matrice operations.
// * GIVARO_HAVE_TYPENAME:
// value: defined/undefined
// purpose: define it if the C++ compiler have typename keyword.
// * GIVARO_HAVE_LONG_LONG:
// value: defined/undefined
// purpose: define it if the C++ compiler have long long definition.
// * GIVARO_ASSERT_MACRO:
// value: defined/undefined
// purpose: expand additional code for assertion.
// * GIVARO_DEBUG:
// value: defined/undefined
// purpose: expand additional code for verification and debuging.
// * GIVARO_DEBUG_LEVEL:
// value: integer > 0
// purpose: <to be defined>
// -- Currently my machine & compiler:
#define GIVARO_HAVE_TYPENAME 1
#define GIVARO_USE_SIXTYFOUR 1
// ==========================================================================
// -- Version of the library :
// value: xxyyzz, where
// - xx: major version number
// - yy: minor version number
// - zz: revision number
#define GIVARO_VERSION 0x030103
// -- Defines this value both to compile the library of user program
// value: integer that defines debug level trace information (not well defined)
//#define GIVARO_DEBUG 1
// ==========================================================================
// -- Defines the basic integer arithmetics available on this machine
#include <givaro-config.h>
# define GIVARO_BITS_PER_LONGINT SIZEOF_LONG
# define GIVARO_BITS_PER_INT SIZEOF_INT
# define GIVARO_BITS_PER_SHORTINT SIZEOF_SHORT
# define GIVARO_BITS_PER_CHAR SIZEOF_CHAR
typedef signed __GIVARO_INT8 int8;
typedef signed __GIVARO_INT16 int16;
typedef signed __GIVARO_INT32 int32;
typedef unsigned __GIVARO_INT8 uint8;
typedef unsigned __GIVARO_INT16 uint16;
typedef unsigned __GIVARO_INT32 uint32;
# if defined(__GIVARO_INT64)
# undef GIVARO_DONOTUSE_SIXTYFOUR
typedef signed __GIVARO_INT64 int64;
typedef unsigned __GIVARO_INT64 uint64;
# else
# undef GIVARO_USE_SIXTYFOUR
# define GIVARO_DONOTUSE_SIXTYFOUR 1
# endif
# define GIVARO_MAXUINT8 255U // 2^8-1
# define GIVARO_MAXUINT16 65535U // 2^16-1
# define GIVARO_MAXUINT32 4294967295U // 2^32-1
# define GIVARO_MAXULONG 4294967295U // 2^32-1
// ==========================================================================
// -- Code expansion depending on the previous defined macros
// -- specialized template
#ifdef GIVARO_HAVE_ANSI_SPECIALIZED
# define GIVARO_SPECIALIZED template<>
#else
# define GIVARO_SPECIALIZED
#endif
// -- typename for Givaro
#ifdef GIVARO_HAVE_TYPENAME
#else
#define typename
#endif
// -- Macros for debug
#define GIV_XVALTOSTR(msg) #msg
#define GIV_VALTOSTR(msg) GIV_XVALTOSTR(msg)
// #define GIV_ERROR(msg) GivError( ##msg " File:" __FILE__ ", line:" GIV_VALTOSTR(__LINE__))
#ifdef GIVARO_DEBUG
# ifdef GIVARO_HAVE_ANSI_LIBRARY // here is ANSI C++ header definition !!!
# include <sstream>
# define GIVARO_ASSERT(cond, msg) { \
if (!(cond)) {\
ostringstream ostr;\
ostr << msg << "\nFile:"##__FILE__##", Line:" << __LINE__;\
GivError::throw_error( GivError(ostr.str().c_str()) );\
}}
# define GIVARO_ASSERT2(cond, msg1, msg2) { \
if (!(cond)) {\
ostringstream ostr;\
ostr << msg1 << msg2 << "\nFile:"##__FILE__##", Line:" << __LINE__;\
GivError::throw_error( GivError(ostr.str().c_str()) );\
}}
# else
# include <strstream>
# define GIVARO_ASSERT(cond, msg) { \
if (!(cond)) {\
ostrstream ostr;\
ostr << msg << "\nFile:" << __FILE__ << ", Line:" << __LINE__;\
GivError::throw_error( GivError(ostr.str()) );\
}}
# define GIVARO_ASSERT2(cond, msg1, msg2) { \
if (!(cond)) {\
ostrstream ostr;\
ostr << msg1 << msg2 << "\nFile:" << __FILE__ << ", Line:" << __LINE__;\
GivError::throw_error( GivError(ostr.str()) );\
}}
# endif
#else
#define GIVARO_ASSERT(cond, msg)
#define GIVARO_ASSERT2(cond, msg1, msg2)
#endif
// ==========================================================================
// -- System features
#define _SYS_UNDEF 0
#define _SYS_MACOS 1
// ==========================================================================
// -- System variable
#define GIVARO_SYS _SYS_UNDEF
// ==========================================================================
// -- Misc features. Should be deleted
// -- Define this macro to store a log of memory address
// allocated during computation
//#define GIVARO_MAPMEM
// -- Define this variable to compute statistics about memory usage
#define GIVARO_STATMEM 1
// -- Signed Traits (JGD 15.12.1999)
// JGD 11.06.03
#if !defined(__GNUC__) || (__GNUC__ != 2)
// JGD 21.03.03
#include <limits>
template<class XXX> struct GIVARO_numeric_limits {
typedef XXX self_type;
static XXX max() { return std::numeric_limits<XXX>::max(); }
};
#else
#include <limits.h>
template<class XXX> struct GIVARO_numeric_limits {
typedef XXX self_type;
static XXX max() { return (XXX)(pow(2,8*sizeof(XXX))-1); }
};
/* Declared in <float.h> on ANSI C systems. */
#ifndef DBL_MIN
#define DBL_MIN 1e-37
#endif
#ifndef DBL_MAX
#define DBL_MAX 1e+37
#endif
#ifndef FLT_MIN
#define FLT_MIN 1e-37
#endif
#ifndef FLT_MAX
#define FLT_MAX 1e+37
#endif
#ifndef __GIVARO__DONOTUSE_longlong__
# ifndef LLONG_MAX
# ifdef LONG_LONG_MAX
# define LLONG_MAX LONG_LONG_MAX
# define LLONG_MIN LONG_LONG_MIN
# define ULLONG_MAX ULONG_LONG_MAX
# else
# define LLONG_MAX 9223372036854775807LL
# define LLONG_MIN (-LLONG_MAX - 1LL)
# define ULLONG_MAX 18446744073709551615ULL
# endif
# endif
#endif
template<> inline float GIVARO_numeric_limits<float>::max() { return FLT_MAX; }
template<> inline double GIVARO_numeric_limits<double>::max() { return DBL_MAX; }
template<> inline short GIVARO_numeric_limits<short>::max() { return SHRT_MAX; }
template<> inline unsigned short GIVARO_numeric_limits<unsigned short>::max() { return USHRT_MAX; }
template<> inline unsigned char GIVARO_numeric_limits<unsigned char>::max() { return CHAR_MAX; }
template<> inline signed char GIVARO_numeric_limits<signed char>::max() { return UCHAR_MAX; }
template<> inline int GIVARO_numeric_limits<int>::max() { return INT_MAX; }
template<> inline unsigned int GIVARO_numeric_limits<unsigned int>::max() { return UINT_MAX; }
template<> inline long GIVARO_numeric_limits<long>::max() { return LONG_MAX; }
template<> inline unsigned long GIVARO_numeric_limits<unsigned long>::max() { return ULONG_MAX; }
#ifndef __GIVARO__DONOTUSE_longlong__
template<> inline long long GIVARO_numeric_limits<long long>::max() { return LLONG_MAX; }
template<> inline unsigned long long GIVARO_numeric_limits<unsigned long long>::max() { return ULLONG_MAX; }
#endif
#endif
template<class XXX> struct Signed_Trait : public GIVARO_numeric_limits<XXX> {
typedef XXX signed_type;
};
template<> struct Signed_Trait<float> : public GIVARO_numeric_limits<float> {
typedef float signed_type;
typedef unsigned long unsigned_type;
};
template<> struct Signed_Trait<double> : public GIVARO_numeric_limits<double> {
typedef double signed_type;
typedef double unsigned_type;
// typedef unsigned long unsigned_type;
};
template<> struct Signed_Trait<unsigned short> : public GIVARO_numeric_limits<unsigned short> {
typedef short signed_type;
typedef unsigned short unsigned_type;
};
template<> struct Signed_Trait<short> : public GIVARO_numeric_limits<short> {
typedef short signed_type;
typedef unsigned short unsigned_type;
};
template<> struct Signed_Trait<unsigned char> : public GIVARO_numeric_limits<unsigned char> {
typedef short signed_type;
typedef unsigned char unsigned_type;
};
template<> struct Signed_Trait<signed char> : public GIVARO_numeric_limits<signed char> {
typedef signed char signed_type;
typedef unsigned char unsigned_type;
};
template<> struct Signed_Trait<int> : public GIVARO_numeric_limits<int> {
typedef int signed_type;
typedef unsigned int unsigned_type;
};
template<> struct Signed_Trait<unsigned int> : public GIVARO_numeric_limits<unsigned int> {
typedef int signed_type;
typedef unsigned int unsigned_type;
};
template<> struct Signed_Trait<long> : public GIVARO_numeric_limits<long> {
typedef long signed_type;
typedef unsigned long unsigned_type;
};
template<> struct Signed_Trait<unsigned long> : public GIVARO_numeric_limits<unsigned long> {
typedef long signed_type;
typedef unsigned long unsigned_type;
};
#ifndef __GIVARO__DONOTUSE_longlong__
template<> struct Signed_Trait<long long> : public GIVARO_numeric_limits<long long> {
typedef long long signed_type;
typedef unsigned long long unsigned_type;
};
template<> struct Signed_Trait<unsigned long long> : public GIVARO_numeric_limits<unsigned long long> {
typedef long long signed_type;
typedef unsigned long long unsigned_type;
};
#endif
#endif
|