ROOT
6.06/08
Reference Guide
core
base
inc
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(linux) && defined(__s390__)
206
# define R__LINUX
207
# define R__UNIX
208
# define NEED_SIGJMP
209
#endif
210
211
#if defined(linux) && defined(__s390x__)
212
# define R__LINUX
213
# define R__UNIX
214
# define R__B64
215
# define NEED_SIGJMP
216
#endif
217
218
#if defined(__MACH__) && defined(__i386__) && !defined(__APPLE__)
219
# define R__HURD
220
# define f2cFortran
/* cfortran.h does not know HURD - sigh */
221
# define R__UNIX
222
# define R__BYTESWAP
223
# define R__GLIBC
/* GNU/Hurd always use GLIBC 2.x :-) */
224
# define NEED_SIGJMP
225
#endif
226
227
#if defined(__Lynx__) && defined(__powerpc__)
228
# define R__LYNXOS
229
# define R__UNIX
230
# define ANSICPP
231
# define NEED_SIGJMP
232
# define NEED_STRCASECMP
233
# define NEED_SNPRINTF
234
#endif
235
236
#if defined(__FreeBSD__)
237
# define R__FBSD
238
# define R__UNIX
239
# define R__BYTESWAP
240
# if defined(__i386__)
241
# ifndef __i486__
242
# define __i486__
/* turn off if you really want to run on an i386 */
243
# endif
244
# endif
245
# if defined(__amd64__)
246
# define R__B64
247
# endif
248
# define R__THROWNEWDELETE
/* new/delete throw exceptions */
249
# define HAS_STRLCPY
250
#endif
251
252
#if defined(__OpenBSD__)
253
# define R__OBSD
254
# define R__UNIX
255
# define R__BYTESWAP
256
# if defined(__i386__)
257
# ifndef __i486__
258
# define __i486__
/* turn off if you really want to run on an i386 */
259
# endif
260
# endif
261
# if defined(__amd64__)
262
# define R__B64
263
# endif
264
# define R__THROWNEWDELETE
/* new/delete throw exceptions */
265
# define HAS_STRLCPY
266
#endif
267
268
#if defined(__APPLE__)
/* MacOS X support, initially following FreeBSD */
269
# include <AvailabilityMacros.h>
270
# ifndef __CINT__
271
# include <TargetConditionals.h>
272
# endif
273
# define R__MACOSX
274
# define R__UNIX
275
# if defined(__xlC__) || defined(__xlc__)
276
# define ANSICPP
277
# define R__PLACEMENTINLINE
/* placement new/delete is inline in <new> */
278
# endif
279
# if defined(__ppc64__)
280
# define R__B64
/* enable when 64 bit machine */
281
# endif
282
# if defined(__i386__)
283
# define R__BYTESWAP
284
# endif
285
# if defined(__arm__)
286
# define R__BYTESWAP
287
# endif
288
# if defined(__x86_64__)
289
# define R__BYTESWAP
290
# define R__B64
/* enable when 64 bit machine */
291
# endif
292
# define HAS_STRLCPY
293
#endif
294
295
#ifdef _HIUX_SOURCE
296
# define R__HIUX
297
# define R__UNIX
298
# define NEED_SIGJMP
299
# define NEED_SNPRINTF
300
# define ANSICPP
301
#endif
302
303
#ifdef __GNUC__
304
# define R__GNU
305
# define ANSICPP
306
# if __GNUC__ >= 3 || __GNUC_MINOR__ >= 90
/* egcs 1.0.3 */
307
# define R__VECNEWDELETE
/* supports overloading of new[] and delete[] */
308
# define R__PLACEMENTDELETE
/* supports overloading placement delete */
309
# endif
310
# if __GNUC__ >= 3 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 95)
311
# define R__PLACEMENTINLINE
/* placement new/delete is inline in <new> */
312
# endif
313
# if defined(__ia64__) && __GNUC__ < 3
/* gcc 2.9x (MINOR is 9!) */
314
# define R__VECNEWDELETE
/* supports overloading of new[] and delete[] */
315
# define R__PLACEMENTDELETE
/* supports overloading placement delete */
316
# endif
317
# if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ > 1)
318
# define R__PRAGMA_DIAGNOSTIC
319
# endif
320
#endif
321
322
/* allows symbols to be hidden from the shared library export symbol table */
323
/* use typically on file statics and private methods */
324
#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
325
# define R__HIDDEN __attribute__((__visibility__("hidden")))
326
#else
327
# define R__HIDDEN
328
#endif
329
330
#ifdef __INTEL_COMPILER
331
# define R__INTEL_COMPILER
332
# define R__VECNEWDELETE
/* supports overloading of new[] and delete[] */
333
# define R__PLACEMENTDELETE
/* supports overloading placement delete */
334
# define R__PLACEMENTINLINE
/* placement new/delete is inline in <new> */
335
# define ANSICPP
336
#endif
337
338
#ifdef __HP_aCC
339
# define R__ACC
340
# define R__VECNEWDELETE
/* supports overloading of new[] and delete[] */
341
# define R__PLACEMENTINLINE
/* placement new/delete is inline in <new> */
342
# define R__THROWNEWDELETE
/* new/delete throw exceptions */
343
# if __HP_aCC <= 015000
344
# define R__OLDHPACC
345
# define R__TEMPLATE_OVERLOAD_BUG
346
# define R__GLOBALSTL
/* STL in global name space */
347
# else
348
# define R__PLACEMENTDELETE
/* supports overloading placement delete */
349
# define R__TMPLTSTREAM
/* std::iostream implemented with templates */
350
# endif
351
# ifndef _INCLUDE_LONGLONG
352
# define _INCLUDE_LONGLONG
353
# endif
354
#endif
355
356
#ifdef _WIN32
357
# define R__WIN32
358
# ifndef WIN32
359
# define WIN32
360
# endif
361
# define R__BYTESWAP
362
# define R__ACCESS_IN_SYMBOL
363
# define thread_local static __declspec(thread)
364
#endif
365
366
#ifdef __SC__
367
# define SC
368
# define R__SC
369
# if defined(WIN32)
370
# define NEED_STRING
371
# define NEED_STRCASECMP
372
# define NEED_SNPRINTF
373
# define ANSICPP
374
# else
375
# define MSDOS
376
# define NEED_STRCASECMP
377
# define R__BYTESWAP
378
# endif
379
#endif
380
381
#ifdef _MSC_VER
382
# define R__VISUAL_CPLUSPLUS
383
# define NEED_STRING
384
# define NEED_STRCASECMP
385
# if _MSC_VER < 1900
386
# define NEED_SNPRINTF
387
# endif
388
# define ANSICPP
389
# define R__VECNEWDELETE
/* supports overloading of new[] and delete[] */
390
# define R__PLACEMENTDELETE
/* supports overloading placement delete */
391
# define R__PLACEMENTINLINE
/* placement new/delete is inline in <new> */
392
# define R__NULLPTR
393
# if _MSC_VER >= 1400
394
# define DONTNEED_VSNPRINTF
395
# endif
396
# if _MSC_VER < 1310
397
# define R__NO_CLASS_TEMPLATE_SPECIALIZATION
398
# endif
399
# if _MSC_VER <= 1800
400
# define R__NO_ATOMIC_FUNCTION_POINTER
401
# endif
402
#endif
403
404
/*--- memory and object statistics -------------------------------------------*/
405
406
/* #define R__NOSTATS */
407
408
/*--- cpp --------------------------------------------------------------------*/
409
410
#ifdef ANSICPP
411
/* symbol concatenation operator */
412
# define _NAME1_(name) name
413
# define _NAME2_(name1,name2) name1##name2
414
# define _NAME3_(name1,name2,name3) name1##name2##name3
415
416
/* stringizing */
417
# define _QUOTE_(name) #name
418
419
#else
420
421
# define _NAME1_(name) name
422
# define _NAME2_(name1,name2) _NAME1_(name1)name2
423
# define _NAME3_(name1,name2,name3) _NAME2_(name1,name2)name3
424
425
# define _QUOTE_(name) "name"
426
427
#endif
428
429
/* produce an identifier that is almost unique inside a file */
430
#ifndef __CINT__
431
# define _R__JOIN_(X,Y) _NAME2_(X,Y)
432
# define _R__JOIN3_(F,X,Y) _NAME3_(F,X,Y)
433
#ifdef R__DICTIONARY_FILENAME
434
# define _R__UNIQUE_(X) _R__JOIN3_(R__DICTIONARY_FILENAME,X,__LINE__)
435
#else
436
# define _R__UNIQUE_(X) _R__JOIN_(X,__LINE__)
437
#endif
438
#else
439
/* Currently CINT does not really mind to have duplicates and */
440
/* does not work correctly as far as merging tokens is concerned. */
441
# define _R__UNIQUE_(X) X
442
#endif
443
444
/*---- misc ------------------------------------------------------------------*/
445
446
#ifdef R__GNU
447
# define SafeDelete(p) { if (p) { delete p; p = 0; } }
448
#else
449
# define SafeDelete(p) { delete p; p = 0; }
450
#endif
451
452
#ifdef __FAST_MATH__
453
#define R__FAST_MATH
454
#endif
455
456
#endif
RVersion.h