1 #ifndef __XBT_BORLAND_COMPILER_CONFIG_H__
2 #define __XBT_BORLAND_COMPILER_CONFIG_H__
4 /* borland.h - simgrid config for Borland C++ Builder */
6 /* Copyright (c) 2006, 2007, 2010. The SimGrid Team.
7 * All rights reserved. */
9 /* This program is free software; you can redistribute it and/or modify it
10 * under the terms of the license (GNU LGPL) which comes with this package. */
13 * Borland C++ compiler configuration
16 #include <win32/platform/select_platform_features.h>
22 /* No <dlfcn.h> header file. */
23 #if defined(HAVE_DLFCN_H)
27 /* Defined if the compiler has the <errno.h> header file. */
28 #if !defined(HAVE_ERRNO_H)
29 #define HAVE_ERRNO_H 1
32 /* No <execinfo.h> header file. */
33 #if defined(HAVE_EXECINFO_H)
34 #undef HAVE_EXECINFO_H
37 /* No <inttypes.h> header file. */
38 #if defined(HAVE_INTTYPES_H)
39 #undef HAVE_INTTYPES_H
42 /* Defined if compiler has the <memory.h> header file. */
43 #if !defined(HAVE_MEMORY_H)
44 #define HAVE_MEMORY_H 1
47 /* No <pthread.h> header file. */
48 #if defined(HAVE_PTHREAD_H)
53 /* No <stdint.h> header file. */
54 #if defined(HAVE_STDINT_H)
58 /* The compiler has the <stdlib.h> header file. */
59 #if !defined(HAVE_STDLIB_H)
60 #define HAVE_STDLIB_H 1
63 /* No <strings.h> header file. */
64 #if defined(HAVE_STRINGS_H)
68 /* The compiler has the <string.h> header file. */
69 #if !defined(HAVE_STRING_H)
70 #define HAVE_STRING_H 1
73 /* No <sys/socket.h> header file. */
74 #if defined(HAVE_SYS_SOCKET_H)
75 #undef HAVE_SYS_SOCKET_H
78 /* The compiler has <sys/stat.h> header file. */
79 #if !defined(HAVE_SYS_STAT_H)
80 #define HAVE_SYS_STAT_H 1
83 /* No <sys/time.h> header file. */
84 #if defined(HAVE_SYS_TIME_H)
85 #undef HAVE_SYS_TIME_H 1
88 /* The compiler has the <sys/types.h> header file. */
89 #if !defined(HAVE_SYS_TYPES_H)
90 #define HAVE_SYS_TYPES_H 1
93 /* No <unistd.h> header file. */
94 #if defined(HAVE_UNISTD_H)
99 * The compiler has the <windows.h> header file.
100 * Process the case of afx.h
102 #if !defined(HAVE_WINDOWS_H)
103 #define HAVE_WINDOWS_H 1
106 /* The compiler has the <winsock2.h> header file. */
107 #if !defined(HAVE_WINSOCK2_H)
108 #define HAVE_WINSOCK2_H
112 * The compiler has the <winsock.h> header file.
113 * Trouble if winsock2.h exists ?
115 #if !defined(HAVE_WINSOCK_H)
116 #define HAVE_WINSOCK_H 1
119 /* The compiler has the <signal.h> header file */
120 #if !defined(HAVE_SIGNAL_H)
121 #define HAVE_SIGNAL_H 1
128 /* No `getcontext' function. */
129 #if defined(HAVE_GETCONTEXT)
130 #undef HAVE_GETCONTEXT
133 /* No `getdtablesize' function. */
134 #if defined(HAVE_GETDTABLESIZE)
135 #undef HAVE_GETDTABLESIZE
138 /* No `gettimeofday' function. */
139 #if defined(HAVE_GETTIMEOFDAY)
140 #undef HAVE_GETTIMEOFDAY
143 /* No `makecontext' function. */
144 #if defined(HAVE_MAKECONTEXT)
145 #undef HAVE_MAKECONTEXT
148 /* No 'popen' function. */
149 #if defined(HAVE_POPEN)
153 /* No `readv' function. */
154 #if defined(HAVE_READV)
158 /* No `setcontext' function. */
159 #if defined(HAVE_SETCONTEXT)
160 #undef HAVE_SETCONTEXT
163 /* No 'signal' function */
164 #if defined(HAVE_SIGNAL)
168 /* The compiler has `snprintf' function. */
169 #if !defined(HAVE_SNPRINTF)
170 #define HAVE_SNPRINTF 1
173 /* No `swapcontext' function. */
174 #if defined(HAVE_SWAPCONTEXT)
175 #undef HAVE_SWAPCONTEXT
178 /* No `sysconf' function. */
179 #if defined(HAVE_SYSCONF)
183 /* No `usleep' function. */
184 #if defined(HAVE_USLEEP)
188 /* The compiler has the `vsnprintf' function. */
189 #if !defined(HAVE_VSNPRINTF)
190 #define HAVE_VSNPRINTF 1
193 /* enable the asprintf replacement */
194 #if !defined(NEED_ASPRINTF)
195 #define NEED_ASPRINTF 1
198 /*#ifdef NEED_ASPRINTF
203 /* enable the vasprintf replacement */
204 #if !defined(NEED_VASPRINTF)
205 #define NEED_VASPRINTF 1
208 /* "disable the snprintf replacement ( this function is broken on system v only" */
210 /* FIXME TO ANALYZE */
211 #if defined(PREFER_PORTABLE_SNPRINTF)
212 #undef PREFER_PORTABLE_SNPRINTF
215 #if !defined(PREFER_PORTABLE_SNPRINTF)
216 #define PREFER_PORTABLE_SNPRINTF
219 /* The maximal size of any scalar on this arch */
220 #if !defined(SIZEOF_MAX)
224 /* Define to 1 if you have the ANSI C header files. */
225 #if !defined(STDC_HEADERS)
226 #define STDC_HEADERS 1
229 #if defined(TIME_WITH_SYS_TIME)
230 #undef TIME_WITH_SYS_TIME
237 /* Define to 1 if you have the `pthread' library (-lpthread). */
238 #if defined(HAVE_LIBPTHREAD)
239 #undef HAVE_LIBPTHREAD
243 * package informations ?
247 /* Defined if arrays in struct can straddle struct alignment boundaries. This
248 is like than the structure compaction above, but this time, the argument to
249 be compacted is an array whom each element would be normally compacted.
250 Exemple: struct s { double d; int i; char c[6]; }; Arrays can straddle if c
251 is allowed to come just after i. Note that GRAS only support architecture
252 presenting this caracteristic so far. */
254 #if defined(GRAS_ARRAY_STRADDLE_STRUCT)
255 #undef GRAS_ARRAY_STRADDLE_STRUCT
258 /* Defined if structures are compacted when possible. Consider this structure:
259 struct s {double d; int i; char c;}; If it is allowed, the char is placed
260 just after the int. If not, it has to be on the 8 bytes boundary imposed by
261 the double. For now, GRAS requires the structures to be compacted. */
262 #if defined(GRAS_STRUCT_COMPACT)
263 #undef GRAS_STRUCT_COMPACT
266 /* Name of package */
267 #define PACKAGE "simgrid"
269 /* Define to the address where bug reports for this package should be sent. */
270 #define PACKAGE_BUGREPORT "simgrid-devel@lists.gforge.inria.fr"
272 /* Define to the full name of this package. */
273 #define PACKAGE_NAME "simgrid"
275 /* Define to the full name and version of this package. */
276 #define PACKAGE_STRING "simgrid 3.1.1-cvs"
278 /* Define to the one symbol short name of this package. */
279 #define PACKAGE_TARNAME "simgrid"
281 /* Define to the version of this package. */
282 #define PACKAGE_VERSION "3.1.1-cvs"
288 /* define if big endian */
289 #if !defined(GRAS_BIGENDIAN)
290 #define GRAS_BIGENDIAN 0
293 /* Defined if structures are compacted when possible. Consider this structure:
294 struct s {double d; int i; char c;}; If it is allowed, the char is placed
295 just after the int. If not, it has to be on the 8 bytes boundary imposed by
296 the double. For now, GRAS requires the structures to be compacted. */
297 #if defined(GRAS_STRUCT_COMPACT)
298 #define GRAS_STRUCT_COMPACT 1
301 /* defines the GRAS architecture signature of this machine */
302 #if defined(GRAS_THISARCH)
306 #define GRAS_THISARCH 0
309 /* Path to the addr2line tool */
310 #if defined(ADDR2LINE)
314 #if !defined(HAVE_VA_COPY)
315 #define HAVE_VA_COPY 1
318 /* This macro is not defined in borland stdarg.h include file, adds it. */
319 #define va_copy(dest,src) ((dest)=(src))
321 /* Predefined possible va_copy() implementation (id: ASP) */
322 #define __VA_COPY_USE_ASP(d, s) do { *(d) = *(s); } while (0)
324 /* Predefined possible va_copy() implementation (id: ASS) */
325 #define __VA_COPY_USE_ASS(d, s) do { (d) = (s); } while (0)
327 /* Predefined possible va_copy() implementation (id: C99) */
328 #define __VA_COPY_USE_C99(d, s) va_copy((d), (s))
330 /* Predefined possible va_copy() implementation (id: CPP) */
331 #define __VA_COPY_USE_CPP(d, s) memcpy((void *)(d), (void *)(s), sizeof(*(s)))
333 /* Predefined possible va_copy() implementation (id: CPS) */
334 #define __VA_COPY_USE_CPS(d, s) memcpy((void *)&(d), (void *)&(s), sizeof(s))
336 /* Predefined possible va_copy() implementation (id: GCB) */
337 #define __VA_COPY_USE_GCB(d, s) __builtin_va_copy((d), (s))
339 /* Predefined possible va_copy() implementation (id: GCH) */
340 #define __VA_COPY_USE_GCH(d, s) __va_copy((d), (s))
342 /* Predefined possible va_copy() implementation (id: GCM) */
343 #define __VA_COPY_USE_GCM(d, s) VA_COPY((d), (s))
346 /* Optional va_copy() implementation activation */
348 #define va_copy(d, s) __VA_COPY_USE(d, s)
352 /* Define to id of used va_copy() implementation */
353 #define __VA_COPY_USE __VA_COPY_USE_C99
356 #if defined(_XBT_DESIGNATED_DLL)
357 #define _XBT_CALL __cdecl __export
358 #elif defined(_RTLDLL)
359 #define _XBT_CALL __cdecl __import
361 #define _XBT_CALL __cdecl
365 /* auto enable thread safety and exceptions: */
367 #define _XBT_HAS_NO_EXCEPTIONS
370 #if defined ( __MT__ ) && !defined (_NOTHREADS) && !defined (_REENTRANT)
374 #if(__BORLANDC__>= 0x500)
375 #define _XBT_HAS_NAMESPACES
379 /* For open, read etc. file operations. */
383 /* For getpid() function. */
386 /* no unistd.h header file. */
387 #define YY_NO_UNISTD_H
389 * Replace winsock2.h,ws2tcpip.h and winsock.h header files */
393 typedef unsigned int uint32_t;
395 /* Choose setjmp as exception implementation */
396 #ifndef __EX_MCTX_SJLJ__
397 #define __EX_MCTX_SJLJ__
400 /* this is used in context managment. */
401 #ifdef CONTEXT_UCONTEXT
402 #undef CONTEXT_UCONTEXT
405 #ifndef CONTEXT_THREADS
406 #define CONTEXT_THREADS 1
412 #endif /* #ifndef __XBT_BORLAND_COMPILER_CONFIG_H__ */