ROOT  6.06/09
Reference Guide
RConfig.h
Go to the documentation of this file.
1 /* @(#)root/base:$Id$ */
2 
3 /*************************************************************************
4  * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
5  * All rights reserved. *
6  * *
7  * For the licensing terms see $ROOTSYS/LICENSE. *
8  * For the list of contributors see $ROOTSYS/README/CREDITS. *
9  *************************************************************************/
10 
11 #ifndef ROOT_RConfig
12 #define ROOT_RConfig
13 
14 /*************************************************************************
15  * *
16  * RConfig *
17  * *
18  * Defines used by ROOT. *
19  * *
20  *************************************************************************/
21 
22 #ifndef ROOT_RVersion
23 #include "RVersion.h"
24 #endif
25 
26 
27 /*---- new C++ features ------------------------------------------------------*/
28 
29 #define R__USE_SHADOW_CLASS
30 
31 /* Now required, thus defined by default for backward compatibility */
32 #define R__ANSISTREAM /* ANSI C++ Standard Library conformant */
33 #define R__SSTREAM /* use sstream or strstream header */
34 
35 /* Do not #define nullptr if the code is compiled in c++11 mode. */
36 #if __cplusplus > 199711L
37 #define R__NULLPTR
38 #endif
39 
40 /*---- machines --------------------------------------------------------------*/
41 
42 #ifdef __hpux
43  /* R__HPUX10 or R__HPUX11 is determined in the Makefile */
44 # define R__HPUX
45 # define R__UNIX
46 # define ANSICPP
47 # ifdef __LP64__
48 # define R__B64
49 # endif
50 # ifdef R__HPUX10
51 # define NEED_SNPRINTF
52 # endif
53 #endif
54 
55 #ifdef _AIX
56 # define R__AIX
57 # define R__UNIX
58 # define ANSICPP
59 # define R__SEEK64
60 # define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
61 # define NEED_STRCASECMP
62 #endif
63 
64 #if defined(__linux) || defined(__linux__)
65 # ifndef linux
66 # define linux
67 # endif
68 #endif
69 
70 #if defined(__CYGWIN__) && defined(__GNUC__)
71 # ifndef linux
72 # define linux
73 # endif
74 # ifndef R__WINGCC
75 # define R__WINGCC
76 # endif
77 #endif
78 
79 #if defined(__sun) && !(defined(linux) || defined(__FCC_VERSION))
80 # ifdef __SVR4
81 # define R__SOLARIS
82 # define R__SEEK64
83 # define ANSICPP
84 # ifdef __i386
85 # define R__BYTESWAP
86 # endif
87 # ifdef __x86_64
88 # define R__B64
89 # define R__BYTESWAP
90 # endif
91 # else
92 # define R__SUN
93 # include <stdlib.h>
94 # endif
95 # define R__UNIX
96 # define NEED_STRING
97 # define NEED_SIGJMP
98 # if __SUNPRO_CC > 0x420
99 # define R__SOLARIS_CC50
100 # define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
101 # endif
102 # if __SUNPRO_CC >= 0x420
103 # define R__SUNCCBUG /* to work around a compiler bug */
104 # endif
105 # if __SUNPRO_CC >= 0x5110
106 # define R__THROWNEWDELETE
107 # endif
108 # if __GNUC__ >= 3 || __GNUC_MINOR__ >= 90 /* modern egcs/gcc */
109 # define R__SUNGCC3
110 # endif
111 #endif
112 
113 #if defined(__FCC_VERSION) /* Solaris with Fujitsu compiler */
114 # define R__SOLARIS
115 # define R__SEEK64
116 # define ANSICPP
117 # define R__UNIX
118 # define NEED_STRING
119 # define NEED_SIGJMP
120 #endif
121 
122 #if defined(linux)
123 # ifndef _LARGEFILE64_SOURCE
124 # define _LARGEFILE64_SOURCE
125 # endif
126 # include <features.h>
127 # if __GNU_LIBRARY__ == 6
128 # ifndef R__GLIBC
129 # define R__GLIBC
130 # endif
131 # endif
132 # if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2
133 # define R__NONSCALARFPOS2
134 # define R__USESTHROW
135 # define R__SEEK64
136 # endif
137 #endif
138 
139 #if defined(linux) && defined(__i386__)
140 # define R__LINUX
141 # define R__UNIX
142 # define R__BYTESWAP
143 # ifndef __i486__
144 # define __i486__ /* turn off if you really want to run on an i386 */
145 # endif
146 # define NEED_SIGJMP
147 #endif
148 
149 #if defined(linux) && defined(__ia64__)
150 # define R__LINUX
151 # define R__UNIX
152 # define R__BYTESWAP
153 # define R__B64
154 # define NEED_SIGJMP
155 #endif
156 
157 #if defined(linux) && defined(__x86_64__)
158 # define R__LINUX
159 # define R__UNIX
160 # define R__BYTESWAP
161 # define R__B64
162 # define NEED_SIGJMP
163 #endif
164 
165 #if defined(linux) && defined(__arm__)
166 # define R__LINUX
167 # define R__UNIX
168 # define R__BYTESWAP
169 # define NEED_SIGJMP
170 #endif
171 
172 #if defined(linux) && defined(__sparc__)
173 # define R__LINUX
174 # define R__UNIX
175 # define NEED_SIGJMP
176 /*# define R__B64 */ /* enable when 64 bit machine */
177 #endif
178 
179 #if defined(linux) && defined(__hppa)
180 # define R__LINUX
181 # define R__UNIX
182 # define NEED_SIGJMP
183 #endif
184 
185 #if defined(linux) && defined(__powerpc__)
186 # define R__LINUX
187 # define R__UNIX
188 # define NEED_SIGJMP
189 # if defined(R__ppc64)
190 # define R__B64
191 # endif
192 # if defined(_LITTLE_ENDIAN)
193 # define R__BYTESWAP
194 # endif
195 #endif
196 
197 #if defined(linux) && defined(__aarch64__)
198 # define R__LINUX
199 # define R__UNIX
200 # define R__BYTESWAP
201 # define R__B64
202 # define NEED_SIGJMP
203 #endif
204 
205 #if defined(__MACH__) && defined(__i386__) && !defined(__APPLE__)
206 # define R__HURD
207 # define f2cFortran /* cfortran.h does not know HURD - sigh */
208 # define R__UNIX
209 # define R__BYTESWAP
210 # define R__GLIBC /* GNU/Hurd always use GLIBC 2.x :-) */
211 # define NEED_SIGJMP
212 #endif
213 
214 #if defined(__Lynx__) && defined(__powerpc__)
215 # define R__LYNXOS
216 # define R__UNIX
217 # define ANSICPP
218 # define NEED_SIGJMP
219 # define NEED_STRCASECMP
220 # define NEED_SNPRINTF
221 #endif
222 
223 #if defined(__FreeBSD__)
224 # define R__FBSD
225 # define R__UNIX
226 # define R__BYTESWAP
227 # if defined(__i386__)
228 # ifndef __i486__
229 # define __i486__ /* turn off if you really want to run on an i386 */
230 # endif
231 # endif
232 # if defined(__amd64__)
233 # define R__B64
234 # endif
235 # define R__THROWNEWDELETE /* new/delete throw exceptions */
236 # define HAS_STRLCPY
237 #endif
238 
239 #if defined(__OpenBSD__)
240 # define R__OBSD
241 # define R__UNIX
242 # define R__BYTESWAP
243 # if defined(__i386__)
244 # ifndef __i486__
245 # define __i486__ /* turn off if you really want to run on an i386 */
246 # endif
247 # endif
248 # if defined(__amd64__)
249 # define R__B64
250 # endif
251 # define R__THROWNEWDELETE /* new/delete throw exceptions */
252 # define HAS_STRLCPY
253 #endif
254 
255 #if defined(__APPLE__) /* MacOS X support, initially following FreeBSD */
256 # include <AvailabilityMacros.h>
257 # ifndef __CINT__
258 # include <TargetConditionals.h>
259 # endif
260 # define R__MACOSX
261 # define R__UNIX
262 # if defined(__xlC__) || defined(__xlc__)
263 # define ANSICPP
264 # define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
265 # endif
266 # if defined(__ppc64__)
267 # define R__B64 /* enable when 64 bit machine */
268 # endif
269 # if defined(__i386__)
270 # define R__BYTESWAP
271 # endif
272 # if defined(__arm__)
273 # define R__BYTESWAP
274 # endif
275 # if defined(__x86_64__)
276 # define R__BYTESWAP
277 # define R__B64 /* enable when 64 bit machine */
278 # endif
279 # define HAS_STRLCPY
280 #endif
281 
282 #ifdef _HIUX_SOURCE
283 # define R__HIUX
284 # define R__UNIX
285 # define NEED_SIGJMP
286 # define NEED_SNPRINTF
287 # define ANSICPP
288 #endif
289 
290 #ifdef __GNUC__
291 # define R__GNU
292 # define ANSICPP
293 # if __GNUC__ >= 3 || __GNUC_MINOR__ >= 90 /* egcs 1.0.3 */
294 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
295 # define R__PLACEMENTDELETE /* supports overloading placement delete */
296 # endif
297 # if __GNUC__ >= 3 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 95)
298 # define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
299 # endif
300 # if defined(__ia64__) && __GNUC__ < 3 /* gcc 2.9x (MINOR is 9!) */
301 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
302 # define R__PLACEMENTDELETE /* supports overloading placement delete */
303 # endif
304 # if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ > 1)
305 # define R__PRAGMA_DIAGNOSTIC
306 # endif
307 #endif
308 
309 /* allows symbols to be hidden from the shared library export symbol table */
310 /* use typically on file statics and private methods */
311 #if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
312 # define R__HIDDEN __attribute__((__visibility__("hidden")))
313 #else
314 # define R__HIDDEN
315 #endif
316 
317 #ifdef __INTEL_COMPILER
318 # define R__INTEL_COMPILER
319 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
320 # define R__PLACEMENTDELETE /* supports overloading placement delete */
321 # define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
322 # define ANSICPP
323 #endif
324 
325 #ifdef __HP_aCC
326 # define R__ACC
327 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
328 # define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
329 # define R__THROWNEWDELETE /* new/delete throw exceptions */
330 # if __HP_aCC <= 015000
331 # define R__OLDHPACC
332 # define R__TEMPLATE_OVERLOAD_BUG
333 # define R__GLOBALSTL /* STL in global name space */
334 # else
335 # define R__PLACEMENTDELETE /* supports overloading placement delete */
336 # define R__TMPLTSTREAM /* std::iostream implemented with templates */
337 # endif
338 # ifndef _INCLUDE_LONGLONG
339 # define _INCLUDE_LONGLONG
340 # endif
341 #endif
342 
343 #ifdef _WIN32
344 # define R__WIN32
345 # ifndef WIN32
346 # define WIN32
347 # endif
348 # define R__BYTESWAP
349 # define R__ACCESS_IN_SYMBOL
350 # define thread_local static __declspec(thread)
351 #endif
352 
353 #ifdef __SC__
354 # define SC
355 # define R__SC
356 # if defined(WIN32)
357 # define NEED_STRING
358 # define NEED_STRCASECMP
359 # define NEED_SNPRINTF
360 # define ANSICPP
361 # else
362 # define MSDOS
363 # define NEED_STRCASECMP
364 # define R__BYTESWAP
365 # endif
366 #endif
367 
368 #ifdef _MSC_VER
369 # define R__VISUAL_CPLUSPLUS
370 # define NEED_STRING
371 # define NEED_STRCASECMP
372 # if _MSC_VER < 1900
373 # define NEED_SNPRINTF
374 # endif
375 # define ANSICPP
376 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
377 # define R__PLACEMENTDELETE /* supports overloading placement delete */
378 # define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
379 # define R__NULLPTR
380 # if _MSC_VER >= 1400
381 # define DONTNEED_VSNPRINTF
382 # endif
383 # if _MSC_VER < 1310
384 # define R__NO_CLASS_TEMPLATE_SPECIALIZATION
385 # endif
386 # if _MSC_VER <= 1800
387 # define R__NO_ATOMIC_FUNCTION_POINTER
388 # endif
389 #endif
390 
391 /*--- memory and object statistics -------------------------------------------*/
392 
393 /* #define R__NOSTATS */
394 
395 /*--- cpp --------------------------------------------------------------------*/
396 
397 #ifdef ANSICPP
398  /* symbol concatenation operator */
399 # define _NAME1_(name) name
400 # define _NAME2_(name1,name2) name1##name2
401 # define _NAME3_(name1,name2,name3) name1##name2##name3
402 
403  /* stringizing */
404 # define _QUOTE_(name) #name
405 
406 #else
407 
408 # define _NAME1_(name) name
409 # define _NAME2_(name1,name2) _NAME1_(name1)name2
410 # define _NAME3_(name1,name2,name3) _NAME2_(name1,name2)name3
411 
412 # define _QUOTE_(name) "name"
413 
414 #endif
415 
416 /* produce an identifier that is almost unique inside a file */
417 #ifndef __CINT__
418 # define _R__JOIN_(X,Y) _NAME2_(X,Y)
419 # define _R__JOIN3_(F,X,Y) _NAME3_(F,X,Y)
420 #ifdef R__DICTIONARY_FILENAME
421 # define _R__UNIQUE_(X) _R__JOIN3_(R__DICTIONARY_FILENAME,X,__LINE__)
422 #else
423 # define _R__UNIQUE_(X) _R__JOIN_(X,__LINE__)
424 #endif
425 #else
426  /* Currently CINT does not really mind to have duplicates and */
427  /* does not work correctly as far as merging tokens is concerned. */
428 # define _R__UNIQUE_(X) X
429 #endif
430 
431 /*---- misc ------------------------------------------------------------------*/
432 
433 #ifdef R__GNU
434 # define SafeDelete(p) { if (p) { delete p; p = 0; } }
435 #else
436 # define SafeDelete(p) { delete p; p = 0; }
437 #endif
438 
439 #ifdef __FAST_MATH__
440 #define R__FAST_MATH
441 #endif
442 
443 #endif