Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Ops, forgot debuging outputs
[simgrid.git] / src / win32 / compiler / visualc.h
1 #ifndef __XBT_VISUALC_COMPILER_CONFIG_H__
2 #define __XBT_VISUALC_COMPILER_CONFIG_H__
3
4 /* borland.h - simgrid config for Borland C++ Builder   */
5
6 /* Copyright (c) 2003, 2004 Cherier Malek. All rights reserved.            */
7
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. */
10
11 /*
12  *  Borland C++ compiler configuration
13  */
14
15 #include <win32/platform/select_platform_features.h>
16
17 /* 
18  * include files. 
19  */
20
21 /* No <dlfcn.h> header file. */
22 #if defined(HAVE_DLFCN_H)
23         #undef HAVE_DLFCN_H
24 #endif 
25
26 /* Defined if the compiler has the <errno.h> header file. */
27 #if !defined(HAVE_ERRNO_H)
28         #define HAVE_ERRNO_H            1
29 #endif
30
31 /* No <execinfo.h> header file. */
32 #if defined(HAVE_EXECINFO_H)
33         #undef HAVE_EXECINFO_H
34 #endif
35
36 /* No <inttypes.h> header file. */
37 #if defined(HAVE_INTTYPES_H)
38         #undef HAVE_INTTYPES_H
39 #endif
40
41 /* Defined if compiler has the <memory.h> header file. */
42 #if !defined(HAVE_MEMORY_H)
43         #define HAVE_MEMORY_H           1
44 #endif
45
46 /* No <pthread.h> header file. */
47 #if defined(HAVE_PTHREAD_H)
48         #undef HAVE_PTHREAD_H
49 #endif
50
51
52 /* No <stdint.h> header file. */
53 #if defined(HAVE_STDINT_H)
54         #undef HAVE_STDINT_H
55 #endif
56
57 /* The compiler has the <stdlib.h> header file. */
58 #if !defined(HAVE_STDLIB_H)
59         #define HAVE_STDLIB_H           1
60 #endif
61
62 /* No <strings.h> header file. */
63 #if defined(HAVE_STRINGS_H)
64         #undef HAVE_STRINGS_H
65 #endif
66
67 /* The compiler has the <string.h> header file. */
68 #if !defined(HAVE_STRING_H)
69         #define HAVE_STRING_H           1
70 #endif
71
72 /* No <sys/socket.h> header file. */
73 #if defined(HAVE_SYS_SOCKET_H)
74         #undef HAVE_SYS_SOCKET_H
75 #endif
76
77 /* The compiler has <sys/stat.h> header file. */
78 #if !defined(HAVE_SYS_STAT_H)
79         #define HAVE_SYS_STAT_H         1
80 #endif
81
82 /* No <sys/time.h> header file. */
83 #if defined(HAVE_SYS_TIME_H)
84         #undef HAVE_SYS_TIME_H          1
85 #endif
86
87 /* The compiler has the <sys/types.h> header file. */
88 #if !defined(HAVE_SYS_TYPES_H)
89         #define HAVE_SYS_TYPES_H        1
90 #endif
91
92 /* No <unistd.h> header file. */
93 #if defined(HAVE_UNISTD_H)
94         #undef HAVE_UNISTD_H    
95 #endif
96
97 /* 
98  * The compiler has the <windows.h> header file. 
99  * Process the case of afx.h
100 */
101 #if !defined(HAVE_WINDOWS_H)
102         #define HAVE_WINDOWS_H          1
103 #endif
104
105 /* The compiler has the <winsock2.h> header file. */
106 #if !defined(HAVE_WINSOCK2_H)
107         #define HAVE_WINSOCK2_H
108 #endif
109
110 /*  
111  * The compiler has the <winsock.h> header file.
112  * Trouble if winsock2.h exists ?  
113  */
114 #if !defined(HAVE_WINSOCK_H)
115         #define HAVE_WINSOCK_H  1
116 #endif
117
118 /* The compiler has the <signal.h> header file */
119 #if !defined(HAVE_SIGNAL_H)
120         #define HAVE_SIGNAL_H   1
121 #endif
122
123 /* 
124  * functions.
125  */
126
127 /* No `getcontext' function. */
128 #if defined(HAVE_GETCONTEXT)
129         #undef HAVE_GETCONTEXT
130 #endif
131
132 /* No `getdtablesize' function. */
133 #if defined(HAVE_GETDTABLESIZE)
134         #undef HAVE_GETDTABLESIZE
135 #endif
136
137 /* No `gettimeofday' function. */
138 #if defined(HAVE_GETTIMEOFDAY)
139         #undef HAVE_GETTIMEOFDAY
140 #endif
141
142 /* No `makecontext' function. */
143 #if defined(HAVE_MAKECONTEXT)
144         #undef HAVE_MAKECONTEXT
145 #endif
146
147 /* No 'popen' function. */
148 #if defined(HAVE_POPEN)
149         #undef HAVE_POPEN
150 #endif
151
152 /* No `readv' function. */
153 #if defined(HAVE_READV)
154         #undef HAVE_READV
155 #endif
156
157 /* No `setcontext' function. */
158 #if defined(HAVE_SETCONTEXT)
159         #undef HAVE_SETCONTEXT
160 #endif
161
162 /* No 'signal' function */
163 #if defined(HAVE_SIGNAL)
164         #undef HAVE_SIGNAL
165 #endif
166
167 /* The compiler has `snprintf' function. */
168 #if _MSC_VER >= 7 /* FIXME: check version number */
169 #  ifndef HAVE_SNPRINTF
170         #define HAVE_SNPRINTF   1
171 #  endif
172 #else 
173 #  ifdef HAVE_SNPRINTF
174         #undef HAVE_SNPRINTF
175 #  endif
176 #endif
177
178 /* No `swapcontext' function. */
179 #if defined(HAVE_SWAPCONTEXT)
180         #undef HAVE_SWAPCONTEXT
181 #endif
182
183 /* No `sysconf' function. */
184 #if defined(HAVE_SYSCONF)
185         #undef HAVE_SYSCONF
186 #endif
187
188 /* No `usleep' function. */
189 #if defined(HAVE_USLEEP)
190         #undef HAVE_USLEEP
191 #endif
192
193 /* The compiler has the `vsnprintf' function. */
194 #ifndef HAVE_VSNPRINTF
195         #define HAVE_VSNPRINTF  1
196 #endif
197
198
199 /* disable the asprintf replacement */
200 #ifndef NEED_ASPRINTF
201         #define NEED_ASPRINTF   
202 #endif
203
204
205 /* disable the vasprintf replacement */
206 #ifndef NEED_VASPRINTF
207         #define NEED_VASPRINTF
208 #endif
209
210 /* "disable the snprintf replacement ( this function is broken on system v only" */
211
212
213 #if !defined(PREFER_PORTABLE_SNPRINTF)
214         #define PREFER_PORTABLE_SNPRINTF        
215 #endif
216
217 /* The maximal size of any scalar on this arch */
218 #if !defined(SIZEOF_MAX)
219         #define SIZEOF_MAX 8
220 #endif
221
222 /* Define to 1 if you have the ANSI C header files. */
223 #if !defined(STDC_HEADERS)
224         #define STDC_HEADERS 1
225 #endif
226
227 #if defined(TIME_WITH_SYS_TIME)
228         #undef TIME_WITH_SYS_TIME 
229 #endif
230
231 /* 
232  * libraries
233  */
234
235 /* Define to 1 if you have the `pthread' library (-lpthread). */
236 #if defined(HAVE_LIBPTHREAD)
237         #undef HAVE_LIBPTHREAD
238 #endif
239
240 /* 
241  * package informations ?
242  */
243  
244  
245 /* Defined if arrays in struct can straddle struct alignment boundaries. This
246 is like than the structure compaction above, but this time, the argument to
247 be compacted is an array whom each element would be normally compacted.
248 Exemple: struct s { double d; int i; char c[6]; }; Arrays can straddle if c
249 is allowed to come just after i. Note that GRAS only support architecture
250 presenting this caracteristic so far. */
251
252 #if defined(GRAS_ARRAY_STRADDLE_STRUCT)
253         #undef GRAS_ARRAY_STRADDLE_STRUCT
254 #endif
255
256 /* Defined if structures are compacted when possible. Consider this structure:
257 struct s {double d; int i; char c;}; If it is allowed, the char is placed
258 just after the int. If not, it has to be on the 8 bytes boundary imposed by
259 the double. For now, GRAS requires the structures to be compacted. */
260 #if defined(GRAS_STRUCT_COMPACT)
261         #undef GRAS_STRUCT_COMPACT
262 #endif
263
264 /* Name of package */
265 #define PACKAGE "simgrid"
266
267 /* Define to the address where bug reports for this package should be sent. */
268 #define PACKAGE_BUGREPORT "simgrid-devel@lists.gforge.inria.fr"
269
270 /* Define to the full name of this package. */
271 #define PACKAGE_NAME "simgrid"
272
273 /* Define to the full name and version of this package. */
274 #define PACKAGE_STRING "simgrid 3.1.1-cvs"
275
276 /* Define to the one symbol short name of this package. */
277 #define PACKAGE_TARNAME "simgrid"
278
279 /* Define to the version of this package. */
280 #define PACKAGE_VERSION "3.1.1-cvs"
281
282 /* 
283  * macro
284  */
285  
286  /* define if big endian */
287 #if !defined(GRAS_BIGENDIAN)
288         #define GRAS_BIGENDIAN 0
289 #endif
290
291 /* Defined if structures are compacted when possible. Consider this structure:
292 struct s {double d; int i; char c;}; If it is allowed, the char is placed
293 just after the int. If not, it has to be on the 8 bytes boundary imposed by
294 the double. For now, GRAS requires the structures to be compacted. */
295 #if defined(GRAS_STRUCT_COMPACT)
296         #define GRAS_STRUCT_COMPACT 1
297 #endif
298
299 /* defines the GRAS architecture signature of this machine */
300 #if defined(GRAS_THISARCH)
301         #undef GRAS_THISARCH
302 #endif
303
304 #define GRAS_THISARCH 0
305
306  
307  /* Path to the addr2line tool */
308 #if defined(ADDR2LINE)
309         #undef ADDR2LINE
310 #endif
311
312 #if !defined(HAVE_VA_COPY)
313         #define HAVE_VA_COPY 1
314 #endif
315
316 /* This macro is not defined in borland stdarg.h include file, adds it. */
317 #define va_copy(dest,src)   ((dest)=(src))  
318
319 /* Predefined possible va_copy() implementation (id: ASP) */
320 #define __VA_COPY_USE_ASP(d, s) do { *(d) = *(s); } while (0)
321
322 /* Predefined possible va_copy() implementation (id: ASS) */
323 #define __VA_COPY_USE_ASS(d, s) do { (d) = (s); } while (0)
324
325 /* Predefined possible va_copy() implementation (id: C99) */
326 #define __VA_COPY_USE_C99(d, s) va_copy((d), (s))
327
328 /* Predefined possible va_copy() implementation (id: CPP) */
329 #define __VA_COPY_USE_CPP(d, s) memcpy((void *)(d), (void *)(s)), sizeof(*(s))
330
331 /* Predefined possible va_copy() implementation (id: CPS) */
332 #define __VA_COPY_USE_CPS(d, s) memcpy((void *)&(d), (void *)&(s)), sizeof((s))
333
334 /* Predefined possible va_copy() implementation (id: GCB) */
335 #define __VA_COPY_USE_GCB(d, s) __builtin_va_copy((d), (s))
336
337 /* Predefined possible va_copy() implementation (id: GCH) */
338 #define __VA_COPY_USE_GCH(d, s) __va_copy((d), (s))
339
340 /* Predefined possible va_copy() implementation (id: GCM) */
341 #define __VA_COPY_USE_GCM(d, s) VA_COPY((d), (s))
342
343
344 /* Optional va_copy() implementation activation */
345 #ifndef HAVE_VA_COPY
346 #define va_copy(d, s) __VA_COPY_USE(d, s)
347 #endif
348
349 /* xbt contexts are based on our threads implementation */
350 #ifndef CONTEXT_THREADS
351 #define CONTEXT_THREADS 1
352 #endif
353
354 /* xbt contexts are not based on ucontext */
355 #ifdef CONTEXT_UCONTEXT
356 #undef CONTEXT_UCONTEXT
357 #endif
358
359 /* Define to id of used va_copy() implementation */
360 #define __VA_COPY_USE __VA_COPY_USE_C99
361
362 #ifndef _XBT_CALL
363         #if defined(_XBT_DESIGNATED_DLL)
364                 #define _XBT_CALL __cdecl __export
365         #elif defined(_RTLDLL)
366                 #define  _XBT_CALL __cdecl __import
367         #else
368                 #define  _XBT_CALL __cdecl
369         #endif
370 #endif
371
372 /* auto enable thread safety and exceptions: */
373 #ifndef _CPPUNWIND
374         #define _XBT_HAS_NO_EXCEPTIONS
375 #endif
376
377 #if defined ( __MT__ ) && !defined (_NOTHREADS) && !defined (_REENTRANT)
378         #define _REENTRANT 1
379 #endif
380
381
382 /* For open, read etc. file operations. */
383 #include <io.h>
384 #include <fcntl.h>
385
386 /* For getpid() function. */
387 #include <process.h>
388
389 /* no unistd.h header file. */
390 #define YY_NO_UNISTD_H 
391 /*
392  * Replace winsock2.h,ws2tcpip.h and winsock.h header files */
393 #include <windows.h>
394
395 /* types */
396 typedef unsigned int uint32_t;
397
398 /* Choose setjmp as exception implementation */
399 #ifndef __EX_MCTX_SJLJ__
400 #define __EX_MCTX_SJLJ__
401 #endif 
402
403
404 typedef int ssize_t;
405
406 #endif /* #ifndef __XBT_VISUALC_COMPILER_CONFIG_H__ */