1 #ifndef __XBT_VISUALC_COMPILER_CONFIG_H__
2 #define __XBT_VISUALC_COMPILER_CONFIG_H__
4 /* borland.h - simgrid config for Borland C++ Builder */
6 /* Copyright (c) 2007, 2008, 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>
19 #if _WIN32_WINNT < 0x0400
21 #define _WIN32_WINNT 0x0400
24 #define _WIN32_WINNT 0x0400
31 /* No <dlfcn.h> header file. */
32 #if defined(HAVE_DLFCN_H)
36 /* Defined if the compiler has the <errno.h> header file. */
37 #if !defined(HAVE_ERRNO_H)
38 #define HAVE_ERRNO_H 1
41 /* No <execinfo.h> header file. */
42 #if defined(HAVE_EXECINFO_H)
43 #undef HAVE_EXECINFO_H
46 /* No <inttypes.h> header file. */
47 #if defined(HAVE_INTTYPES_H)
48 #undef HAVE_INTTYPES_H
51 /* Defined if compiler has the <memory.h> header file. */
52 #if !defined(HAVE_MEMORY_H)
53 #define HAVE_MEMORY_H 1
56 /* No <pthread.h> header file. */
57 #if defined(HAVE_PTHREAD_H)
62 /* No <stdint.h> header file. */
63 #if defined(HAVE_STDINT_H)
67 /* The compiler has the <stdlib.h> header file. */
68 #if !defined(HAVE_STDLIB_H)
69 #define HAVE_STDLIB_H 1
72 /* No <strings.h> header file. */
73 #if defined(HAVE_STRINGS_H)
77 /* The compiler has the <string.h> header file. */
78 #if !defined(HAVE_STRING_H)
79 #define HAVE_STRING_H 1
82 /* No <sys/socket.h> header file. */
83 #if defined(HAVE_SYS_SOCKET_H)
84 #undef HAVE_SYS_SOCKET_H
87 /* The compiler has <sys/stat.h> header file. */
88 #if !defined(HAVE_SYS_STAT_H)
89 #define HAVE_SYS_STAT_H 1
92 /* No <sys/time.h> header file. */
93 #if defined(HAVE_SYS_TIME_H)
94 #undef HAVE_SYS_TIME_H 1
97 /* The compiler has the <sys/types.h> header file. */
98 #if !defined(HAVE_SYS_TYPES_H)
99 #define HAVE_SYS_TYPES_H 1
102 /* No <unistd.h> header file. */
103 #if defined(HAVE_UNISTD_H)
107 /* The compiler has the <signal.h> header file */
108 #if !defined(HAVE_SIGNAL_H)
109 #define HAVE_SIGNAL_H 1
116 /* No `getcontext' function. */
117 #if defined(HAVE_GETCONTEXT)
118 #undef HAVE_GETCONTEXT
121 /* No `getdtablesize' function. */
122 #if defined(HAVE_GETDTABLESIZE)
123 #undef HAVE_GETDTABLESIZE
126 /* No `gettimeofday' function. */
127 #if defined(HAVE_GETTIMEOFDAY)
128 #undef HAVE_GETTIMEOFDAY
131 /* No `makecontext' function. */
132 #if defined(HAVE_MAKECONTEXT)
133 #undef HAVE_MAKECONTEXT
136 /* No 'popen' function. */
137 #if defined(HAVE_POPEN)
141 /* No `readv' function. */
142 #if defined(HAVE_READV)
146 /* No `setcontext' function. */
147 #if defined(HAVE_SETCONTEXT)
148 #undef HAVE_SETCONTEXT
151 /* No 'signal' function */
152 #if defined(HAVE_SIGNAL)
156 /* "disable the snprintf replacement ( this function is broken on system v only" */
160 #ifdef PREFER_PORTABLE_SNPRINTF
161 # undef PREFER_PORTABLE_SNPRINTF 1
165 /* The compiler has `snprintf' function. */
167 # ifndef HAVE_SNPRINTF
168 # define HAVE_SNPRINTF 1
169 # ifndef PREFER_PORTABLE_SNPRINTF
170 # define snprintf _snprintf
174 # ifdef HAVE_SNPRINTF
181 /* No `swapcontext' function. */
182 #if defined(HAVE_SWAPCONTEXT)
183 #undef HAVE_SWAPCONTEXT
186 /* No `sysconf' function. */
187 #if defined(HAVE_SYSCONF)
191 /* No `usleep' function. */
192 #if defined(HAVE_USLEEP)
196 /* The compiler has the `vsnprintf' function. */
197 #ifndef HAVE_VSNPRINTF
198 #define HAVE_VSNPRINTF 1
202 /* disable the asprintf replacement */
203 #ifndef NEED_ASPRINTF
204 #define NEED_ASPRINTF
208 /* disable the vasprintf replacement */
209 #ifndef NEED_VASPRINTF
210 #define NEED_VASPRINTF
213 /* The maximal size of any scalar on this arch */
214 #if !defined(SIZEOF_MAX)
218 /* Define to 1 if you have the ANSI C header files. */
219 #if !defined(STDC_HEADERS)
220 #define STDC_HEADERS 1
223 #if defined(TIME_WITH_SYS_TIME)
224 #undef TIME_WITH_SYS_TIME
231 /* Define to 1 if you have the `pthread' library (-lpthread). */
232 #if defined(HAVE_LIBPTHREAD)
233 #undef HAVE_LIBPTHREAD
237 * package informations ?
241 /* Defined if arrays in struct can straddle struct alignment boundaries. This
242 is like than the structure compaction above, but this time, the argument to
243 be compacted is an array whom each element would be normally compacted.
244 Exemple: struct s { double d; int i; char c[6]; }; Arrays can straddle if c
245 is allowed to come just after i. Note that GRAS only support architecture
246 presenting this caracteristic so far. */
248 #if defined(GRAS_ARRAY_STRADDLE_STRUCT)
249 #undef GRAS_ARRAY_STRADDLE_STRUCT
252 /* Defined if structures are compacted when possible. Consider this structure:
253 struct s {double d; int i; char c;}; If it is allowed, the char is placed
254 just after the int. If not, it has to be on the 8 bytes boundary imposed by
255 the double. For now, GRAS requires the structures to be compacted. */
256 #if defined(GRAS_STRUCT_COMPACT)
257 #undef GRAS_STRUCT_COMPACT
260 /* Name of package */
261 #define PACKAGE "simgrid"
263 /* Define to the address where bug reports for this package should be sent. */
264 #define PACKAGE_BUGREPORT "simgrid-devel@lists.gforge.inria.fr"
266 /* Define to the full name of this package. */
267 #define PACKAGE_NAME "simgrid"
269 /* Define to the full name and version of this package. */
270 #define PACKAGE_STRING "simgrid 3.1.1-cvs"
272 /* Define to the one symbol short name of this package. */
273 #define PACKAGE_TARNAME "simgrid"
275 /* Define to the version of this package. */
276 #define PACKAGE_VERSION "3.1.1-cvs"
282 /* define if big endian */
283 #if !defined(GRAS_BIGENDIAN)
284 #define GRAS_BIGENDIAN 0
287 /* Defined if structures are compacted when possible. Consider this structure:
288 struct s {double d; int i; char c;}; If it is allowed, the char is placed
289 just after the int. If not, it has to be on the 8 bytes boundary imposed by
290 the double. For now, GRAS requires the structures to be compacted. */
291 #if defined(GRAS_STRUCT_COMPACT)
292 #define GRAS_STRUCT_COMPACT 1
295 /* defines the GRAS architecture signature of this machine */
296 #if defined(GRAS_THISARCH)
300 #define GRAS_THISARCH 3
303 /* Path to the addr2line tool */
304 #if defined(ADDR2LINE)
311 #if !defined(HAVE_VA_COPY)
312 #define HAVE_VA_COPY 1
315 /* This macro is not defined in borland stdarg.h include file, adds it. */
316 #ifndef va_copy(dest,src)
317 #define va_copy(dest,src) ((dest)=(src))
320 #ifndef __VA_COPY_USE_ASP(d, s)
321 /* Predefined possible va_copy() implementation (id: ASP) */
322 #define __VA_COPY_USE_ASP(d, s) do { *(d) = *(s); } while (0)
325 #ifndef __VA_COPY_USE_ASS(d, s)
326 /* Predefined possible va_copy() implementation (id: ASS) */
327 #define __VA_COPY_USE_ASS(d, s) do { (d) = (s); } while (0)
330 #ifndef __VA_COPY_USE_C99(d, s)
331 /* Predefined possible va_copy() implementation (id: C99) */
332 #define __VA_COPY_USE_C99(d, s) va_copy((d), (s))
335 #ifndef __VA_COPY_USE_CPP(d, s)
336 /* Predefined possible va_copy() implementation (id: CPP) */
337 #define __VA_COPY_USE_CPP(d, s) memcpy((void *)(d), (void *)(s), sizeof(*(s)))
340 #ifndef __VA_COPY_USE_CPS(d, s)
341 /* Predefined possible va_copy() implementation (id: CPS) */
342 #define __VA_COPY_USE_CPS(d, s) memcpy((void *)&(d), (void *)&(s), sizeof(s))
345 #ifndef __VA_COPY_USE_GCB(d, s)
346 /* Predefined possible va_copy() implementation (id: GCB) */
347 #define __VA_COPY_USE_GCB(d, s) __builtin_va_copy((d), (s))
350 #ifndef __VA_COPY_USE_GCH(d, s)
351 /* Predefined possible va_copy() implementation (id: GCH) */
352 #define __VA_COPY_USE_GCH(d, s) __va_copy((d), (s))
354 /* Predefined possible va_copy() implementation (id: GCM) */
355 #define __VA_COPY_USE_GCM(d, s) VA_COPY((d), (s))
358 /* Optional va_copy() implementation activation */
360 #define va_copy(d, s) __VA_COPY_USE(d, s)
363 /* Define to id of used va_copy() implementation */
364 #ifndef __VA_COPY_USE
365 #define __VA_COPY_USE __VA_COPY_USE_C99
369 /* xbt contexts are based on our threads implementation */
370 #ifndef CONTEXT_THREADS
371 #define CONTEXT_THREADS 1
375 /* xbt contexts are not based on ucontext */
376 #ifdef CONTEXT_UCONTEXT
377 #undef CONTEXT_UCONTEXT
382 #if defined(_XBT_DESIGNATED_DLL)
383 #define _XBT_CALL __cdecl __export
384 #elif defined(_RTLDLL)
385 #define _XBT_CALL __cdecl __import
387 #define _XBT_CALL __cdecl
391 /* auto enable thread safety and exceptions: */
393 #define _XBT_HAS_NO_EXCEPTIONS
396 #if defined ( __MT__ ) && !defined (_NOTHREADS) && !defined (_REENTRANT)
401 /* For open, read etc. file operations. */
405 /* For getpid() function. */
408 /* no unistd.h header file. */
409 #define YY_NO_UNISTD_H
411 * Replace winsock2.h,ws2tcpip.h and winsock.h header files */
415 /* Choose setjmp as exception implementation */
416 #ifndef __EX_MCTX_SJLJ__
417 #define __EX_MCTX_SJLJ__
422 #include <sys/stat.h>
424 #define S_IWUSR _S_IWRITE
425 #define S_IRUSR _S_IREAD
428 /* Visual C++ does not declare the ssize_t type */
431 /* Visual C++ does not declare the mode_t type */
432 typedef unsigned int mode_t;
434 /* Visual C++ does not declare the uint32_t type */
435 typedef unsigned int uint32_t;
438 #endif /* #ifndef __XBT_VISUALC_COMPILER_CONFIG_H__ */