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) 2003, 2004 Cherier Malek. All rights reserved. */
8 /* This program is free software; you can redistribute it and/or modify it
9 * under the terms of the license (GNU LGPL) which comes with this package. */
12 * Borland C++ compiler configuration
15 #include <win32/platform/select_platform_features.h>
21 /* No <dlfcn.h> header file. */
22 #if defined(HAVE_DLFCN_H)
26 /* Defined if the compiler has the <errno.h> header file. */
27 #if !defined(HAVE_ERRNO_H)
28 #define HAVE_ERRNO_H 1
31 /* No <execinfo.h> header file. */
32 #if defined(HAVE_EXECINFO_H)
33 #undef HAVE_EXECINFO_H
36 /* No <inttypes.h> header file. */
37 #if defined(HAVE_INTTYPES_H)
38 #undef HAVE_INTTYPES_H
41 /* Defined if compiler has the <memory.h> header file. */
42 #if !defined(HAVE_MEMORY_H)
43 #define HAVE_MEMORY_H 1
46 /* No <pthread.h> header file. */
47 #if defined(HAVE_PTHREAD_H)
52 /* No <stdint.h> header file. */
53 #if defined(HAVE_STDINT_H)
57 /* The compiler has the <stdlib.h> header file. */
58 #if !defined(HAVE_STDLIB_H)
59 #define HAVE_STDLIB_H 1
62 /* No <strings.h> header file. */
63 #if defined(HAVE_STRINGS_H)
67 /* The compiler has the <string.h> header file. */
68 #if !defined(HAVE_STRING_H)
69 #define HAVE_STRING_H 1
72 /* No <sys/socket.h> header file. */
73 #if defined(HAVE_SYS_SOCKET_H)
74 #undef HAVE_SYS_SOCKET_H
77 /* The compiler has <sys/stat.h> header file. */
78 #if !defined(HAVE_SYS_STAT_H)
79 #define HAVE_SYS_STAT_H 1
82 /* No <sys/time.h> header file. */
83 #if defined(HAVE_SYS_TIME_H)
84 #undef HAVE_SYS_TIME_H 1
87 /* The compiler has the <sys/types.h> header file. */
88 #if !defined(HAVE_SYS_TYPES_H)
89 #define HAVE_SYS_TYPES_H 1
92 /* No <unistd.h> header file. */
93 #if defined(HAVE_UNISTD_H)
98 * The compiler has the <windows.h> header file.
99 * Process the case of afx.h
101 #if !defined(HAVE_WINDOWS_H)
102 #define HAVE_WINDOWS_H 1
105 /* The compiler has the <winsock2.h> header file. */
106 #if !defined(HAVE_WINSOCK2_H)
107 #define HAVE_WINSOCK2_H
111 * The compiler has the <winsock.h> header file.
112 * Trouble if winsock2.h exists ?
114 #if !defined(HAVE_WINSOCK_H)
115 #define HAVE_WINSOCK_H 1
118 /* The compiler has the <signal.h> header file */
119 #if !defined(HAVE_SIGNAL_H)
120 #define HAVE_SIGNAL_H 1
127 /* No `getcontext' function. */
128 #if defined(HAVE_GETCONTEXT)
129 #undef HAVE_GETCONTEXT
132 /* No `getdtablesize' function. */
133 #if defined(HAVE_GETDTABLESIZE)
134 #undef HAVE_GETDTABLESIZE
137 /* No `gettimeofday' function. */
138 #if defined(HAVE_GETTIMEOFDAY)
139 #undef HAVE_GETTIMEOFDAY
142 /* No `makecontext' function. */
143 #if defined(HAVE_MAKECONTEXT)
144 #undef HAVE_MAKECONTEXT
147 /* No 'popen' function. */
148 #if defined(HAVE_POPEN)
152 /* No `readv' function. */
153 #if defined(HAVE_READV)
157 /* No `setcontext' function. */
158 #if defined(HAVE_SETCONTEXT)
159 #undef HAVE_SETCONTEXT
162 /* No 'signal' function */
163 #if defined(HAVE_SIGNAL)
167 /* The compiler has `snprintf' function. */
168 #if !defined(HAVE_SNPRINTF)
169 #define HAVE_SNPRINTF 1
172 /* No `swapcontext' function. */
173 #if defined(HAVE_SWAPCONTEXT)
174 #undef HAVE_SWAPCONTEXT
177 /* No `sysconf' function. */
178 #if defined(HAVE_SYSCONF)
182 /* No `usleep' function. */
183 #if defined(HAVE_USLEEP)
187 /* The compiler has the `vsnprintf' function. */
188 #if !defined(HAVE_VSNPRINTF)
189 #define HAVE_VSNPRINTF 1
192 /* enable the asprintf replacement */
193 #if !defined(NEED_ASPRINTF)
194 #define NEED_ASPRINTF 1
197 /*#ifdef NEED_ASPRINTF
202 /* enable the vasprintf replacement */
203 #if !defined(NEED_VASPRINTF)
204 #define NEED_VASPRINTF 1
207 /* "disable the snprintf replacement ( this function is broken on system v only" */
209 /* FIXME TO ANALYZE */
210 #if defined(PREFER_PORTABLE_SNPRINTF)
211 #undef PREFER_PORTABLE_SNPRINTF
214 #if !defined(PREFER_PORTABLE_SNPRINTF)
215 #define PREFER_PORTABLE_SNPRINTF
218 /* The maximal size of any scalar on this arch */
219 #if !defined(SIZEOF_MAX)
223 /* Define to 1 if you have the ANSI C header files. */
224 #if !defined(STDC_HEADERS)
225 #define STDC_HEADERS 1
228 #if defined(TIME_WITH_SYS_TIME)
229 #undef TIME_WITH_SYS_TIME
236 /* Define to 1 if you have the `pthread' library (-lpthread). */
237 #if defined(HAVE_LIBPTHREAD)
238 #undef HAVE_LIBPTHREAD
242 * package informations ?
246 /* Defined if arrays in struct can straddle struct alignment boundaries. This
247 is like than the structure compaction above, but this time, the argument to
248 be compacted is an array whom each element would be normally compacted.
249 Exemple: struct s { double d; int i; char c[6]; }; Arrays can straddle if c
250 is allowed to come just after i. Note that GRAS only support architecture
251 presenting this caracteristic so far. */
253 #if defined(GRAS_ARRAY_STRADDLE_STRUCT)
254 #undef GRAS_ARRAY_STRADDLE_STRUCT
257 /* Defined if structures are compacted when possible. Consider this structure:
258 struct s {double d; int i; char c;}; If it is allowed, the char is placed
259 just after the int. If not, it has to be on the 8 bytes boundary imposed by
260 the double. For now, GRAS requires the structures to be compacted. */
261 #if defined(GRAS_STRUCT_COMPACT)
262 #undef GRAS_STRUCT_COMPACT
265 /* Name of package */
266 #define PACKAGE "simgrid"
268 /* Define to the address where bug reports for this package should be sent. */
269 #define PACKAGE_BUGREPORT "simgrid-devel@lists.gforge.inria.fr"
271 /* Define to the full name of this package. */
272 #define PACKAGE_NAME "simgrid"
274 /* Define to the full name and version of this package. */
275 #define PACKAGE_STRING "simgrid 3.1.1-cvs"
277 /* Define to the one symbol short name of this package. */
278 #define PACKAGE_TARNAME "simgrid"
280 /* Define to the version of this package. */
281 #define PACKAGE_VERSION "3.1.1-cvs"
287 /* define if big endian */
288 #if !defined(GRAS_BIGENDIAN)
289 #define GRAS_BIGENDIAN 0
292 /* Defined if structures are compacted when possible. Consider this structure:
293 struct s {double d; int i; char c;}; If it is allowed, the char is placed
294 just after the int. If not, it has to be on the 8 bytes boundary imposed by
295 the double. For now, GRAS requires the structures to be compacted. */
296 #if defined(GRAS_STRUCT_COMPACT)
297 #define GRAS_STRUCT_COMPACT 1
300 /* defines the GRAS architecture signature of this machine */
301 #if defined(GRAS_THISARCH)
305 #define GRAS_THISARCH 0
308 /* Path to the addr2line tool */
309 #if defined(ADDR2LINE)
313 #if !defined(HAVE_VA_COPY)
314 #define HAVE_VA_COPY 1
317 /* This macro is not defined in borland stdarg.h include file, adds it. */
318 #define va_copy(dest,src) ((dest)=(src))
320 /* Predefined possible va_copy() implementation (id: ASP) */
321 #define __VA_COPY_USE_ASP(d, s) do { *(d) = *(s); } while (0)
323 /* Predefined possible va_copy() implementation (id: ASS) */
324 #define __VA_COPY_USE_ASS(d, s) do { (d) = (s); } while (0)
326 /* Predefined possible va_copy() implementation (id: C99) */
327 #define __VA_COPY_USE_C99(d, s) va_copy((d), (s))
329 /* Predefined possible va_copy() implementation (id: CPP) */
330 #define __VA_COPY_USE_CPP(d, s) memcpy((void *)(d), (void *)(s)), sizeof(*(s))
332 /* Predefined possible va_copy() implementation (id: CPS) */
333 #define __VA_COPY_USE_CPS(d, s) memcpy((void *)&(d), (void *)&(s)), sizeof((s))
335 /* Predefined possible va_copy() implementation (id: GCB) */
336 #define __VA_COPY_USE_GCB(d, s) __builtin_va_copy((d), (s))
338 /* Predefined possible va_copy() implementation (id: GCH) */
339 #define __VA_COPY_USE_GCH(d, s) __va_copy((d), (s))
341 /* Predefined possible va_copy() implementation (id: GCM) */
342 #define __VA_COPY_USE_GCM(d, s) VA_COPY((d), (s))
345 /* Optional va_copy() implementation activation */
347 #define va_copy(d, s) __VA_COPY_USE(d, s)
351 /* Define to id of used va_copy() implementation */
352 #define __VA_COPY_USE __VA_COPY_USE_C99
355 #if defined(_XBT_DESIGNATED_DLL)
356 #define _XBT_CALL __cdecl __export
357 #elif defined(_RTLDLL)
358 #define _XBT_CALL __cdecl __import
360 #define _XBT_CALL __cdecl
364 /* auto enable thread safety and exceptions: */
366 #define _XBT_HAS_NO_EXCEPTIONS
369 #if defined ( __MT__ ) && !defined (_NOTHREADS) && !defined (_REENTRANT)
373 #if(__BORLANDC__>= 0x500)
374 #define _XBT_HAS_NAMESPACES
378 /* For open, read etc. file operations. */
382 /* For getpid() function. */
385 /* no unistd.h header file. */
386 #define YY_NO_UNISTD_H
388 * Replace winsock2.h,ws2tcpip.h and winsock.h header files */
392 typedef unsigned int uint32_t;
394 /* Choose setjmp as exception implementation */
395 #ifndef __EX_MCTX_SJLJ__
396 #define __EX_MCTX_SJLJ__
399 /* this is used in context managment. */
400 #ifdef CONTEXT_UCONTEXT
401 #undef CONTEXT_UCONTEXT
404 #ifndef CONTEXT_THREADS
405 #define CONTEXT_THREADS 1
411 #endif /* #ifndef __XBT_BORLAND_COMPILER_CONFIG_H__ */