Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove any reference to mergesort.
[simgrid.git] / include / simgrid_config.h.in
1 /* simgrid_config.h - Results of the configure made visible to user code    */
2
3 /* Copyright (c) 2009-2013. The SimGrid Team.
4    All rights reserved.                                                     */
5
6 /* This program is free software; you can redistribute it and/or modify it
7  * under the terms of the license (GNU LGPL) which comes with this package. */
8
9 #include "xbt/misc.h"           /* XBT_PUBLIC */
10 #include "xbt/dynar.h"          /* sg_commandline */
11
12 #ifndef SIMGRID_PUBLIC_CONFIG_H
13 #define SIMGRID_PUBLIC_CONFIG_H
14 SG_BEGIN_DECL()
15
16
17 /** Define the version numbers of the used header files. 
18     sg_version() can be used to retrieve the version of the dynamic library.
19     But actually, if these numbers don't match, SimGrid refuses to start (so you shouldn't have to care about sg_version() yourself) */
20
21 #define SIMGRID_VERSION_MAJOR @SIMGRID_VERSION_MAJOR@
22 #define SIMGRID_VERSION_MINOR @SIMGRID_VERSION_MINOR@
23 #define SIMGRID_VERSION_PATCH @SIMGRID_VERSION_PATCH@
24
25 #define SIMGRID_VERSION_STRING "@SIMGRID_VERSION_STRING@"
26
27 /* Version X.Y.Z will get version number XYZ: all digits concatenated without dots
28  * (with Y and Z must be on two positions)*/
29
30 #define MAKE_SIMGRID_VERSION(major, minor, patch)       \
31   (100UL * (100UL * (major) + (minor)) + (patch))
32 #define SIMGRID_VERSION MAKE_SIMGRID_VERSION(SIMGRID_VERSION_MAJOR, \
33                                              SIMGRID_VERSION_MINOR, \
34                                              SIMGRID_VERSION_PATCH)
35
36 /** Retrieves the version numbers of the used dynamic library (so, DLL or dynlib) , while
37     SIMGRID_VERSION_MAJOR and friends give the version numbers of the used header files */
38 XBT_PUBLIC(void) sg_version(int *major,int *minor,int *patch);
39
40 /** Contains all the parameters we got from the command line */
41 XBT_PUBLIC_DATA(xbt_dynar_t) sg_cmdline;
42
43 /* take care of DLL usage madness */
44
45 #ifdef _XBT_DLL_EXPORT
46         #ifndef DLL_EXPORT
47                 #define DLL_EXPORT
48         #endif
49 #else
50         #ifdef _XBT_DLL_STATIC
51                 #ifndef DLL_STATIC
52                         #define DLL_STATIC
53                 #endif
54         #else
55                 #ifndef DLL_EXPORT
56                         #define DLL_IMPORT
57                 #endif
58         #endif
59 #endif
60
61 #cmakedefine _XBT_WIN32 @_XBT_WIN32@    /*this variable is set if it is a windows platform*/
62 #cmakedefine _WIN32 @_WIN32@                    /*this variable is set if it is a 32 bits windows platform*/
63 #cmakedefine _WIN64 @_WIN64@                    /*this variable is set if it is a 64 bits  windows platform*/
64 #cmakedefine __VISUALC__ @__VISUALC__@
65 #cmakedefine __BORLANDC__ @__BORLANDC__@
66 #ifdef _XBT_WIN32
67         #ifndef __GNUC__
68                 #cmakedefine __GNUC__ @__GNUC__@
69         #endif
70 #endif
71
72
73 /* Define to 1 if you have the `mmap' function. */
74 #cmakedefine HAVE_MMAP @HAVE_MMAP@
75
76 /* Get the config */
77 #undef SIMGRID_NEED_ASPRINTF
78 #undef SIMGRID_NEED_VASPRINTF
79 @simgrid_need_asprintf@
80 @simgrid_need_vasprintf@
81
82 #include <stdarg.h>
83
84 /* snprintf related functions */
85 /** @addtogroup XBT_str
86   * @{ */
87 /** @brief print to allocated string (reimplemented when not provided by the system)
88  *
89  * The functions asprintf() and vasprintf() are analogues of
90  * sprintf() and vsprintf(), except that they allocate a string large
91  * enough to hold the output including the terminating null byte, and
92  * return a pointer to it via the first parameter.  This pointer
93  * should be passed to free(3) to release the allocated storage when
94  * it is no longer needed.
95  */
96 #if defined(SIMGRID_NEED_ASPRINTF)||defined(DOXYGEN)
97 XBT_PUBLIC(int) asprintf(char **ptr, const char *fmt,   /*args */
98                          ...) _XBT_GNUC_PRINTF(2, 3);
99 #endif
100 /** @brief print to allocated string (reimplemented when not provided by the system)
101  *
102  * See asprintf()
103  */
104 #if defined(SIMGRID_NEED_VASPRINTF)||defined(DOXYGEN)
105 XBT_PUBLIC(int) vasprintf(char **ptr, const char *fmt, va_list ap);
106 #endif
107 /** @brief print to allocated string
108  *
109  * Works just like vasprintf(), but returns a pointer to the newly
110  * created string, or aborts on error.
111  */
112 XBT_PUBLIC(char *) bvprintf(const char *fmt, va_list ap);
113 /** @brief print to allocated string
114  *
115  * Works just like asprintf(), but returns a pointer to the newly
116  * created string, or aborts on error.
117  */
118 XBT_PUBLIC(char *) bprintf(const char *fmt, ...) _XBT_GNUC_PRINTF(1, 2);
119 /** @} */
120
121 /* Whether mallocators were enabled in ccmake or not. */
122 #define MALLOCATOR_COMPILED_IN @MALLOCATOR_IS_WANTED@
123
124 /* Define if xbt contexts are based on our threads implementation or not */
125 #cmakedefine CONTEXT_THREADS @CONTEXT_THREADS@
126
127 /* Tracing SimGrid */
128 #cmakedefine HAVE_TRACING @HAVE_TRACING@
129
130 /* Jedule output  */
131 #cmakedefine HAVE_JEDULE @HAVE_JEDULE@
132
133 /* Tracking of latency bound */
134 #cmakedefine HAVE_LATENCY_BOUND_TRACKING @HAVE_LATENCY_BOUND_TRACKING@
135
136 /* If __thread is available */
137 #cmakedefine HAVE_THREAD_LOCAL_STORAGE @HAVE_THREAD_LOCAL_STORAGE@
138
139 /* If Model-Checking support was requested */
140 #cmakedefine HAVE_MC @HAVE_MC@
141
142 SG_END_DECL()
143 #endif /* SIMGRID_PUBLIC_CONFIG_H */