CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RConfig.h
Go to the documentation of this file.
1 /* @(#)root/base:$Name: $:$Id: RConfig.h,v 1.26 2001/12/07 11:09:45 rdm Exp $ */
2 
3 /*************************************************************************
4  * Copyright (C) 1995-2000, 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 /*---- machines --------------------------------------------------------------*/
28 
29 #ifdef __hpux
30 # define R__HPUX
31 # define R__UNIX
32 # define ANSICPP
33 # define NEED_SNPRINTF
34 #endif
35 
36 #ifdef _AIX
37 # define R__AIX
38 # define R__UNIX
39 # define ANSICPP
40 # define NEED_STRCASECMP
41 #endif
42 
43 #ifdef __linux
44 # ifndef linux
45 # define linux
46 # endif
47 #endif
48 
49 #if defined(__alpha) && !defined(linux)
50 # include <standards.h>
51 # ifdef _XOPEN_SOURCE
52 # if _XOPEN_SOURCE+0 > 0
53 # define R__TRUE64
54 # endif
55 # endif
56 # define R__ALPHA
57 # define ANSICPP
58 # ifndef R__TRUE64
59 # define NEED_SNPRINTF
60 # endif
61 # ifndef __VMS
62 # define R__UNIX
63 # define R__B64
64 # define R__BYTESWAP
65 # if __DECCXX_VER >= 60060002
66 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
67 # define R__PLACEMENTDELETE /* supports overloading placement delete */
68 # endif
69 # else
70 # define R__VMS
71 # define cxxbug
72 # define NEED_STRCASECMP
73 # define R__NONSCALARFPOS
74 # endif
75 #endif
76 
77 #if defined(__sun) && !defined(linux)
78 # ifdef __SVR4
79 # define R__SOLARIS
80 # define ANSICPP
81 # ifdef __i386
82 # define R__I386
83 # define R__BYTESWAP
84 # endif
85 # else
86 # define R__SUN
87 # include <stdlib.h>
88 # endif
89 # define R__UNIX
90 # define NEED_STRING
91 # define NEED_SIGJMP
92 # if __SUNPRO_CC > 0x420
93 # define R__SOLARIS_CC50
94 # define R__ANSISTREAM /* ANSI C++ Standard Library conformant */
95 # endif
96 # if __SUNPRO_CC >= 0x420
97 # define R__SUNCCBUG /* to work around a compiler bug */
98 # endif
99 #endif
100 
101 #if defined(__sgi) && !defined(linux)
102 # define R__SGI
103 # define R__UNIX
104 # define ANSICPP
105 # define NEED_STRING
106 # define NEED_SIGJMP
107 # ifdef IRIX64
108 # define R__SGI64
109 # endif
110 #endif
111 
112 #if defined(linux)
113 # include <features.h>
114 # if __GNU_LIBRARY__ == 6
115 # ifndef R__GLIBC
116 # define R__GLIBC
117 # endif
118 # endif
119 # if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2
120 # define R__NONSCALARFPOS2
121 # define R__USESTHROW
122 # endif
123 #endif
124 
125 #if defined(linux) && defined(__i386__)
126 # define R__LINUX
127 # define R__UNIX
128 # define R__BYTESWAP
129 # ifndef __i486__
130 # define __i486__ /* turn off if you really want to run on an i386 */
131 # endif
132 # define NEED_SIGJMP
133 #endif
134 
135 #if defined(linux) && defined(__ia64__)
136 # define R__LINUX
137 # define R__UNIX
138 # define R__BYTESWAP
139 # define R__B64
140 # define NEED_SIGJMP
141 #endif
142 
143 #if defined(linux) && defined(__alpha__)
144 # define R__LINUX
145 # define R__UNIX
146 # define R__BYTESWAP
147 # define R__B64
148 # define NEED_SIGJMP
149 #endif
150 
151 #if defined(linux) && defined(__arm__)
152 # define R__LINUX
153 # define R__UNIX
154 # define R__BYTESWAP
155 # define NEED_SIGJMP
156 #endif
157 
158 #if defined(linux) && defined(__sparc__)
159 # define R__LINUX
160 # define R__UNIX
161 # define NEED_SIGJMP
162 /*# define R__B64 */ /* enable when 64 bit machine */
163 #endif
164 
165 #if defined(linux) && defined(__sgi)
166 # define R__LINUX
167 # define R__UNIX
168 # define NEED_SIGJMP
169 /*# define R__B64 */ /* enable when 64 bit machine */
170 #endif
171 
172 #if defined(linux) && defined(__powerpc__)
173 # define R__MKLINUX
174 # define R__LINUX
175 # define R__UNIX
176 # define NEED_SIGJMP
177 # if __GNUC__ >= 3 || __GNUC_MINOR__ >= 90 /* modern egcs/gcc */
178 # define R__PPCEGCS
179 # endif
180 #endif
181 
182 #if defined(__Lynx__) && defined(__powerpc__)
183 # define R__LYNXOS
184 # define R__UNIX
185 # define ANSICPP
186 # define NEED_SIGJMP
187 # define NEED_STRCASECMP
188 # define NEED_SNPRINTF
189 #endif
190 
191 #if defined(__FreeBSD__)
192 # define R__FBSD
193 # define R__UNIX
194 # define R__BYTESWAP
195 # define R__NOSTATS /* problem using stats with FreeBSD malloc/free */
196 #endif
197 
198 #if defined(__APPLE__) /* MacOS X support, initially following FreeBSD */
199 # define R__MACOSX
200 # define R__UNIX
201 #endif
202 
203 #ifdef _HIUX_SOURCE
204 # define R__HIUX
205 # define R__UNIX
206 # define NEED_SIGJMP
207 # define NEED_SNPRINTF
208 # define ANSICPP
209 #endif
210 
211 #ifdef __GNUG__
212 # define R__GNU
213 # define ANSICPP
214 # if __GNUC__ >= 3 || __GNUC_MINOR__ >= 90 /* egcs 1.0.3 */
215 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
216 # define R__PLACEMENTDELETE /* supports overloading placement delete */
217 # endif
218 # if __GNUC__ >= 3 || __GNUC_MINOR__ >= 91 /* egcs 1.1.x */
219 # define R__ANSISTREAM /* ANSI C++ Standard Library conformant */
220 # endif
221 # if __GNUC__ >= 3 || __GNUC_MINOR__ >= 97 /* gcc 3.0pre */
222 # define R__NEWSTDHEADER /* has only headers like: iostream without .h */
223 # endif
224 # if defined(__ia64__) && __GNUC__ < 3 /* gcc 2.9x (MINOR is 9!) */
225 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
226 # define R__PLACEMENTDELETE /* supports overloading placement delete */
227 # define R__ANSISTREAM /* ANSI C++ Standard Library conformant */
228 # endif
229 #endif
230 
231 #ifdef __KCC
232 # define R__KCC
233 # define R__ANSISTREAM /* ANSI C++ Standard Library conformant */
234 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
235 # define R__PLACEMENTDELETE /* supports overloading placement delete */
236 # define ANSICPP
237 #endif
238 
239 #ifdef __INTEL_COMPILER
240 # define R__INTEL_COMPILER
241 # define R__ANSISTREAM /* ANSI C++ Standard Library conformant */
242 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
243 # define R__PLACEMENTDELETE /* supports overloading placement delete */
244 # define ANSICPP
245 #endif
246 
247 #ifdef R__ACC
248 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
249 #endif
250 
251 #ifdef _WIN32
252 # define R__WIN32
253 # ifndef WIN32
254 # define WIN32
255 # endif
256 # define R__BYTESWAP
257 #endif
258 
259 #ifdef BORLAND
260 # define MSDOS /* Windows will always stay MSDOS */
261 # define ANSICPP
262 # define R__INT16
263 # define R__BYTESWAP
264 #endif
265 
266 #ifdef __SC__
267 # define SC
268 # define R__SC
269 # if defined(macintosh)
270 # define R__MAC
271 # define NEED_STRING
272 # define ANSICPP
273 # elif WIN32
274 # define NEED_STRING
275 # define NEED_STRCASECMP
276 # define NEED_SNPRINTF
277 # define ANSICPP
278 # else
279 # define MSDOS
280 # define NEED_STRCASECMP
281 # define R__BYTESWAP
282 # endif
283 #endif
284 
285 #ifdef _MSC_VER
286 # define R__VISUAL_CPLUSPLUS
287 # define NEED_STRING
288 # define NEED_STRCASECMP
289 # define NEED_SNPRINTF
290 # define ANSICPP
291 # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
292 # define R__PLACEMENTDELETE /* supports overloading placement delete */
293 #endif
294 
295 #ifdef __MWERKS__
296 # define R__MWERKS
297 # define R__MAC
298 # define ANSICPP
299 # define NEED_STRING
300 # define NEED_STRCASECMP
301 # define NEED_SNPRINTF
302 #endif
303 
304 
305 /*--- memory and object statistics -------------------------------------------*/
306 
307 /* #define R__NOSTATS */
308 
309 
310 /*--- cpp --------------------------------------------------------------------*/
311 
312 #ifdef ANSICPP
313  /* symbol concatenation operator */
314 # define _NAME1_(name) name
315 # define _NAME2_(name1,name2) name1##name2
316 # define _NAME3_(name1,name2,name3) name1##name2##name3
317 
318  /* stringizing */
319 # define _QUOTE_(name) #name
320 
321 #else
322 
323 # define _NAME1_(name) name
324 # define _NAME2_(name1,name2) _NAME1_(name1)name2
325 # define _NAME3_(name1,name2,name3) _NAME2_(name1,name2)name3
326 
327 # define _QUOTE_(name) "name"
328 
329 #endif
330 
331 
332 /*---- misc ------------------------------------------------------------------*/
333 
334 #ifdef R__GNU
335 # define SafeDelete(p) { if (p) { delete p; p = 0; } }
336 #else
337 # define SafeDelete(p) { delete p; p = 0; }
338 #endif
339 
340 #endif
341