]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/json-spirit/dll-wins.patch
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / json-spirit / dll-wins.patch
1 diff --git a/.travis.yml b/.travis.yml
2 index e5b56eb..87f2926 100644
3 --- a/.travis.yml
4 +++ b/.travis.yml
5 @@ -14,4 +14,4 @@ script:
6 - cmake --build . --target all --
7
8 after_script:
9 - - ctest
10 + - ctest
11 diff --git a/CMakeLists.txt b/CMakeLists.txt
12 index fb24877..a10a49f 100755
13 --- a/CMakeLists.txt
14 +++ b/CMakeLists.txt
15 @@ -60,15 +60,17 @@ endif()
16
17 message(${CMAKE_INSTALL_INCLUDEDIR})
18
19 -
20 +
21 set(CPACK_PACKAGE_VERSION_MAJOR 4)
22 set(CPACK_PACKAGE_VERSION_MINOR 0)
23 set(CPACK_PACKAGE_VERSION_PATCH 8)
24 set(CPACK_PACKAGE_DESCRIPTION "A C++ JSON Parser/Generator Implemented with Boost Spirit")
25 include(CPack)
26 -
27 +
28 +set(EXPORT_HEADERS )
29 INSTALL(
30 FILES
31 + json_spirit/json_spirit_global.h
32 json_spirit/json_spirit.h
33 json_spirit/json_spirit_error_position.h
34 json_spirit/json_spirit_reader.h
35 @@ -80,4 +82,4 @@ INSTALL(
36 json_spirit/json_spirit_writer_template.h
37 json_spirit/json_spirit_writer_options.h
38 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/json_spirit)
39 -
40 +
41 diff --git a/json_spirit/CMakeLists.txt b/json_spirit/CMakeLists.txt
42 index 23da64c..10d4e2b 100755
43 --- a/json_spirit/CMakeLists.txt
44 +++ b/json_spirit/CMakeLists.txt
45 @@ -15,13 +15,19 @@ SET(JSON_SPIRIT_SRCS
46 FIND_PACKAGE(Boost 1.34 REQUIRED)
47 INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
48
49 -
50 +
51 OPTION(BUILD_STATIC_LIBS "Build static libraries" OFF)
52
53 if(BUILD_STATIC_LIBS)
54 ADD_LIBRARY(json_spirit STATIC ${JSON_SPIRIT_SRCS})
55 - install(TARGETS json_spirit ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
56 + install(TARGETS json_spirit ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
57 else(BUILD_STATIC_LIBS)
58 ADD_LIBRARY(json_spirit SHARED ${JSON_SPIRIT_SRCS})
59 - install(TARGETS json_spirit LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
60 + if(WIN32)
61 + install(TARGETS json_spirit RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
62 + install(TARGETS json_spirit ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
63 + else()
64 + install(TARGETS json_spirit LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
65 + endif()
66 +
67 endif(BUILD_STATIC_LIBS)
68 diff --git a/json_spirit/json_spirit_global.h b/json_spirit/json_spirit_global.h
69 new file mode 100644
70 index 0000000..07a7d2c
71 --- /dev/null
72 +++ b/json_spirit/json_spirit_global.h
73 @@ -0,0 +1,18 @@
74 +#ifndef JSON_SPIRIT_GLOBAL_H
75 +#define JSON_SPIRIT_GLOBAL_H
76 +
77 +#if (defined _WIN32) || (defined _WIN64)
78 + #define DECL_EXPORT __declspec(dllexport)
79 + #define DECL_IMPORT __declspec(dllimport)
80 +#else
81 + #define DECL_EXPORT
82 + #define DECL_IMPORT
83 +#endif
84 +
85 +#if defined(json_spirit_EXPORTS)
86 +# define json_spirit_EXPORT DECL_EXPORT
87 +#else
88 +# define json_spirit_EXPORT DECL_IMPORT
89 +#endif
90 +
91 +#endif
92 \ No newline at end of file
93 diff --git a/json_spirit/json_spirit_reader.h b/json_spirit/json_spirit_reader.h
94 index a6cfac7..50cc6f5 100755
95 --- a/json_spirit/json_spirit_reader.h
96 +++ b/json_spirit/json_spirit_reader.h
97 @@ -11,6 +11,7 @@
98 # pragma once
99 #endif
100
101 +#include "json_spirit_global.h"
102 #include "json_spirit_value.h"
103 #include "json_spirit_error_position.h"
104 #include <iostream>
105 @@ -20,43 +21,43 @@ namespace json_spirit
106 // functions to reads a JSON values
107
108 #ifdef JSON_SPIRIT_VALUE_ENABLED
109 - bool read( const std::string& s, Value& value );
110 - bool read( std::istream& is, Value& value );
111 - bool read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
112 + json_spirit_EXPORT bool read( const std::string& s, Value& value );
113 + json_spirit_EXPORT bool read( std::istream& is, Value& value );
114 + json_spirit_EXPORT bool read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
115
116 - void read_or_throw( const std::string& s, Value& value );
117 - void read_or_throw( std::istream& is, Value& value );
118 - void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
119 + json_spirit_EXPORT void read_or_throw( const std::string& s, Value& value );
120 + json_spirit_EXPORT void read_or_throw( std::istream& is, Value& value );
121 + json_spirit_EXPORT void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
122 #endif
123
124 #if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
125 - bool read( const std::wstring& s, wValue& value );
126 - bool read( std::wistream& is, wValue& value );
127 - bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );
128 + json_spirit_EXPORT bool read( const std::wstring& s, wValue& value );
129 + json_spirit_EXPORT bool read( std::wistream& is, wValue& value );
130 + json_spirit_EXPORT bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );
131
132 - void read_or_throw( const std::wstring& s, wValue& value );
133 - void read_or_throw( std::wistream& is, wValue& value );
134 - void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );
135 + json_spirit_EXPORT void read_or_throw( const std::wstring& s, wValue& value );
136 + json_spirit_EXPORT void read_or_throw( std::wistream& is, wValue& value );
137 + json_spirit_EXPORT void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );
138 #endif
139
140 #ifdef JSON_SPIRIT_MVALUE_ENABLED
141 - bool read( const std::string& s, mValue& value );
142 - bool read( std::istream& is, mValue& value );
143 - bool read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
144 + json_spirit_EXPORT bool read( const std::string& s, mValue& value );
145 + json_spirit_EXPORT bool read( std::istream& is, mValue& value );
146 + json_spirit_EXPORT bool read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
147
148 - void read_or_throw( const std::string& s, mValue& value );
149 - void read_or_throw( std::istream& is, mValue& value );
150 - void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
151 + json_spirit_EXPORT void read_or_throw( const std::string& s, mValue& value );
152 + json_spirit_EXPORT void read_or_throw( std::istream& is, mValue& value );
153 + json_spirit_EXPORT void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
154 #endif
155
156 #if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
157 - bool read( const std::wstring& s, wmValue& value );
158 - bool read( std::wistream& is, wmValue& value );
159 - bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );
160 + json_spirit_EXPORT bool read( const std::wstring& s, wmValue& value );
161 + json_spirit_EXPORT bool read( std::wistream& is, wmValue& value );
162 + json_spirit_EXPORT bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );
163
164 - void read_or_throw( const std::wstring& s, wmValue& value );
165 - void read_or_throw( std::wistream& is, wmValue& value );
166 - void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );
167 + json_spirit_EXPORT void read_or_throw( const std::wstring& s, wmValue& value );
168 + json_spirit_EXPORT void read_or_throw( std::wistream& is, wmValue& value );
169 + json_spirit_EXPORT void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );
170 #endif
171 }
172
173 diff --git a/json_spirit/json_spirit_writer.h b/json_spirit/json_spirit_writer.h
174 index 2722780..f60dc07 100755
175 --- a/json_spirit/json_spirit_writer.h
176 +++ b/json_spirit/json_spirit_writer.h
177 @@ -11,6 +11,7 @@
178 # pragma once
179 #endif
180
181 +#include "json_spirit_global.h"
182 #include "json_spirit_value.h"
183 #include "json_spirit_writer_options.h"
184 #include <iostream>
185 @@ -20,44 +21,44 @@ namespace json_spirit
186 // these functions to convert JSON Values to text
187
188 #ifdef JSON_SPIRIT_VALUE_ENABLED
189 - void write( const Value& value, std::ostream& os, unsigned int options = 0 );
190 - std::string write( const Value& value, unsigned int options = 0 );
191 + json_spirit_EXPORT void write( const Value& value, std::ostream& os, unsigned int options = 0 );
192 + json_spirit_EXPORT std::string write( const Value& value, unsigned int options = 0 );
193 #endif
194
195 #ifdef JSON_SPIRIT_MVALUE_ENABLED
196 - void write( const mValue& value, std::ostream& os, unsigned int options = 0 );
197 - std::string write( const mValue& value, unsigned int options = 0 );
198 + json_spirit_EXPORT void write( const mValue& value, std::ostream& os, unsigned int options = 0 );
199 + json_spirit_EXPORT std::string write( const mValue& value, unsigned int options = 0 );
200 #endif
201
202 #if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
203 - void write( const wValue& value, std::wostream& os, unsigned int options = 0 );
204 - std::wstring write( const wValue& value, unsigned int options = 0 );
205 + json_spirit_EXPORT void write( const wValue& value, std::wostream& os, unsigned int options = 0 );
206 + json_spirit_EXPORT std::wstring write( const wValue& value, unsigned int options = 0 );
207 #endif
208
209 #if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
210 - void write( const wmValue& value, std::wostream& os, unsigned int options = 0 );
211 - std::wstring write( const wmValue& value, unsigned int options = 0 );
212 + json_spirit_EXPORT void write( const wmValue& value, std::wostream& os, unsigned int options = 0 );
213 + json_spirit_EXPORT std::wstring write( const wmValue& value, unsigned int options = 0 );
214 #endif
215
216 // these "formatted" versions of the "write" functions are the equivalent of the above functions
217 // with option "pretty_print"
218
219 #ifdef JSON_SPIRIT_VALUE_ENABLED
220 - void write_formatted( const Value& value, std::ostream& os );
221 - std::string write_formatted( const Value& value );
222 + json_spirit_EXPORT void write_formatted( const Value& value, std::ostream& os );
223 + json_spirit_EXPORT std::string write_formatted( const Value& value );
224 #endif
225 #ifdef JSON_SPIRIT_MVALUE_ENABLED
226 - void write_formatted( const mValue& value, std::ostream& os );
227 - std::string write_formatted( const mValue& value );
228 + json_spirit_EXPORT void write_formatted( const mValue& value, std::ostream& os );
229 + json_spirit_EXPORT std::string write_formatted( const mValue& value );
230 #endif
231
232 #if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
233 - void write_formatted( const wValue& value, std::wostream& os );
234 - std::wstring write_formatted( const wValue& value );
235 + json_spirit_EXPORT void write_formatted( const wValue& value, std::wostream& os );
236 + json_spirit_EXPORT std::wstring write_formatted( const wValue& value );
237 #endif
238 #if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
239 - void write_formatted( const wmValue& value, std::wostream& os );
240 - std::wstring write_formatted( const wmValue& value );
241 + json_spirit_EXPORT void write_formatted( const wmValue& value, std::wostream& os );
242 + json_spirit_EXPORT std::wstring write_formatted( const wmValue& value );
243 #endif
244 }
245
246 diff --git a/json_test/json_spirit_value_test.cpp b/json_test/json_spirit_value_test.cpp
247 index e055dae..faab022 100755
248 --- a/json_test/json_spirit_value_test.cpp
249 +++ b/json_test/json_spirit_value_test.cpp
250 @@ -381,9 +381,15 @@ namespace
251 Container_constructor_runner()
252 {
253 vector< double > vd = list_of( 1.2 )( 1.3 ); test_container_constructor( vd );
254 + #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900)
255 + vector< int > vi = { 1 }; test_container_constructor( vi );
256 + vi = { 1, 2 }; test_container_constructor( vi );
257 + vi = { 1, 2, 3 }; test_container_constructor( vi );
258 + #else
259 vector< int > vi = list_of( 1 ); test_container_constructor( vi );
260 vi = list_of( 1 )( 2 ); test_container_constructor( vi );
261 vi = list_of( 1 )( 2 )( 3 ); test_container_constructor( vi );
262 + #endif
263 list< double > ld = list_of( 1.2 )( 1.3 ); test_container_constructor( ld );
264 list< int > li = list_of( 1 ); test_container_constructor( li );
265 li = list_of( 1 )( 2 ); test_container_constructor( li );
266 @@ -447,9 +453,15 @@ namespace
267 }
268
269 vector< double > vd = list_of( 1.2 )( 1.3 ); test_variant_array_constructor< double > ( vd );
270 + #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900)
271 + vector< int > vi = { 1 }; test_variant_array_constructor< int >( vi );
272 + vi = { 1, 2 }; test_variant_array_constructor< int >( vi );
273 + vi = { 1, 2, 3 }; test_variant_array_constructor< int >( vi );
274 + #else
275 vector< int > vi = list_of( 1 ); test_variant_array_constructor< int >( vi );
276 vi = list_of( 1 )( 2 ); test_variant_array_constructor< int >( vi );
277 vi = list_of( 1 )( 2 )( 3 ); test_variant_array_constructor< int >( vi );
278 + #endif
279 list< double > ld = list_of( 1.2 )( 1.3 ); test_variant_array_constructor< double >( ld );
280 list< int > li = list_of( 1 ); test_variant_array_constructor< int >( li );
281 li = list_of( 1 )( 2 ); test_variant_array_constructor< int >( li );