AmpTools
URConfig.h
Go to the documentation of this file.
1 /* @(#)root/base:$Name: $:$Id: URConfig.h,v 1.1.1.1 2006/11/15 18:01:50 mashephe Exp $ */
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 UPROOT_RConfig
12 #define UPROOT_RConfig
13 
14 /*************************************************************************
15  * *
16  * RConfig *
17  * *
18  * Defines used by ROOT. *
19  * *
20  *************************************************************************/
21 
22 
23 
24 /*---- new C++ features ------------------------------------------------------*/
25 
26 #define R__USE_SHADOW_CLASS
27 
28 /*---- machines --------------------------------------------------------------*/
29 
30 #ifdef __hpux
31 # ifdef __ia64
32 # define R__HPUX11 /* find a better test for HP-UX 11 */
33 # endif
34 # define R__HPUX
35 # define R__UNIX
36 # define ANSICPP
37 # ifdef __LP64__
38 # define R__B64
39 # endif
40 # ifndef R__HPUX11
41 # define NEED_SNPRINTF
42 # endif
43 #endif
44 
45 #ifdef _AIX
46 # define R__AIX
47 # define R__UNIX
48 # define ANSICPP
49 # define NEED_STRCASECMP
50 #endif
51 
52 #ifdef __linux
53 # ifndef linux
54 # define linux
55 # endif
56 #endif
57 
58 #if defined(__CYGWIN__) && defined(__GNUC__)
59 # ifndef linux
60 # define linux
61 # endif
62 # ifndef R__WINGCC
63 # define R__WINGCC
64 # endif
65 #endif
66 
67 
68 #if defined(__alpha) && !defined(linux)
69 # include <standards.h>
70 # ifdef _XOPEN_SOURCE
71 # if _XOPEN_SOURCE+0 > 0
72 # define R__TRUE64
73 # endif
74 # endif
75 # define R__ALPHA
76 # define ANSICPP
77 # ifndef R__TRUE64
78 # define NEED_SNPRINTF
79 # endif
80 # ifndef __VMS
81 # define R__UNIX
82 # define R__B64
83 # define R__BYTESWAP
84 # if __DECCXX_VER >= 60060002
85 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
86 # define R__PLACEMENTDELETE /* supports overloading placement delete */
87 # define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
88 # define R__THROWNEWDELETE /* new/delete throw exceptions */
89 # endif
90 # if defined __GNUC__
91 # define R__NAMESPACE_TEMPLATE_IMP_BUG
92 # else
93 # define R__TEMPLATE_OVERLOAD_BUG
94 # endif
95 # else
96 # define R__VMS
97 # define cxxbug
98 # define NEED_STRCASECMP
99 # define R__NONSCALARFPOS
100 # endif
101 #endif
102 
103 #if defined(__sun) && !defined(linux)
104 # ifdef __SVR4
105 # define R__SOLARIS
106 # define ANSICPP
107 # ifdef __i386
108 # define R__I386
109 # define R__BYTESWAP
110 # endif
111 # else
112 # define R__SUN
113 # include <stdlib.h>
114 # endif
115 # define R__UNIX
116 # define NEED_STRING
117 # define NEED_SIGJMP
118 # if __SUNPRO_CC > 0x420
119 # define R__SOLARIS_CC50
120 # define R__ANSISTREAM /* ANSI C++ Standard Library conformant */
121 # endif
122 # if __SUNPRO_CC >= 0x420
123 # define R__SUNCCBUG /* to work around a compiler bug */
124 # endif
125 # if __GNUC__ >= 3 || __GNUC_MINOR__ >= 90 /* modern egcs/gcc */
126 # define R__SUNGCC3
127 # endif
128 #endif
129 
130 #if defined(__sgi) && !defined(linux)
131 # define R__SGI
132 # define R__UNIX
133 # define ANSICPP
134 # define NEED_STRING
135 # define NEED_SIGJMP
136 # ifdef IRIX64
137 # define R__SGI64
138 # endif
139 #endif
140 
141 #if defined(linux)
142 # include <features.h>
143 # if __GNU_LIBRARY__ == 6
144 # ifndef R__GLIBC
145 # define R__GLIBC
146 # endif
147 # endif
148 # if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2
149 # define R__NONSCALARFPOS2
150 # define R__USESTHROW
151 # endif
152 #endif
153 
154 #if defined(linux) && defined(__i386__)
155 # define R__LINUX
156 # define R__UNIX
157 # define R__BYTESWAP
158 # ifndef __i486__
159 # define __i486__ /* turn off if you really want to run on an i386 */
160 # endif
161 # define NEED_SIGJMP
162 #endif
163 
164 #if defined(linux) && defined(__ia64__)
165 # define R__LINUX
166 # define R__UNIX
167 # define R__BYTESWAP
168 # define R__B64
169 # define NEED_SIGJMP
170 #endif
171 
172 #if defined(linux) && defined(__x86_64__)
173 # define R__LINUX
174 # define R__UNIX
175 # define R__BYTESWAP
176 # define R__B64
177 # define NEED_SIGJMP
178 #endif
179 
180 #if defined(linux) && defined(__alpha__)
181 # define R__LINUX
182 # define R__UNIX
183 # define R__BYTESWAP
184 # define R__B64
185 # define NEED_SIGJMP
186 #endif
187 
188 #if defined(linux) && defined(__arm__)
189 # define R__LINUX
190 # define R__UNIX
191 # define R__BYTESWAP
192 # define NEED_SIGJMP
193 #endif
194 
195 #if defined(linux) && defined(__sparc__)
196 # define R__LINUX
197 # define R__UNIX
198 # define NEED_SIGJMP
199 /*# define R__B64 */ /* enable when 64 bit machine */
200 #endif
201 
202 #if defined(linux) && defined(__sgi)
203 # define R__LINUX
204 # define R__UNIX
205 # define NEED_SIGJMP
206 /*# define R__B64 */ /* enable when 64 bit machine */
207 #endif
208 
209 #if defined(linux) && defined(__powerpc__)
210 # define R__MKLINUX
211 # define R__LINUX
212 # define R__UNIX
213 # define NEED_SIGJMP
214 # if __GNUC__ >= 3 || __GNUC_MINOR__ >= 90 /* modern egcs/gcc */
215 # define R__PPCEGCS
216 # endif
217 #endif
218 
219 #if defined(__MACH__) && defined(__i386__)
220 # define R__HURD
221 # define f2cFortran /* cfortran.h does not know HURD - sigh */
222 # define R__UNIX
223 # define R__BYTESWAP
224 # define R__GLIBC /* GNU/Hurd always use GLIBC 2.x :-) */
225 # define NEED_SIGJMP
226 #endif
227 
228 #if defined(__Lynx__) && defined(__powerpc__)
229 # define R__LYNXOS
230 # define R__UNIX
231 # define ANSICPP
232 # define NEED_SIGJMP
233 # define NEED_STRCASECMP
234 # define NEED_SNPRINTF
235 #endif
236 
237 #if defined(__FreeBSD__)
238 # define R__FBSD
239 # define R__UNIX
240 # define R__BYTESWAP
241 # define R__NOSTATS /* problem using stats with FreeBSD malloc/free */
242 #endif
243 
244 #if defined(__APPLE__) /* MacOS X support, initially following FreeBSD */
245 # define R__MACOSX
246 # define R__UNIX
247 #endif
248 
249 #ifdef _HIUX_SOURCE
250 # define R__HIUX
251 # define R__UNIX
252 # define NEED_SIGJMP
253 # define NEED_SNPRINTF
254 # define ANSICPP
255 #endif
256 
257 #ifdef __GNUC__
258 # define R__GNU
259 # define ANSICPP
260 # if __GNUC__ >= 3 || __GNUC_MINOR__ >= 90 /* egcs 1.0.3 */
261 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
262 # define R__PLACEMENTDELETE /* supports overloading placement delete */
263 # endif
264 # if __GNUC__ >= 3 || __GNUC_MINOR__ >= 91 /* egcs 1.1.x */
265 # define R__ANSISTREAM /* ANSI C++ Standard Library conformant */
266 # endif
267 # if __GNUC__ >= 3 && __GNUC_MINOR__ >=0 && __GNUC_MINOR__ < 8
268 # define R__SSTREAM /* use sstream or strstream header */
269 # endif
270 # if defined(__ia64__) && __GNUC__ < 3 /* gcc 2.9x (MINOR is 9!) */
271 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
272 # define R__PLACEMENTDELETE /* supports overloading placement delete */
273 # define R__ANSISTREAM /* ANSI C++ Standard Library conformant */
274 # endif
275 #endif
276 
277 #ifdef __KCC
278 # define R__KCC
279 # define R__ANSISTREAM /* ANSI C++ Standard Library conformant */
280 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
281 # define R__PLACEMENTDELETE /* supports overloading placement delete */
282 # define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
283 # define ANSICPP
284 #endif
285 
286 #ifdef __INTEL_COMPILER
287 # define R__INTEL_COMPILER
288 # define R__ANSISTREAM /* ANSI C++ Standard Library conformant */
289 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
290 # define R__PLACEMENTDELETE /* supports overloading placement delete */
291 # define ANSICPP
292 #endif
293 
294 #ifdef __HP_aCC
295 # define R__ACC
296 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
297 # if __HP_aCC >= 53000
298 # define R__PLACEMENTDELETE /* supports overloading placement delete */
299 # define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
300 # define R__THROWNEWDELETE /* new/delete throw exceptions */
301 # define R__ANSISTREAM /* ANSI C++ Standard Library conformant */
302 # define R__TMPLTSTREAM /* iostream implemented with templates */
303 # else
304 # define R__TEMPLATE_OVERLOAD_BUG
305 # define R__GLOBALSTL /* STL in global name space */
306 # endif
307 # ifndef _INCLUDE_LONGLONG
308 # define _INCLUDE_LONGLONG
309 # endif
310 #endif
311 
312 #ifdef _WIN32
313 # define R__WIN32
314 # ifndef WIN32
315 # define WIN32
316 # endif
317 # define R__BYTESWAP
318 # define R__ACCESS_IN_SYMBOL
319 #endif
320 
321 
322 #ifdef BORLAND
323 # define MSDOS /* Windows will always stay MSDOS */
324 # define ANSICPP
325 # define R__INT16
326 # define R__BYTESWAP
327 #endif
328 
329 #ifdef __SC__
330 # define SC
331 # define R__SC
332 # if defined(macintosh)
333 # define R__MAC
334 # define NEED_STRING
335 # define ANSICPP
336 # elif WIN32
337 # define NEED_STRING
338 # define NEED_STRCASECMP
339 # define NEED_SNPRINTF
340 # define ANSICPP
341 # else
342 # define MSDOS
343 # define NEED_STRCASECMP
344 # define R__BYTESWAP
345 # endif
346 #endif
347 
348 #ifdef _MSC_VER
349 # define R__VISUAL_CPLUSPLUS
350 # define NEED_STRING
351 # define NEED_STRCASECMP
352 # define NEED_SNPRINTF
353 # define ANSICPP
354 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
355 # define R__PLACEMENTDELETE /* supports overloading placement delete */
356 # if _MSC_VER >= 1200
357 # define R__ANSISTREAM /* ANSI C++ Standard Library conformant */
358 # endif
359 #endif
360 
361 #ifdef __MWERKS__
362 # define R__MWERKS
363 # define R__MAC
364 # define ANSICPP
365 # define NEED_STRING
366 # define NEED_STRCASECMP
367 # define NEED_SNPRINTF
368 #endif
369 
370 
371 /*--- memory and object statistics -------------------------------------------*/
372 
373 /* #define R__NOSTATS */
374 
375 
376 /*--- cpp --------------------------------------------------------------------*/
377 
378 #ifdef ANSICPP
379  /* symbol concatenation operator */
380 # define _NAME1_(name) name
381 # define _NAME2_(name1,name2) name1##name2
382 # define _NAME3_(name1,name2,name3) name1##name2##name3
383 
384  /* stringizing */
385 # define _QUOTE_(name) #name
386 
387 #else
388 
389 # define _NAME1_(name) name
390 # define _NAME2_(name1,name2) _NAME1_(name1)name2
391 # define _NAME3_(name1,name2,name3) _NAME2_(name1,name2)name3
392 
393 # define _QUOTE_(name) "name"
394 
395 #endif
396 
397 /* produce an identifier that is almost unique inside a file */
398 #ifndef __CINT__
399 # define _R__JOIN_(X,Y) _NAME2_(X,Y)
400 # define _R__UNIQUE_(X) _R__JOIN_(X,__LINE__)
401 #else
402  /* Currently CINT does not really mind to have duplicates and */
403  /* does not work correctly as far as merging tokens is concerned. */
404 # define _R__UNIQUE_(X) X
405 #endif
406 
407 /*---- misc ------------------------------------------------------------------*/
408 
409 #ifdef R__GNU
410 # define SafeDelete(p) { if (p) { delete p; p = 0; } }
411 #else
412 # define SafeDelete(p) { delete p; p = 0; }
413 #endif
414 
415 #ifdef R__WIN32
416 #define R__LL(longlong) longlong
417 #else
418 #define R__LL(longlong) _NAME2_(longlong,LL)
419 #endif
420 
421 #endif