Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Allow MSG_process_cleanup(p) to be called by other processes than p
[simgrid.git] / include / simgrid_config.h.in
1 /* $Id$ */
2
3 /* simgrid_config.h - Results of the configure made visible to user code    */
4
5 /* Copyright (c) 2009, 2010, 2011. Da SimGrid team. All rights reserved.    */
6
7 /* This program is free software; you can redistribute it and/or modify it
8  * under the terms of the license (GNU LGPL) which comes with this package. */
9
10 #include "xbt/misc.h"           /* XBT_PUBLIC */
11
12 #ifndef SIMGRID_PUBLIC_CONFIG_H
13 #define SIMGRID_PUBLIC_CONFIG_H
14 SG_BEGIN_DECL()
15
16
17 /* Version X.Y.Z will get version number XYZ: all digits concatenated without dots
18  * (with Y and Z must be on two positions)*/
19
20 #define SIMGRID_VERSION 30599 /* 3.5.99, aka 3.6 svn */
21
22 /* take care of DLL usage madness */
23
24 #ifdef _XBT_DLL_EXPORT
25         #define DLL_EXPORT
26 #else
27         #ifdef _XBT_DLL_STATIC
28                 #define DLL_STATIC
29         #else
30                 #define DLL_IMPORT
31         #endif
32 #endif
33
34 #cmakedefine _XBT_WIN32 @_XBT_WIN32@    /*this variable is set if it is a windows platform*/
35 #cmakedefine _WIN32 @_WIN32@                    /*this variable is set if it is a 32 bits windows platform*/
36 #cmakedefine _WIN64 @_WIN64@                    /*this variable is set if it is a 64 bits  windows platform*/
37 #cmakedefine __VISUALC__ @__VISUALC__@
38 #cmakedefine __BORLANDC__ @__BORLANDC__@
39 #ifdef _XBT_WIN32
40         #ifndef __GNUC__
41                 #cmakedefine __GNUC__ @__GNUC__@
42         #endif
43 #endif
44
45
46 /* Define to 1 if you have the `mmap' function. */
47 #cmakedefine HAVE_MMAP @HAVE_MMAP@
48
49 /* Get the config */
50 #undef SIMGRID_NEED_GETLINE
51 #undef SIMGRID_NEED_ASPRINTF
52 #undef SIMGRID_NEED_VASPRINTF
53 @need_getline@
54 @simgrid_need_asprintf@
55 @simgrid_need_vasprintf@
56
57 /* Use that config to declare missing elements */
58 #ifdef SIMGRID_NEED_GETLINE
59 #include <stdlib.h> /* size_t */
60 #include <stdio.h>  /* FILE*  */
61 XBT_PUBLIC(long) getline(char **lineptr, size_t * n, FILE * stream);
62 #else
63 #ifndef _GNU_SOURCE
64         #define _GNU_SOURCE
65 #endif
66 #include <stdio.h>
67 #endif
68 #include <stdarg.h>
69
70 /* snprintf related functions */
71 /** @addtogroup XBT_str
72   * @{ */
73 /** @brief print to allocated string (reimplemented when not provided by the system)
74  *
75  * The functions asprintf() and vasprintf() are analogues of
76  * sprintf() and vsprintf(), except that they allocate a string large
77  * enough to hold the output including the terminating null byte, and
78  * return a pointer to it via the first parameter.  This pointer
79  * should be passed to free(3) to release the allocated storage when
80  * it is no longer needed.
81  */
82 #if defined(SIMGRID_NEED_ASPRINTF)||defined(DOXYGEN)
83 XBT_PUBLIC(int) asprintf(char **ptr, const char *fmt,   /*args */
84                          ...) _XBT_GNUC_PRINTF(2, 3);
85 #endif
86 /** @brief print to allocated string (reimplemented when not provided by the system)
87  *
88  * See asprintf()
89  */
90 #if defined(SIMGRID_NEED_VASPRINTF)||defined(DOXYGEN)
91 XBT_PUBLIC(int) vasprintf(char **ptr, const char *fmt, va_list ap);
92 #endif
93 /** @brief print to allocated string
94  *
95  * Works just like vasprintf(), but returns a pointer to the newly
96  * created string, or aborts on error.
97  */
98 XBT_PUBLIC(char *) bvprintf(const char *fmt, va_list ap);
99 /** @brief print to allocated string
100  *
101  * Works just like asprintf(), but returns a pointer to the newly
102  * created string, or aborts on error.
103  */
104 XBT_PUBLIC(char *) bprintf(const char *fmt, ...) _XBT_GNUC_PRINTF(1, 2);
105 /** @} */
106
107 /* Define if xbt contexts are based on our threads implementation or not */
108 #cmakedefine CONTEXT_THREADS @CONTEXT_THREADS@
109
110 /* Tracing SimGrid */
111 #cmakedefine HAVE_TRACING @HAVE_TRACING@
112
113 /* Jedule output  */
114 #cmakedefine HAVE_JEDULE @HAVE_JEDULE@
115
116 /* Tracking of latency bound */
117 #cmakedefine HAVE_LATENCY_BOUND_TRACKING @HAVE_LATENCY_BOUND_TRACKING@
118
119 SG_END_DECL()
120 #endif /* SIMGRID_PUBLIC_CONFIG_H */