]> gerrit.simantics Code Review - simantics/fmil.git/blob - org.simantics.fmil.core/native/FMUSimulator/include/linux/fmilib_config.h
Switch to full JavaSE-11+ compatibility
[simantics/fmil.git] / org.simantics.fmil.core / native / FMUSimulator / include / linux / fmilib_config.h
1 /*
2     Copyright (C) 2012 Modelon AB
3
4     This program is free software: you can redistribute it and/or modify
5     it under the terms of the BSD style license.
6
7      This program is distributed in the hope that it will be useful,
8     but WITHOUT ANY WARRANTY; without even the implied warranty of
9     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10     FMILIB_License.txt file for more details.
11
12     You should have received a copy of the FMILIB_License.txt file
13     along with this program. If not, contact Modelon AB <http://www.modelon.com>.
14 */
15
16 #ifndef CONFIG_FMILIB_H_
17 #define CONFIG_FMILIB_H_
18
19 /** \file fmilib_config.h
20         \brief Library configuration file generated by the build system. 
21 */
22
23 #ifndef WIN32
24 /* #undef WIN32 */
25 #ifdef WIN32
26 /** \def WIN32
27         \brief WIN32 is used to identify Windows OS (set on both Win32 and Win64) 
28 */
29 #endif
30 #endif
31
32 /* #undef MINGW */
33 #ifdef MINGW
34 /** \def MINGW
35         \brief MINGW is used to identify MSYS/MinGW environment 
36 */
37 #endif
38
39 #ifndef CMAKE_INTDIR
40 #define CMAKE_INTDIR "."
41 /** \def CMAKE_INTDIR
42         \brief The macro #CMAKE_INTDIR gives intermediate directory for the current configuration (Debug/Release). 
43
44 It is redefined to "." for Makefile based build environments. Otherwise is set by MSVC. */
45 #endif
46
47 /** \brief Platform folder separator */
48 #define FMI_FILE_SEP "/"        
49
50 /** \brief DLL file name suffix(.so, .dll, ...) */
51 #define FMI_DLL_EXT ".so" 
52
53 /** \brief Folder name inside FMU in which the DLL is found for this platform */
54 #define FMI_PLATFORM "linux64"
55
56 /** \brief Folder name inside FMU where binaries are */
57 #define FMI_BINARIES "binaries"
58 /** \brief Model description XML file name */
59 #define FMI_MODEL_DESCRIPTION_XML "modelDescription.xml"
60
61 /* #undef FMILIB_STATIC_LIB_ONLY */
62 #ifdef FMILIB_STATIC_LIB_ONLY
63 /** 
64 \def FMILIB_STATIC_LIB_ONLY
65 \brief The macro #FMILIB_STATIC_LIB_ONLY is defined if no fmilib_shared is build. */
66 #endif
67
68 #ifndef FMILIB_STATIC_LIB_ONLY
69  #if defined WIN32
70   #ifdef FMILIB_BUILDING_LIBRARY
71     #if 0 /* defined(__GNUC__)  MSYS currently does not support visibility attribute */ 
72       #define FMILIB_EXPORT __attribute__ ((dllexport))
73     #else
74                 /* Note: actually gcc seems to also supports this syntax. */
75       #define FMILIB_EXPORT __declspec(dllexport) 
76     #endif
77   #else
78     #if 0 /* defined(__GNUC__) MSYS currently does not support visibility attribute  */
79       #define FMILIB_EXPORT __attribute__ ((dllimport))
80     #else
81                 /* Note: actually gcc seems to also supports this syntax. */
82       #define FMILIB_EXPORT __declspec(dllimport)
83     #endif
84   #endif
85   #define FMILIB_PRIVATE
86  #else
87   #if __GNUC__ >= 4
88     #define FMILIB_EXPORT __attribute__ ((visibility ("default")))
89     #define FMILIB_PRIVATE  __attribute__ ((visibility ("hidden")))
90   #else
91     #define FMILIB_EXPORT
92     #define FMILIB_PRIVATE
93   #endif
94  #endif
95 #else
96   #if __GNUC__ >= 4
97     #define FMILIB_EXPORT __attribute__ ((visibility ("default")))
98     #define FMILIB_PRIVATE  __attribute__ ((visibility ("hidden")))
99   #else
100     #define FMILIB_EXPORT
101     #define FMILIB_PRIVATE
102   #endif
103 #endif
104
105 /** \def FMILIB_EXPORT
106         \brief Used to declare the public API of the library needed for dynamic linking. 
107         \def FMILIB_PRIVATE
108         \brief Intended for declaration of the private library functions.
109 */
110
111 /* #undef FMILIB_ENABLE_LOG_LEVEL_DEBUG */
112 #ifndef FMILIB_ENABLE_LOG_LEVEL_DEBUG
113 /* Just for doxygen */
114 #define FMILIB_ENABLE_LOG_LEVEL_DEBUG
115 #undef FMILIB_ENABLE_LOG_LEVEL_DEBUG
116 #endif
117 /** 
118 \def FMILIB_ENABLE_LOG_LEVEL_DEBUG
119 \brief Activates debug level log messages. If not defined the debug messages are compiled out. 
120 */
121
122 #if defined _MSC_VER
123         #define FMILIB_SIZET_FORMAT "%Iu"
124 #else 
125         #define FMILIB_SIZET_FORMAT "%zu"
126 #endif
127
128 /* #undef FMILIB_GENERATE_BUILD_STAMP */
129 #ifndef FMILIB_GENERATE_BUILD_STAMP
130 /* Just for Doxygen */
131 #define FMILIB_GENERATE_BUILD_STAMP
132 #undef FMILIB_GENERATE_BUILD_STAMP
133 #endif
134 /** 
135 \def FMILIB_GENERATE_BUILD_STAMP
136 \brief Generate build-stamp file and enable fmilib_get_build_stamp(). 
137 */
138
139 #ifdef FMILIB_GENERATE_BUILD_STAMP
140 #ifdef __cplusplus
141 extern "C" {
142 #endif
143
144 /** \brief Get the library build stamp. 
145         \return A string giving SVN revision and build time for the library.
146         
147         The function is only active if the library was configured with #FMILIB_GENERATE_BUILD_STAMP ON
148 */
149 FMILIB_EXPORT const char* fmilib_get_build_stamp(void);
150 #ifdef __cplusplus
151 }
152 #endif
153 #endif
154
155 /* #undef HAVE_VA_COPY */
156 #define HAVE___VA_COPY
157
158 #define HAVE_VSNPRINTF
159 #ifdef HAVE_VSNPRINTF
160 #define jm_rpl_vsnprintf vsnprintf
161 #endif
162
163 #endif