Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill old CVS $Id$ lines.
[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, 2010, 2011. Da SimGrid team. All rights reserved.    */
4
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. */
7
8 #include "xbt/misc.h"           /* XBT_PUBLIC */
9
10 #ifndef SIMGRID_PUBLIC_CONFIG_H
11 #define SIMGRID_PUBLIC_CONFIG_H
12 SG_BEGIN_DECL()
13
14
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)*/
17
18 #define MAKE_SIMGRID_VERSION(major, minor, patch)       \
19   (100UL * (100UL * (major) + (minor)) + (patch))
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 MAKE_SIMGRID_VERSION(SIMGRID_VERSION_MAJOR, \
26                                              SIMGRID_VERSION_MINOR, \
27                                              SIMGRID_VERSION_PATCH)
28
29 /* take care of DLL usage madness */
30
31 #ifdef _XBT_DLL_EXPORT
32         #define DLL_EXPORT
33 #else
34         #ifdef _XBT_DLL_STATIC
35                 #define DLL_STATIC
36         #else
37                 #define DLL_IMPORT
38         #endif
39 #endif
40
41 #cmakedefine _XBT_WIN32 @_XBT_WIN32@    /*this variable is set if it is a windows platform*/
42 #cmakedefine _WIN32 @_WIN32@                    /*this variable is set if it is a 32 bits windows platform*/
43 #cmakedefine _WIN64 @_WIN64@                    /*this variable is set if it is a 64 bits  windows platform*/
44 #cmakedefine __VISUALC__ @__VISUALC__@
45 #cmakedefine __BORLANDC__ @__BORLANDC__@
46 #ifdef _XBT_WIN32
47         #ifndef __GNUC__
48                 #cmakedefine __GNUC__ @__GNUC__@
49         #endif
50 #endif
51
52
53 /* Define to 1 if you have the `mmap' function. */
54 #cmakedefine HAVE_MMAP @HAVE_MMAP@
55
56 /* Get the config */
57 #undef SIMGRID_NEED_GETLINE
58 #undef SIMGRID_NEED_ASPRINTF
59 #undef SIMGRID_NEED_VASPRINTF
60 @need_getline@
61 @simgrid_need_asprintf@
62 @simgrid_need_vasprintf@
63
64 /* Use that config to declare missing elements */
65 #ifdef SIMGRID_NEED_GETLINE
66 #include <stdlib.h> /* size_t */
67 #include <stdio.h>  /* FILE*  */
68 XBT_PUBLIC(long) getline(char **lineptr, size_t * n, FILE * stream);
69 #else
70 #ifndef _GNU_SOURCE
71         #define _GNU_SOURCE
72 #endif
73 #include <stdio.h>
74 #endif
75 #include <stdarg.h>
76
77 /* snprintf related functions */
78 /** @addtogroup XBT_str
79   * @{ */
80 /** @brief print to allocated string (reimplemented when not provided by the system)
81  *
82  * The functions asprintf() and vasprintf() are analogues of
83  * sprintf() and vsprintf(), except that they allocate a string large
84  * enough to hold the output including the terminating null byte, and
85  * return a pointer to it via the first parameter.  This pointer
86  * should be passed to free(3) to release the allocated storage when
87  * it is no longer needed.
88  */
89 #if defined(SIMGRID_NEED_ASPRINTF)||defined(DOXYGEN)
90 XBT_PUBLIC(int) asprintf(char **ptr, const char *fmt,   /*args */
91                          ...) _XBT_GNUC_PRINTF(2, 3);
92 #endif
93 /** @brief print to allocated string (reimplemented when not provided by the system)
94  *
95  * See asprintf()
96  */
97 #if defined(SIMGRID_NEED_VASPRINTF)||defined(DOXYGEN)
98 XBT_PUBLIC(int) vasprintf(char **ptr, const char *fmt, va_list ap);
99 #endif
100 /** @brief print to allocated string
101  *
102  * Works just like vasprintf(), but returns a pointer to the newly
103  * created string, or aborts on error.
104  */
105 XBT_PUBLIC(char *) bvprintf(const char *fmt, va_list ap);
106 /** @brief print to allocated string
107  *
108  * Works just like asprintf(), but returns a pointer to the newly
109  * created string, or aborts on error.
110  */
111 XBT_PUBLIC(char *) bprintf(const char *fmt, ...) _XBT_GNUC_PRINTF(1, 2);
112 /** @} */
113
114 /* Define if xbt contexts are based on our threads implementation or not */
115 #cmakedefine CONTEXT_THREADS @CONTEXT_THREADS@
116
117 /* Tracing SimGrid */
118 #cmakedefine HAVE_TRACING @HAVE_TRACING@
119
120 /* Jedule output  */
121 #cmakedefine HAVE_JEDULE @HAVE_JEDULE@
122
123 /* Tracking of latency bound */
124 #cmakedefine HAVE_LATENCY_BOUND_TRACKING @HAVE_LATENCY_BOUND_TRACKING@
125
126 /* If __thread is available */
127 #cmakedefine HAVE_THREAD_LOCAL_STORAGE @HAVE_THREAD_LOCAL_STORAGE@
128
129
130 SG_END_DECL()
131 #endif /* SIMGRID_PUBLIC_CONFIG_H */