RConfig.h

Go to the documentation of this file.
00001 /* @(#)root/base:$Id: RConfig.h 37326 2010-12-06 11:07:19Z rdm $ */
00002 
00003 /*************************************************************************
00004  * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers.               *
00005  * All rights reserved.                                                  *
00006  *                                                                       *
00007  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00008  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00009  *************************************************************************/
00010 
00011 #ifndef ROOT_RConfig
00012 #define ROOT_RConfig
00013 
00014 /*************************************************************************
00015  *                                                                       *
00016  * RConfig                                                               *
00017  *                                                                       *
00018  * Defines used by ROOT.                                                 *
00019  *                                                                       *
00020  *************************************************************************/
00021 
00022 #ifndef ROOT_RVersion
00023 #include "RVersion.h"
00024 #endif
00025 
00026 
00027 /*---- new C++ features ------------------------------------------------------*/
00028 
00029 #define R__USE_SHADOW_CLASS
00030 
00031 /*---- machines --------------------------------------------------------------*/
00032 
00033 #ifdef __hpux
00034     /* R__HPUX10 or R__HPUX11 is determined in the Makefile */
00035 #   define R__HPUX
00036 #   define R__UNIX
00037 #   define ANSICPP
00038 #   ifdef __LP64__
00039 #      define R__B64
00040 #   endif
00041 #   ifdef R__HPUX10
00042 #      define NEED_SNPRINTF
00043 #   endif
00044 #endif
00045 
00046 #ifdef _AIX
00047 #   define R__AIX
00048 #   define R__UNIX
00049 #   define ANSICPP
00050 #   define R__SEEK64
00051 #   define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
00052 #   define NEED_STRCASECMP
00053 #   define R__ANSISTREAM      /* ANSI C++ Standard Library conformant */
00054 #endif
00055 
00056 #ifdef __linux
00057 #   ifndef linux
00058 #      define linux
00059 #   endif
00060 #endif
00061 
00062 #if defined(__CYGWIN__) && defined(__GNUC__)
00063 #   ifndef linux
00064 #      define linux
00065 #   endif
00066 #   ifndef R__WINGCC
00067 #      define R__WINGCC
00068 #   endif
00069 #endif
00070 
00071 #if defined(__alpha) && !defined(linux)
00072 #   include <standards.h>
00073 #   ifndef __USE_STD_IOSTREAM
00074 #   define __USE_STD_IOSTREAM
00075 #   endif
00076 #   define R__ANSISTREAM
00077 #   define R__SSTREAM
00078 #   define R__TMPLTSTREAM
00079 #   ifdef _XOPEN_SOURCE
00080 #      if _XOPEN_SOURCE+0 > 0
00081 #         define R__TRUE64
00082 #      endif
00083 #   endif
00084 #   define R__ALPHA
00085 #   define ANSICPP
00086 #   ifndef R__TRUE64
00087 #      define NEED_SNPRINTF
00088 #   endif
00089 #   ifndef __VMS
00090 #      define R__UNIX
00091 #      define R__B64
00092 #      define R__BYTESWAP
00093 #      if __DECCXX_VER >= 60060002
00094 #         define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
00095 #         define R__PLACEMENTDELETE /* supports overloading placement delete */
00096 #         define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
00097 #         define R__THROWNEWDELETE  /* new/delete throw exceptions */
00098 #      endif
00099 #      if defined __GNUC__
00100 #         define R__NAMESPACE_TEMPLATE_IMP_BUG
00101 #         define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
00102 #      else
00103 #         define R__TEMPLATE_OVERLOAD_BUG
00104 #      endif
00105 #   else
00106 #      define R__VMS
00107 #      define cxxbug
00108 #      define NEED_STRCASECMP
00109 #      define R__NONSCALARFPOS
00110 #   endif
00111 #endif
00112 
00113 #if defined(__sun) && !(defined(linux) || defined(__FCC_VERSION))
00114 #   ifdef __SVR4
00115 #      define R__SOLARIS
00116 #      define R__SEEK64
00117 #      define ANSICPP
00118 #      ifdef __i386
00119 #         define R__BYTESWAP
00120 #      endif
00121 #      ifdef __x86_64
00122 #         define R__B64
00123 #         define R__BYTESWAP
00124 #      endif
00125 #   else
00126 #      define R__SUN
00127 #      include <stdlib.h>
00128 #   endif
00129 #   define R__UNIX
00130 #   define NEED_STRING
00131 #   define NEED_SIGJMP
00132 #   if __SUNPRO_CC > 0x420
00133 #      define R__SOLARIS_CC50
00134 #      define R__ANSISTREAM      /* ANSI C++ Standard Library conformant */
00135 #      define R__SSTREAM         /* use sstream or strstream header */
00136 #      define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
00137 #   endif
00138 #   if __SUNPRO_CC >= 0x420
00139 #      define R__SUNCCBUG        /* to work around a compiler bug */
00140 #   endif
00141 #   if __GNUC__ >= 3 || __GNUC_MINOR__ >= 90   /* modern egcs/gcc */
00142 #      define R__SUNGCC3
00143 #   endif
00144 #endif
00145 
00146 #if defined(__FCC_VERSION)    /* Solaris with Fujitsu compiler */
00147 #   define R__SOLARIS
00148 #   define R__SEEK64
00149 #   define ANSICPP
00150 #   define R__UNIX
00151 #   define NEED_STRING
00152 #   define NEED_SIGJMP
00153 #   define R__ANSISTREAM      /* ANSI C++ Standard Library conformant */
00154 #endif
00155 
00156 #if defined(__sgi) && !defined(linux)
00157 #   define R__SGI
00158 #   define R__UNIX
00159 #   define ANSICPP
00160 #   define NEED_STRING
00161 #   define NEED_SIGJMP
00162 #   define R__SEEK64
00163 #   if !defined(__KCC)
00164 #      define R__THROWNEWDELETE  /* new/delete throw exceptions */
00165 #   endif
00166 #   define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
00167 #   ifdef IRIX64
00168 #      define R__SGI64
00169 #   endif
00170 #   if defined(__mips64) || defined(_ABI64)
00171 #      define R__B64
00172 #      undef R__SEEK64
00173 #   endif
00174 #   if !defined(__KCC)
00175 #      define R__ANSISTREAM      /* ANSI C++ Standard Library conformant */
00176 #   endif
00177 #endif
00178 
00179 #if defined(linux)
00180 #   ifndef _LARGEFILE64_SOURCE
00181 #      define _LARGEFILE64_SOURCE
00182 #   endif
00183 #   include <features.h>
00184 #   if __GNU_LIBRARY__ == 6
00185 #      ifndef R__GLIBC
00186 #         define R__GLIBC
00187 #      endif
00188 #   endif
00189 #   if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2
00190 #      define R__NONSCALARFPOS2
00191 #      define R__USESTHROW
00192 #      define R__SEEK64
00193 #   endif
00194 #endif
00195 
00196 #if defined(linux) && defined(__i386__)
00197 #   define R__LINUX
00198 #   define R__UNIX
00199 #   define R__BYTESWAP
00200 #   ifndef __i486__
00201 #      define __i486__       /* turn off if you really want to run on an i386 */
00202 #   endif
00203 #   define NEED_SIGJMP
00204 #endif
00205 
00206 #if defined(linux) && defined(__ia64__)
00207 #   define R__LINUX
00208 #   define R__UNIX
00209 #   define R__BYTESWAP
00210 #   define R__B64
00211 #   define NEED_SIGJMP
00212 #endif
00213 
00214 #if defined(linux) && defined(__x86_64__)
00215 #   define R__LINUX
00216 #   define R__UNIX
00217 #   define R__BYTESWAP
00218 #   define R__B64
00219 #   define NEED_SIGJMP
00220 #endif
00221 
00222 #if defined(linux) && defined(__alpha__)
00223 #   define R__LINUX
00224 #   define R__UNIX
00225 #   define R__BYTESWAP
00226 #   define R__B64
00227 #   define NEED_SIGJMP
00228 #endif
00229 
00230 #if defined(linux) && defined(__arm__)
00231 #   define R__LINUX
00232 #   define R__UNIX
00233 #   define R__BYTESWAP
00234 #   define NEED_SIGJMP
00235 #endif
00236 
00237 #if defined(linux) && defined(__sparc__)
00238 #   define R__LINUX
00239 #   define R__UNIX
00240 #   define NEED_SIGJMP
00241 /*#   define R__B64 */     /* enable when 64 bit machine */
00242 #endif
00243 
00244 #if defined(linux) && defined(__sgi)
00245 #   define R__LINUX
00246 #   define R__UNIX
00247 #   define NEED_SIGJMP
00248 #   if defined(__mips64) || defined(_ABI64)
00249 #      define R__B64      /* enable when 64 bit machine */
00250 #   endif
00251 #endif
00252 
00253 /*
00254     Note, that there are really 3 APIs:
00255 
00256     mips, mipsel:
00257       O32 ABI, ILP32, "long long" in a "aligned" even-odd register
00258       pair, 4 argument registers
00259 
00260     mipsn32, mipsn32el
00261       N32 ABI, ILP32, but with 64 bit wide registers, and "long long"
00262       in a single register, 8 argument registers
00263 
00264     mips64, mips64el
00265       N64 ABI, LP64, 8 argument registers
00266 
00267     where O32, N32, and N64 are the ABI names.  ILP32 means that
00268     (I)int, (L)long, (P)pointer are 32bit long. LP64 means that
00269     long and pointer are 64bit long.  "el" denotes if the ABI is
00270     little endian.
00271 
00272     N32 is different from 032, in the calling convention.  Arguments
00273     passed as 64bit (long long) reference, and there are 8 of those.
00274     O32 is the one closest to "normal" GNU/Linux on i386.
00275 
00276     It's a bit more complex. MIPS spans probably the largest
00277     performance range of any CPU family, from a 32bit 20 MHz
00278     Microcontroller (made by Microchip) up to a 64bit monster with
00279     over 5000 CPUs (made by SiCortex).  Obviously, only the 64bit
00280     CPUs can run 64bit code, but 32bit code runs on all of them.
00281 
00282     The use cases for the different ABIs are:
00283     - O32: Most compatible, runs everywhere
00284     - N32: Best performance on 64 bit if a large address space isn't
00285            needed.  It is faster than O32 due to improved calling
00286            conventions, and it is faster than N64 due to reduced
00287            pointer size.
00288     - N64: Huge address space.
00289 
00290     Currently (end 2007) Debian GNU/Linux only supports O32
00291 
00292     Thanks to Thiemo Seufer <ths@networkno.de> of Debian
00293 */
00294 #if defined(__linux) && defined(__mips__)
00295 #   define R__LINUX
00296 #   define R__UNIX
00297 #   define NEED_SIGJMP
00298 #   if _MIPS_SIM == _ABI64
00299 #      define R__B64      /* enable when 64 bit machine */
00300 #   endif
00301 #   if defined(__MIPSEL__) /* Little endian */
00302 #      define R__BYTESWAP
00303 #   endif
00304 #endif
00305 
00306 #if defined(linux) && defined(__hppa)
00307 #   define R__LINUX
00308 #   define R__UNIX
00309 #   define NEED_SIGJMP
00310 #endif
00311 
00312 #if defined(linux) && defined(__powerpc__)
00313 #   define R__LINUX
00314 #   define R__UNIX
00315 #   define NEED_SIGJMP
00316 #   if defined(R__ppc64)
00317 #      define R__B64
00318 #   endif
00319 #endif
00320 
00321 #if defined(__MACH__) && defined(__i386__) && !defined(__APPLE__)
00322 #   define R__HURD
00323 #   define f2cFortran   /* cfortran.h does not know HURD - sigh */
00324 #   define R__UNIX
00325 #   define R__BYTESWAP
00326 #   define R__GLIBC     /* GNU/Hurd always use GLIBC 2.x :-) */
00327 #   define NEED_SIGJMP
00328 #endif
00329 
00330 #if defined(__Lynx__) && defined(__powerpc__)
00331 #   define R__LYNXOS
00332 #   define R__UNIX
00333 #   define ANSICPP
00334 #   define NEED_SIGJMP
00335 #   define NEED_STRCASECMP
00336 #   define NEED_SNPRINTF
00337 #endif
00338 
00339 #if defined(__FreeBSD__)
00340 #   define R__FBSD
00341 #   define R__UNIX
00342 #   define R__BYTESWAP
00343 #   if defined(__i386__)
00344 #      ifndef __i486__
00345 #         define __i486__    /* turn off if you really want to run on an i386 */
00346 #      endif
00347 #   endif
00348 #   if defined(__amd64__)
00349 #      define R__B64
00350 #   endif
00351 #   define R__THROWNEWDELETE /* new/delete throw exceptions */
00352 #   define HAS_STRLCPY
00353 #endif
00354 
00355 #if defined(__OpenBSD__)
00356 #   define R__OBSD
00357 #   define R__UNIX
00358 #   define R__BYTESWAP
00359 #   if defined(__i386__)
00360 #      ifndef __i486__
00361 #         define __i486__    /* turn off if you really want to run on an i386 */
00362 #      endif
00363 #   endif
00364 #   if defined(__amd64__)
00365 #      define R__B64
00366 #   endif
00367 #   define R__THROWNEWDELETE /* new/delete throw exceptions */
00368 #   define HAS_STRLCPY
00369 #endif
00370 
00371 #if defined(__APPLE__)       /* MacOS X support, initially following FreeBSD */
00372 #   include <AvailabilityMacros.h>
00373 #   ifndef __CINT__
00374 #   include <TargetConditionals.h>
00375 #   endif
00376 #   define R__MACOSX
00377 #   define R__UNIX
00378 #   if defined(__xlC__) || defined(__xlc__)
00379 #      define ANSICPP
00380 #      define R__ANSISTREAM
00381 #      define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
00382 #   endif
00383 #   if defined(__ppc64__)
00384 #      define R__B64      /* enable when 64 bit machine */
00385 #   endif
00386 #   if defined(__i386__)
00387 #      define R__BYTESWAP
00388 #   endif
00389 #   if defined(__arm__)
00390 #      define R__BYTESWAP
00391 #   endif
00392 #   if defined(__x86_64__)
00393 #      define R__BYTESWAP
00394 #      define R__B64      /* enable when 64 bit machine */
00395 #   endif
00396 #   define HAS_STRLCPY
00397 #endif
00398 
00399 #ifdef _HIUX_SOURCE
00400 #   define R__HIUX
00401 #   define R__UNIX
00402 #   define NEED_SIGJMP
00403 #   define NEED_SNPRINTF
00404 #   define ANSICPP
00405 #endif
00406 
00407 #ifdef __GNUC__
00408 #   define R__GNU
00409 #   define ANSICPP
00410 #   if __GNUC__ >= 3 || __GNUC_MINOR__ >= 90    /* egcs 1.0.3 */
00411 #      define R__VECNEWDELETE    /* supports overloading of new[] and delete[] */
00412 #      define R__PLACEMENTDELETE /* supports overloading placement delete */
00413 #   endif
00414 #   if __GNUC__ >= 3 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 95)
00415 #         define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
00416 #   endif
00417 #   if __GNUC__ >= 3 || __GNUC_MINOR__ >= 91    /* egcs 1.1.x */
00418 #      define R__ANSISTREAM      /* ANSI C++ Standard Library conformant */
00419 #   endif
00420 #   if __GNUC__ >= 3 && __GNUC_MINOR__ >=0 && __GNUC_MINOR__ < 8
00421 #      define R__SSTREAM         /* use sstream or strstream header */
00422 #   endif
00423 #   if defined(__ia64__) &&  __GNUC__ < 3       /* gcc 2.9x (MINOR is 9!) */
00424 #      define R__VECNEWDELETE    /* supports overloading of new[] and delete[] */
00425 #      define R__PLACEMENTDELETE /* supports overloading placement delete */
00426 #      define R__ANSISTREAM      /* ANSI C++ Standard Library conformant */
00427 #   endif
00428 #   if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ > 1)
00429 #      define R__PRAGMA_DIAGNOSTIC
00430 #   endif
00431 #endif
00432 
00433 /* allows symbols to be hidden from the shared library export symbol table */
00434 /* use typically on file statics and private methods */
00435 #if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
00436 #    define R__HIDDEN __attribute__((__visibility__("hidden")))
00437 #else
00438 #    define R__HIDDEN
00439 #endif
00440 
00441 #ifdef __INTEL_COMPILER
00442 #   define R__INTEL_COMPILER
00443 #   define R__ANSISTREAM      /* ANSI C++ Standard Library conformant */
00444 #   define R__VECNEWDELETE    /* supports overloading of new[] and delete[] */
00445 #   define R__PLACEMENTDELETE /* supports overloading placement delete */
00446 #   define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
00447 #   define ANSICPP
00448 #endif
00449 
00450 #ifdef __HP_aCC
00451 #   define R__ACC
00452 #   define R__VECNEWDELETE    /* supports overloading of new[] and delete[] */
00453 #   define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
00454 #   define R__THROWNEWDELETE  /* new/delete throw exceptions */
00455 #   if __HP_aCC <= 015000
00456 #      define R__OLDHPACC
00457 #      define R__TEMPLATE_OVERLOAD_BUG
00458 #      define R__GLOBALSTL       /* STL in global name space */
00459 #   else
00460 #      define R__PLACEMENTDELETE /* supports overloading placement delete */
00461 #      define R__ANSISTREAM      /* ANSI C++ Standard Library conformant */
00462 #      define R__TMPLTSTREAM     /* iostream implemented with templates */
00463 #   endif
00464 #   ifndef _INCLUDE_LONGLONG
00465 #      define _INCLUDE_LONGLONG
00466 #   endif
00467 #endif
00468 
00469 #ifdef _WIN32
00470 #   define R__WIN32
00471 #   ifndef WIN32
00472 #      define WIN32
00473 #   endif
00474 #   define R__BYTESWAP
00475 #   define R__ACCESS_IN_SYMBOL
00476 #endif
00477 
00478 #ifdef __SC__
00479 #   define SC
00480 #   define R__SC
00481 #   if defined(WIN32)
00482 #      define NEED_STRING
00483 #      define NEED_STRCASECMP
00484 #      define NEED_SNPRINTF
00485 #      define ANSICPP
00486 #   else
00487 #      define MSDOS
00488 #      define NEED_STRCASECMP
00489 #      define R__BYTESWAP
00490 #   endif
00491 #endif
00492 
00493 #ifdef _MSC_VER
00494 #   define R__VISUAL_CPLUSPLUS
00495 #   define NEED_STRING
00496 #   define NEED_STRCASECMP
00497 #   define NEED_SNPRINTF
00498 #   define ANSICPP
00499 #   define R__VECNEWDELETE    /* supports overloading of new[] and delete[] */
00500 #   define R__PLACEMENTDELETE /* supports overloading placement delete */
00501 #   define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
00502 #   if _MSC_VER >= 1200
00503 #     define R__ANSISTREAM    /* ANSI C++ Standard Library conformant */
00504 #   endif
00505 #   if _MSC_VER >= 1310
00506 #     define R__SSTREAM       /* has <sstream> iso <strstream> */
00507 #   endif
00508 #   if _MSC_VER >= 1400
00509 #     define DONTNEED_VSNPRINTF
00510 #   endif
00511 #   if _MSC_VER < 1310
00512 #      define R__NO_CLASS_TEMPLATE_SPECIALIZATION
00513 #   endif
00514 #endif
00515 
00516 /*--- memory and object statistics -------------------------------------------*/
00517 
00518 /* #define R__NOSTATS */
00519 
00520 /*--- cpp --------------------------------------------------------------------*/
00521 
00522 #ifdef ANSICPP
00523     /* symbol concatenation operator */
00524 #   define _NAME1_(name) name
00525 #   define _NAME2_(name1,name2) name1##name2
00526 #   define _NAME3_(name1,name2,name3) name1##name2##name3
00527 
00528     /* stringizing */
00529 #   define _QUOTE_(name) #name
00530 
00531 #else
00532 
00533 #   define _NAME1_(name) name
00534 #   define _NAME2_(name1,name2) _NAME1_(name1)name2
00535 #   define _NAME3_(name1,name2,name3) _NAME2_(name1,name2)name3
00536 
00537 #   define _QUOTE_(name) "name"
00538 
00539 #endif
00540 
00541 /* produce an identifier that is almost unique inside a file */
00542 #ifndef __CINT__
00543 #   define _R__JOIN_(X,Y) _NAME2_(X,Y)
00544 #   define _R__JOIN3_(F,X,Y) _NAME3_(F,X,Y)
00545 #ifdef R__DICTIONARY_FILENAME
00546 #   define _R__UNIQUE_(X) _R__JOIN3_(R__DICTIONARY_FILENAME,X,__LINE__)
00547 #else
00548 #   define _R__UNIQUE_(X) _R__JOIN_(X,__LINE__)
00549 #endif
00550 #else
00551     /* Currently CINT does not really mind to have duplicates and     */
00552     /* does not work correctly as far as merging tokens is concerned. */
00553 #   define _R__UNIQUE_(X) X
00554 #endif
00555 
00556 /*---- misc ------------------------------------------------------------------*/
00557 
00558 #ifdef R__GNU
00559 #   define SafeDelete(p) { if (p) { delete p; p = 0; } }
00560 #else
00561 #   define SafeDelete(p) { delete p; p = 0; }
00562 #endif
00563 
00564 #endif

Generated on Tue Jul 5 14:10:19 2011 for ROOT_528-00b_version by  doxygen 1.5.1