1 /* simgrid_config.h - Results of the configure made visible to user code */
3 /* Copyright (c) 2009, 2010, 2011. Da SimGrid team. All rights reserved. */
5 /* This program is free software; you can redistribute it and/or modify it
6 * under the terms of the license (GNU LGPL) which comes with this package. */
8 #include "xbt/misc.h" /* XBT_PUBLIC */
10 #ifndef SIMGRID_PUBLIC_CONFIG_H
11 #define SIMGRID_PUBLIC_CONFIG_H
15 /* Version X.Y.Z will get version number XYZ: all digits concatenated without dots
16 * (with Y and Z must be on two positions)*/
18 #define MAKE_SIMGRID_VERSION(major, minor, patch) \
19 (100UL * (100UL * (major) + (minor)) + (patch))
21 #define SIMGRID_VERSION_MAJOR @SIMGRID_VERSION_MAJOR@
22 #define SIMGRID_VERSION_MINOR @SIMGRID_VERSION_MINOR@
23 #define SIMGRID_VERSION_PATCH @SIMGRID_VERSION_PATCH@
25 #define SIMGRID_VERSION MAKE_SIMGRID_VERSION(SIMGRID_VERSION_MAJOR, \
26 SIMGRID_VERSION_MINOR, \
27 SIMGRID_VERSION_PATCH)
29 /* take care of DLL usage madness */
31 #ifdef _XBT_DLL_EXPORT
36 #ifdef _XBT_DLL_STATIC
47 #cmakedefine _XBT_WIN32 @_XBT_WIN32@ /*this variable is set if it is a windows platform*/
48 #cmakedefine _WIN32 @_WIN32@ /*this variable is set if it is a 32 bits windows platform*/
49 #cmakedefine _WIN64 @_WIN64@ /*this variable is set if it is a 64 bits windows platform*/
50 #cmakedefine __VISUALC__ @__VISUALC__@
51 #cmakedefine __BORLANDC__ @__BORLANDC__@
54 #cmakedefine __GNUC__ @__GNUC__@
59 /* Define to 1 if you have the `mmap' function. */
60 #cmakedefine HAVE_MMAP @HAVE_MMAP@
63 #undef SIMGRID_NEED_GETLINE
64 #undef SIMGRID_NEED_ASPRINTF
65 #undef SIMGRID_NEED_VASPRINTF
67 @simgrid_need_asprintf@
68 @simgrid_need_vasprintf@
70 /* Use that config to declare missing elements */
71 #ifdef SIMGRID_NEED_GETLINE
72 #include <stdlib.h> /* size_t */
73 #include <stdio.h> /* FILE* */
74 XBT_PUBLIC(long) getline(char **lineptr, size_t * n, FILE * stream);
83 /* snprintf related functions */
84 /** @addtogroup XBT_str
86 /** @brief print to allocated string (reimplemented when not provided by the system)
88 * The functions asprintf() and vasprintf() are analogues of
89 * sprintf() and vsprintf(), except that they allocate a string large
90 * enough to hold the output including the terminating null byte, and
91 * return a pointer to it via the first parameter. This pointer
92 * should be passed to free(3) to release the allocated storage when
93 * it is no longer needed.
95 #if defined(SIMGRID_NEED_ASPRINTF)||defined(DOXYGEN)
96 XBT_PUBLIC(int) asprintf(char **ptr, const char *fmt, /*args */
97 ...) _XBT_GNUC_PRINTF(2, 3);
99 /** @brief print to allocated string (reimplemented when not provided by the system)
103 #if defined(SIMGRID_NEED_VASPRINTF)||defined(DOXYGEN)
104 XBT_PUBLIC(int) vasprintf(char **ptr, const char *fmt, va_list ap);
106 /** @brief print to allocated string
108 * Works just like vasprintf(), but returns a pointer to the newly
109 * created string, or aborts on error.
111 XBT_PUBLIC(char *) bvprintf(const char *fmt, va_list ap);
112 /** @brief print to allocated string
114 * Works just like asprintf(), but returns a pointer to the newly
115 * created string, or aborts on error.
117 XBT_PUBLIC(char *) bprintf(const char *fmt, ...) _XBT_GNUC_PRINTF(1, 2);
120 /* Define if xbt contexts are based on our threads implementation or not */
121 #cmakedefine CONTEXT_THREADS @CONTEXT_THREADS@
123 /* Tracing SimGrid */
124 #cmakedefine HAVE_TRACING @HAVE_TRACING@
127 #cmakedefine HAVE_JEDULE @HAVE_JEDULE@
129 /* Tracking of latency bound */
130 #cmakedefine HAVE_LATENCY_BOUND_TRACKING @HAVE_LATENCY_BOUND_TRACKING@
132 /* If __thread is available */
133 #cmakedefine HAVE_THREAD_LOCAL_STORAGE @HAVE_THREAD_LOCAL_STORAGE@
135 /* If Model-Checking support was requested */
136 #cmakedefine HAVE_MC @HAVE_MC@
139 #endif /* SIMGRID_PUBLIC_CONFIG_H */