Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
PCRE is installed on /usr/lib
[simgrid.git] / include / simgrid_config.h.in
1 /* $Id$ */
2
3 /* simgrid_config.h - Results of the configure made visible to user code    */
4
5 /* Copyright (c) 2009, Da SimGrid team. All rights reserved.                */
6
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. */
9
10 #include "xbt/misc.h"           /* XBT_PUBLIC */
11
12 #ifdef _XBT_DLL_EXPORT
13         #define DLL_EXPORT
14 #else
15         #ifdef _XBT_DLL_STATIC
16                 #define DLL_STATIC
17         #else
18                 #define DLL_IMPORT
19         #endif
20 #endif
21
22 #cmakedefine _XBT_WIN32 @_XBT_WIN32@    /*this variable is set if it is a windows platform*/
23 #cmakedefine _WIN32 @_WIN32@                    /*this variable is set if it is a 32 bits windows platform*/
24 #cmakedefine _WIN64 @_WIN64@                    /*this variable is set if it is a 64 bits  windows platform*/
25 #cmakedefine __VISUALC__ @__VISUALC__@
26 #cmakedefine __BORLANDC__ @__BORLANDC__@
27 #ifdef _XBT_WIN32
28         #ifndef __GNUC__
29                 #cmakedefine __GNUC__ @__GNUC__@
30         #endif
31 #endif
32
33 #ifndef SIMGRID_PUBLIC_CONFIG_H
34 #define SIMGRID_PUBLIC_CONFIG_H
35 SG_BEGIN_DECL()
36
37 /* Define to 1 if you have the `mmap' function. */
38 #cmakedefine HAVE_MMAP @HAVE_MMAP@
39
40 /* Get the config */
41 #undef SIMGRID_NEED_GETLINE
42 #undef SIMGRID_NEED_ASPRINTF
43 #undef SIMGRID_NEED_VASPRINTF
44 @need_getline@
45 @simgrid_need_asprintf@
46 @simgrid_need_vasprintf@
47
48 /* Use that config to declare missing elements */
49 #ifdef SIMGRID_NEED_GETLINE
50 #include <stdlib.h> /* size_t */
51 #include <stdio.h>  /* FILE*  */
52 XBT_PUBLIC(long) getline(char **lineptr, size_t * n, FILE * stream);
53 #else
54 #ifndef _GNU_SOURCE
55         #define _GNU_SOURCE
56 #endif
57 #include <stdio.h>
58 #endif
59 #include <stdarg.h>
60
61 /* snprintf related functions */
62 /** @addtogroup XBT_str
63   * @{ */
64 /** @brief print to allocated string (reimplemented when not provided by the system)
65  *
66  * The functions asprintf() and vasprintf() are analogues of
67  * sprintf() and vsprintf(), except that they allocate a string large
68  * enough to hold the output including the terminating null byte, and
69  * return a pointer to it via the first parameter.  This pointer
70  * should be passed to free(3) to release the allocated storage when
71  * it is no longer needed.
72  */
73 #if defined(SIMGRID_NEED_ASPRINTF)||defined(DOXYGEN)
74 XBT_PUBLIC(int) asprintf(char **ptr, const char *fmt,   /*args */
75                          ...) _XBT_GNUC_PRINTF(2, 3);
76 #endif
77 /** @brief print to allocated string (reimplemented when not provided by the system)
78  *
79  * See asprintf()
80  */
81 #if defined(SIMGRID_NEED_VASPRINTF)||defined(DOXYGEN)
82 XBT_PUBLIC(int) vasprintf(char **ptr, const char *fmt, va_list ap);
83 #endif
84 /** @brief print to allocated string
85  *
86  * Works just like vasprintf(), but returns a pointer to the newly
87  * created string, or aborts on error.
88  */
89 XBT_PUBLIC(char *) bvprintf(const char *fmt, va_list ap);
90 /** @brief print to allocated string
91  *
92  * Works just like asprintf(), but returns a pointer to the newly
93  * created string, or aborts on error.
94  */
95 XBT_PUBLIC(char *) bprintf(const char *fmt, ...) _XBT_GNUC_PRINTF(1, 2);
96 /** @} */
97
98 /* Tracing SimGrid */
99 #cmakedefine HAVE_TRACING @HAVE_TRACING@
100
101 /* Tracking of latency bound */
102 #cmakedefine HAVE_LATENCY_BOUND_TRACKING @HAVE_LATENCY_BOUND_TRACKING@
103
104 SG_END_DECL()
105 #endif /* SIMGRID_PUBLIC_CONFIG_H */