13 #pragma warning( disable : 4127 )
18 #define INT16_MAX 32767
21 #define INT16_MIN (-INT16_MAX - 1)
24 #if INT_MAX == INT16_MAX
26 #elif SHRT_MAX == INT16_MAX
27 typedef short int int16;
29 #error failed to define int16, please report this to gary@pa.uky.edu
33 #define UINT16_MAX 65535
36 #if UINT_MAX == UINT16_MAX
37 typedef unsigned int uint16;
38 #elif USHRT_MAX == UINT16_MAX
39 typedef unsigned short int uint16;
41 #error failed to define uint16, please report this to gary@pa.uky.edu
45 #define INT32_MAX 2147483647L
48 #define INT32_MIN (-INT32_MAX - 1)
51 #if LONG_MAX == INT32_MAX
52 typedef long int int32;
53 #elif INT_MAX == INT32_MAX
56 #error failed to define int32, please report this to gary@pa.uky.edu
60 #define UINT32_MAX 4294967295UL
63 #if ULONG_MAX == UINT32_MAX
64 typedef unsigned long int uint32;
65 #elif UINT_MAX == UINT32_MAX
66 typedef unsigned int uint32;
68 #error failed to define uint32, please report this to gary@pa.uky.edu
71 #if LONG_MAX > INT32_MAX
80 #define INT64_MAX 9223372036854775807L
83 #define INT64_MIN (-INT64_MAX - 1L)
85 #if LONG_MAX == INT64_MAX
87 typedef long int int64;
92 #if ULONG_MAX > UINT32_MAX
95 #define UINT64_MAX 18446744073709551615UL
97 #if ULONG_MAX == UINT64_MAX
99 typedef unsigned long int uint64;
106 #if __STDC_VERSION__ < 199901L
108 #define __func__ __FUNCTION__
110 #define __func__ "<unknown>"
115 #define __func__ DEBUG_ENTRY.name()
164 struct sigaction p_action;
165 struct sigaction p_default;
188 const struct sigaction* action()
const {
return &p_action; }
189 const struct sigaction* deflt()
const {
return &p_default; }
198 sigaction( SIGABRT, deflt(), NULL );
200 sigaction( SIGABRT, action(), NULL );
204 signal( SIGABRT, SIG_DFL );
220 friend void set_NaN(
double &x);
221 friend void set_NaN(
double x[],
long n);
270 #if defined(_ARCH_PPC) || defined(__POWERPC__) || defined(__powerpc__) || defined(PPC)
281 #if defined(unix) || defined(__unix__)
296 #if defined(__GNUC__) && ! ( defined(__ICC) || defined(__PATHSCALE__) )
297 #define __GNUC_EXCL__ 1
303 #define NORETURN __declspec(noreturn)
304 #elif defined(__GNUC__) || ( defined(__INTEL_COMPILER) && defined(__linux) )
305 #define NORETURN __attribute__ ((noreturn))
313 #if defined __INTEL_COMPILER
314 # define __COMP "icc"
315 # define __COMP_VER __INTEL_COMPILER
319 #elif defined __PATHSCALE__
320 # define __COMP "pathCC"
321 # define __COMP_VER __PATHCC__ * 100 + __PATHCC_MINOR__ * 10 + __PATHCC_PATCHLEVEL__
324 #elif defined __GNUC__
325 # define __COMP "g++"
326 # if defined(__GNUC_PATCHLEVEL__)
327 # define __COMP_VER (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
329 # define __COMP_VER (__GNUC__ * 10000 + __GNUC_MINOR__ * 100)
333 # define __COMP "Portland Group Compiler"
335 # if defined(__PGIC__)
336 # define __COMP_VER (__PGIC__ * 100 + __PGIC_MINOR__ * 10 + __PGIC_PATCHLEVEL__)
338 # define __COMP_VER 0
343 #elif defined(__sgi) && defined(_COMPILER_VERSION)
344 # define __COMP "MIPSpro"
345 # define __COMP_VER _COMPILER_VERSION
348 #elif defined __HP_aCC
349 # define __COMP "HP aCC"
350 # define __COMP_VER __HP_aCC
354 # define __COMP "DEC CC"
355 # define __COMP_VER __DECC_VER
358 #elif defined _MSC_VER
360 # define __COMP_VER _MSC_VER
363 #elif defined __SUNPRO_CC
364 # define __COMP "Sun Workshop"
365 # define __COMP_VER __SUNPRO_CC
369 #define __COMP "unknown"
377 # define __OS "Linux (IA32)"
378 # elif defined __amd64
379 # define __OS "Linux (AMD64)"
380 # elif defined __ia64
381 # define __OS "Linux (IA64)"
382 # elif defined __ppc__
383 # define __OS "Linux (PowerPC)"
385 # define __OS "Linux (other)"
389 #elif defined macintosh
390 # define __OS "Mac OS 9"
393 #elif defined __MACOSX__
394 # define __OS "Mac OS X"
397 #elif defined __APPLE__
398 # define __OS "Apple MacOS"
402 # define __OS "HP-UX"
406 # define __OS "Solaris"
414 # define __OS "Ultrix"
417 #elif defined __FreeBSD__
418 # define __OS "FreeBSD"
420 #elif defined __NetBSD__
421 # define __OS "NetBSD"
423 #elif defined __OpenBSD__
424 # define __OS "OpenBSD"
429 # define __OS "Win64"
433 # define __OS "Win32"
436 #elif defined __CYGWIN__
437 # define __OS "Cygwin"
445 # define __OS "unknown"
448 #if !defined(HAVE_POWI)
449 #if defined(__alpha) && !defined(__linux)
459 #if defined(__GNUC_EXCL__) && ((__GNUC__ == 2 && __GNUC_MINOR__ == 96) || (__GNUC__ == 3 && __GNUC_MINOR__ == 4))
460 #error "This g++ version cannot compile Cloudy and must not be used!"
461 #error "Please update g++ to a functional version."
462 #error "See http://cloud9.pa.uky.edu/trac/cloudy/wiki/CompilingCloudy for more details"
467 #pragma warning( default : 4127 )