3 /* simgrid_config.h - Results of the configure made visible to user code */
5 /* Copyright (c) 2009, 2010, 2011. Da SimGrid team. All rights reserved. */
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. */
10 #include "xbt/misc.h" /* XBT_PUBLIC */
12 #ifndef SIMGRID_PUBLIC_CONFIG_H
13 #define SIMGRID_PUBLIC_CONFIG_H
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)*/
20 #define MAKE_SIMGRID_VERSION(major, minor, patch) \
21 (100UL * (100UL * (major) + (minor)) + (patch))
23 #cmakedefine SIMGRID_VERSION_MAJOR @SIMGRID_VERSION_MAJOR@
24 #cmakedefine SIMGRID_VERSION_MINOR @SIMGRID_VERSION_MINOR@
25 #cmakedefine SIMGRID_VERSION_PATCH @SIMGRID_VERSION_PATCH@
27 #define SIMGRID_VERSION MAKE_SIMGRID_VERSION(SIMGRID_VERSION_MAJOR, \
28 SIMGRID_VERSION_MINOR, \
29 SIMGRID_VERSION_PATCH)
31 /* take care of DLL usage madness */
33 #ifdef _XBT_DLL_EXPORT
36 #ifdef _XBT_DLL_STATIC
43 #cmakedefine _XBT_WIN32 @_XBT_WIN32@ /*this variable is set if it is a windows platform*/
44 #cmakedefine _WIN32 @_WIN32@ /*this variable is set if it is a 32 bits windows platform*/
45 #cmakedefine _WIN64 @_WIN64@ /*this variable is set if it is a 64 bits windows platform*/
46 #cmakedefine __VISUALC__ @__VISUALC__@
47 #cmakedefine __BORLANDC__ @__BORLANDC__@
50 #cmakedefine __GNUC__ @__GNUC__@
55 /* Define to 1 if you have the `mmap' function. */
56 #cmakedefine HAVE_MMAP @HAVE_MMAP@
59 #undef SIMGRID_NEED_GETLINE
60 #undef SIMGRID_NEED_ASPRINTF
61 #undef SIMGRID_NEED_VASPRINTF
63 @simgrid_need_asprintf@
64 @simgrid_need_vasprintf@
66 /* Use that config to declare missing elements */
67 #ifdef SIMGRID_NEED_GETLINE
68 #include <stdlib.h> /* size_t */
69 #include <stdio.h> /* FILE* */
70 XBT_PUBLIC(long) getline(char **lineptr, size_t * n, FILE * stream);
79 /* snprintf related functions */
80 /** @addtogroup XBT_str
82 /** @brief print to allocated string (reimplemented when not provided by the system)
84 * The functions asprintf() and vasprintf() are analogues of
85 * sprintf() and vsprintf(), except that they allocate a string large
86 * enough to hold the output including the terminating null byte, and
87 * return a pointer to it via the first parameter. This pointer
88 * should be passed to free(3) to release the allocated storage when
89 * it is no longer needed.
91 #if defined(SIMGRID_NEED_ASPRINTF)||defined(DOXYGEN)
92 XBT_PUBLIC(int) asprintf(char **ptr, const char *fmt, /*args */
93 ...) _XBT_GNUC_PRINTF(2, 3);
95 /** @brief print to allocated string (reimplemented when not provided by the system)
99 #if defined(SIMGRID_NEED_VASPRINTF)||defined(DOXYGEN)
100 XBT_PUBLIC(int) vasprintf(char **ptr, const char *fmt, va_list ap);
102 /** @brief print to allocated string
104 * Works just like vasprintf(), but returns a pointer to the newly
105 * created string, or aborts on error.
107 XBT_PUBLIC(char *) bvprintf(const char *fmt, va_list ap);
108 /** @brief print to allocated string
110 * Works just like asprintf(), but returns a pointer to the newly
111 * created string, or aborts on error.
113 XBT_PUBLIC(char *) bprintf(const char *fmt, ...) _XBT_GNUC_PRINTF(1, 2);
116 /* Define if xbt contexts are based on our threads implementation or not */
117 #cmakedefine CONTEXT_THREADS @CONTEXT_THREADS@
119 /* Tracing SimGrid */
120 #cmakedefine HAVE_TRACING @HAVE_TRACING@
123 #cmakedefine HAVE_JEDULE @HAVE_JEDULE@
125 /* Tracking of latency bound */
126 #cmakedefine HAVE_LATENCY_BOUND_TRACKING @HAVE_LATENCY_BOUND_TRACKING@
128 /* If __thread is available */
129 #cmakedefine HAVE_THREAD_LOCAL_STORAGE @HAVE_THREAD_LOCAL_STORAGE@
133 #endif /* SIMGRID_PUBLIC_CONFIG_H */