annotate OrthancFramework/Resources/Patches/boost-1.85.0-emscripten.patch @ 5651:c4e33e0f907b

merge
author Alain Mazy <am@orthanc.team>
date Wed, 05 Jun 2024 11:04:37 +0200
parents 6045c696e86b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5628
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 diff -urEb boost_1_85_0.orig/libs/locale/src/boost/locale/shared/date_time.cpp boost_1_85_0/libs/locale/src/boost/locale/shared/date_time.cpp
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 --- boost_1_85_0.orig/libs/locale/src/boost/locale/shared/date_time.cpp 2024-05-16 20:54:25.516816710 +0200
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 +++ boost_1_85_0/libs/locale/src/boost/locale/shared/date_time.cpp 2024-05-16 20:55:09.144319528 +0200
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 @@ -12,8 +12,10 @@
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 #include <boost/locale/date_time.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 #include <boost/locale/formatting.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 #include <boost/core/exchange.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 -#include <boost/thread/locks.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 -#include <boost/thread/mutex.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 +#if !defined(__EMSCRIPTEN__)
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 +# include <boost/thread/locks.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 +# include <boost/thread/mutex.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 +#endif
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 #include <cmath>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 namespace boost { namespace locale {
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 @@ -400,6 +402,7 @@
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 return impl_->get_option(abstract_calendar::is_dst) != 0;
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 }
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 +#if !defined(__EMSCRIPTEN__)
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 namespace time_zone {
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 boost::mutex& tz_mutex()
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 {
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 @@ -422,6 +425,7 @@
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 return boost::exchange(tz_id(), new_id);
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 }
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 } // namespace time_zone
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 +#endif
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 }} // namespace boost::locale
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 diff -urEb boost_1_85_0.orig/libs/locale/src/boost/locale/shared/generator.cpp boost_1_85_0/libs/locale/src/boost/locale/shared/generator.cpp
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 --- boost_1_85_0.orig/libs/locale/src/boost/locale/shared/generator.cpp 2024-05-16 20:54:25.516816710 +0200
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 +++ boost_1_85_0/libs/locale/src/boost/locale/shared/generator.cpp 2024-05-16 20:56:20.231509636 +0200
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 @@ -7,8 +7,10 @@
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 #include <boost/locale/encoding.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 #include <boost/locale/generator.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 #include <boost/locale/localization_backend.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 -#include <boost/thread/locks.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 -#include <boost/thread/mutex.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 +#if !defined(__EMSCRIPTEN__)
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 +# include <boost/thread/locks.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 +# include <boost/thread/mutex.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 +#endif
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 #include <algorithm>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 #include <map>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 #include <vector>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 @@ -21,7 +23,9 @@
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 {}
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 mutable std::map<std::string, std::locale> cached;
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 +#if !defined(__EMSCRIPTEN__)
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 mutable boost::mutex cached_lock;
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 +#endif
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 category_t cats;
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 char_facet_t chars;
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 @@ -101,7 +105,9 @@
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 std::locale generator::generate(const std::locale& base, const std::string& id) const
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 {
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 if(d->caching_enabled) {
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 +#if !defined(__EMSCRIPTEN__)
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 boost::unique_lock<boost::mutex> guard(d->cached_lock);
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 +#endif
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 const auto p = d->cached.find(id);
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 if(p != d->cached.end())
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 return p->second;
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 @@ -126,7 +132,9 @@
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 result = backend->install(result, facet, char_facet_t::nochar);
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 }
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 if(d->caching_enabled) {
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 +#if !defined(__EMSCRIPTEN__)
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 boost::unique_lock<boost::mutex> guard(d->cached_lock);
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 +#endif
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 const auto p = d->cached.find(id);
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 if(p == d->cached.end())
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 d->cached[id] = result;
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 diff -urEb boost_1_85_0.orig/libs/locale/src/boost/locale/shared/localization_backend.cpp boost_1_85_0/libs/locale/src/boost/locale/shared/localization_backend.cpp
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 --- boost_1_85_0.orig/libs/locale/src/boost/locale/shared/localization_backend.cpp 2024-05-16 20:54:25.516816710 +0200
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 +++ boost_1_85_0/libs/locale/src/boost/locale/shared/localization_backend.cpp 2024-05-16 20:56:58.823070064 +0200
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 @@ -5,8 +5,10 @@
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 // https://www.boost.org/LICENSE_1_0.txt
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 #include <boost/locale/localization_backend.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 -#include <boost/thread/locks.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 -#include <boost/thread/mutex.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 +#if !defined(__EMSCRIPTEN__)
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 +# include <boost/thread/locks.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 +# include <boost/thread/mutex.hpp>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 +#endif
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 #include <functional>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 #include <memory>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 #include <vector>
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 @@ -211,11 +213,13 @@
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 return mgr;
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 }
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 +#if !defined(__EMSCRIPTEN__)
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 boost::mutex& localization_backend_manager_mutex()
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 {
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 static boost::mutex the_mutex;
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 return the_mutex;
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 }
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 +#endif
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 localization_backend_manager& localization_backend_manager_global()
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 {
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 static localization_backend_manager the_manager = make_default_backend_mgr();
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 @@ -225,12 +229,16 @@
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 localization_backend_manager localization_backend_manager::global()
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 {
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 +#if !defined(__EMSCRIPTEN__)
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 boost::unique_lock<boost::mutex> lock(localization_backend_manager_mutex());
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 +#endif
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 return localization_backend_manager_global();
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 }
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 localization_backend_manager localization_backend_manager::global(const localization_backend_manager& in)
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 {
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 +#if !defined(__EMSCRIPTEN__)
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 boost::unique_lock<boost::mutex> lock(localization_backend_manager_mutex());
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 +#endif
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 return exchange(localization_backend_manager_global(), in);
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 }
6045c696e86b upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125