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 SIMGRID_VERSION 30599 /* 3.5.99, aka 3.6 svn */
22 /* take care of DLL usage madness */
24 #ifdef _XBT_DLL_EXPORT
27 #ifdef _XBT_DLL_STATIC
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__@
41 #cmakedefine __GNUC__ @__GNUC__@
46 /* Define to 1 if you have the `mmap' function. */
47 #cmakedefine HAVE_MMAP @HAVE_MMAP@
50 #undef SIMGRID_NEED_GETLINE
51 #undef SIMGRID_NEED_ASPRINTF
52 #undef SIMGRID_NEED_VASPRINTF
54 @simgrid_need_asprintf@
55 @simgrid_need_vasprintf@
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);
70 /* snprintf related functions */
71 /** @addtogroup XBT_str
73 /** @brief print to allocated string (reimplemented when not provided by the system)
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.
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);
86 /** @brief print to allocated string (reimplemented when not provided by the system)
90 #if defined(SIMGRID_NEED_VASPRINTF)||defined(DOXYGEN)
91 XBT_PUBLIC(int) vasprintf(char **ptr, const char *fmt, va_list ap);
93 /** @brief print to allocated string
95 * Works just like vasprintf(), but returns a pointer to the newly
96 * created string, or aborts on error.
98 XBT_PUBLIC(char *) bvprintf(const char *fmt, va_list ap);
99 /** @brief print to allocated string
101 * Works just like asprintf(), but returns a pointer to the newly
102 * created string, or aborts on error.
104 XBT_PUBLIC(char *) bprintf(const char *fmt, ...) _XBT_GNUC_PRINTF(1, 2);
107 /* Define if xbt contexts are based on our threads implementation or not */
108 #cmakedefine CONTEXT_THREADS @CONTEXT_THREADS@
110 /* Tracing SimGrid */
111 #cmakedefine HAVE_TRACING @HAVE_TRACING@
114 #cmakedefine HAVE_JEDULE @HAVE_JEDULE@
116 /* Tracking of latency bound */
117 #cmakedefine HAVE_LATENCY_BOUND_TRACKING @HAVE_LATENCY_BOUND_TRACKING@
120 #endif /* SIMGRID_PUBLIC_CONFIG_H */