Skip to content

Commit 0857a4b

Browse files
authored
Patch Tuesday for November 2024 (microsoft#42165)
1 parent 0d9926a commit 0857a4b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+463
-364
lines changed

ports/chartdir/vcpkg.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "chartdir",
33
"version": "7.0.0",
4-
"port-version": 7,
4+
"port-version": 8,
55
"description": "ChartDirector is a powerful chart component for creating professional looking charts for web and windows applications.",
66
"homepage": "https://www.advsofteng.com/",
77
"license": null,
8-
"supports": "!(arm & windows) & !uwp"
8+
"supports": "(windows & !uwp & (x86 | x64)) | osx | linux"
99
}

ports/freeopcua/boost-1.70.patch

Lines changed: 0 additions & 29 deletions
This file was deleted.

ports/freeopcua/include_asio_first.patch renamed to ports/freeopcua/boost-compatibility.patch

Lines changed: 78 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
diff --git a/include/opc/ua/services/services.h b/include/opc/ua/services/services.h
2+
index f138831..4732a59 100644
3+
--- a/include/opc/ua/services/services.h
4+
+++ b/include/opc/ua/services/services.h
5+
@@ -26,20 +26,7 @@
6+
#include <vector>
7+
8+
#include <boost/version.hpp>
9+
-
10+
-
11+
-namespace boost
12+
-{
13+
-namespace asio
14+
-{
15+
-#if BOOST_VERSION < 106600
16+
- class io_service;
17+
-#else
18+
- class io_context;
19+
- typedef io_context io_service;
20+
-#endif
21+
-}
22+
-}
23+
+#include <boost/asio/io_service.hpp>
24+
25+
namespace OpcUa
26+
{
127
diff --git a/src/core/subscription.cpp b/src/core/subscription.cpp
228
index b690d3a..fdac2f3 100644
329
--- a/src/core/subscription.cpp
@@ -31,8 +57,30 @@ index 795a6b2..532ac3c 100644
3157
#include <iostream>
3258
#include <thread>
3359

60+
diff --git a/src/server/internal_subscription.cpp b/src/server/internal_subscription.cpp
61+
index edf4715..32f6a2b 100644
62+
--- a/src/server/internal_subscription.cpp
63+
+++ b/src/server/internal_subscription.cpp
64+
@@ -14,7 +14,7 @@ InternalSubscription::InternalSubscription(SubscriptionServiceInternal & service
65+
, CurrentSession(SessionAuthenticationToken)
66+
, Callback(callback)
67+
, io(service.GetIOService())
68+
- , Timer(io, boost::posix_time::milliseconds(data.RevisedPublishingInterval))
69+
+ , Timer(io, boost::posix_time::milliseconds((int)data.RevisedPublishingInterval))
70+
, LifeTimeCount(data.RevisedLifetimeCount)
71+
, Logger(logger)
72+
{
73+
@@ -105,7 +105,7 @@ void InternalSubscription::PublishResults(const boost::system::error_code & erro
74+
}
75+
76+
TimerStopped = false;
77+
- Timer.expires_at(Timer.expires_at() + boost::posix_time::milliseconds(Data.RevisedPublishingInterval));
78+
+ Timer.expires_at(Timer.expires_at() + boost::posix_time::milliseconds((int)Data.RevisedPublishingInterval));
79+
std::shared_ptr<InternalSubscription> self = shared_from_this();
80+
Timer.async_wait([self](const boost::system::error_code & error) { self->PublishResults(error); });
81+
}
3482
diff --git a/src/server/internal_subscription.h b/src/server/internal_subscription.h
35-
index d42aa65..dd193a9 100644
83+
index d42aa65..440c7ee 100644
3684
--- a/src/server/internal_subscription.h
3785
+++ b/src/server/internal_subscription.h
3886
@@ -1,6 +1,7 @@
@@ -51,14 +99,8 @@ index d42aa65..dd193a9 100644
5199
#include <boost/thread/shared_mutex.hpp>
52100
#include <chrono>
53101
#include <iostream>
54-
@@ -115,5 +115,3 @@ private:
55-
56-
}
57-
}
58-
-
59-
-
60102
diff --git a/src/server/opc_tcp_async.cpp b/src/server/opc_tcp_async.cpp
61-
index dc700c2..f3a66b8 100644
103+
index dc700c2..c761a9e 100644
62104
--- a/src/server/opc_tcp_async.cpp
63105
+++ b/src/server/opc_tcp_async.cpp
64106
@@ -17,6 +17,7 @@
@@ -77,8 +119,32 @@ index dc700c2..f3a66b8 100644
77119
#include <future>
78120
#include <iostream>
79121
#include <set>
122+
@@ -106,7 +106,11 @@ public:
123+
*/
124+
typedef std::promise<void> Promise;
125+
Promise promise;
126+
+#if BOOST_VERSION >= 107000
127+
+ boost::asio::post(Socket.get_executor(), bind(&Promise::set_value, &promise));
128+
+#else
129+
Socket.get_io_service().post(bind(&Promise::set_value, &promise));
130+
+#endif
131+
promise.get_future().wait();
132+
}
133+
134+
@@ -372,7 +376,11 @@ void OpcTcpServer::Shutdown()
135+
*/
136+
typedef std::promise<void> Promise;
137+
Promise promise;
138+
+#if BOOST_VERSION >= 107000
139+
+ boost::asio::post(acceptor.get_executor(), bind(&Promise::set_value, &promise));
140+
+#else
141+
acceptor.get_io_service().post(bind(&Promise::set_value, &promise));
142+
+#endif
143+
promise.get_future().wait();
144+
}
145+
80146
diff --git a/src/server/subscription_service_internal.h b/src/server/subscription_service_internal.h
81-
index 6b16e1d..f7e5dfe 100644
147+
index 6b16e1d..53cfd22 100644
82148
--- a/src/server/subscription_service_internal.h
83149
+++ b/src/server/subscription_service_internal.h
84150
@@ -9,6 +9,7 @@
@@ -97,13 +163,8 @@ index 6b16e1d..f7e5dfe 100644
97163
#include <boost/thread/shared_mutex.hpp>
98164
#include <ctime>
99165
#include <limits>
100-
@@ -76,4 +76,3 @@ private:
101-
}
102-
103-
}
104-
-
105166
diff --git a/src/server/tcp_server.cpp b/src/server/tcp_server.cpp
106-
index b4f2000..2430820 100644
167+
index b4f2000..b7f4df1 100644
107168
--- a/src/server/tcp_server.cpp
108169
+++ b/src/server/tcp_server.cpp
109170
@@ -8,9 +8,6 @@
@@ -116,14 +177,10 @@ index b4f2000..2430820 100644
116177

117178
#include "tcp_server.h"
118179

119-
@@ -34,8 +31,18 @@
120-
#include <string.h>
121-
#include <sys/types.h>
180+
@@ -36,6 +33,15 @@
181+
122182

123-
-
124183
#ifdef _WIN32
125-
+#include <WinSock2.h>
126-
+#include <windows.h>
127184
+#if !defined SHUT_RD && defined SD_RECEIVE
128185
+#define SHUT_RD SD_RECEIVE
129186
+#endif

ports/freeopcua/cmakelists_fixes.patch

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index de03564..df3fcf6 100644
2+
index de03564..fe9f536 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
55
@@ -1,11 +1,8 @@
@@ -45,7 +45,7 @@ index de03564..df3fcf6 100644
4545
# Helper function to generate a pkg-config file for a single library
4646
# Takes the filename of the .pc file as a parameter and replaces all
4747
# placeholders in the .pc.in file with the actual values
48-
@@ -60,23 +35,9 @@ function(generate_pkgconfig BASENAME)
48+
@@ -60,23 +35,10 @@ function(generate_pkgconfig BASENAME)
4949
endif()
5050
endfunction(generate_pkgconfig)
5151
if(MSVC)
@@ -68,11 +68,12 @@ index de03564..df3fcf6 100644
6868
- #set(CMAKE_SHARED_LINKER_FLAGS "--no-undefined" )
6969
+ add_definitions(-D_SCL_SECURE_NO_WARNINGS)
7070
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
71+
+ add_compile_options(/bigobj)
7172
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
7273
endif()
7374

7475
if(WIN32)
75-
@@ -105,7 +66,7 @@ else(WIN32)
76+
@@ -105,7 +67,7 @@ else(WIN32)
7677

7778
endif(WIN32)
7879

@@ -81,7 +82,7 @@ index de03564..df3fcf6 100644
8182
include_directories( ${Boost_INCLUDE_DIRS} )
8283
link_directories( ${Boost_LIBRARY_DIRS} )
8384
message(STATUS "Boost INCLUDE DIR IS: " ${Boost_INCLUDE_DIRS})
84-
@@ -185,14 +146,12 @@ add_library(opcuaprotocol
85+
@@ -185,14 +147,12 @@ add_library(opcuaprotocol
8586
src/protocol/subscriptions.cpp
8687
)
8788

@@ -98,7 +99,7 @@ index de03564..df3fcf6 100644
9899

99100
generate_pkgconfig("libopcuaprotocol.pc")
100101

101-
@@ -227,10 +186,6 @@ if (BUILD_TESTING)
102+
@@ -227,10 +187,6 @@ if (BUILD_TESTING)
102103
gtest_main
103104
)
104105

@@ -109,7 +110,7 @@ index de03564..df3fcf6 100644
109110
add_test(NAME opcuaprotocol COMMAND test_opcuaprotocol)
110111
endif()
111112

112-
@@ -266,15 +221,12 @@ SET(opcuacore_SOURCES
113+
@@ -266,15 +222,12 @@ SET(opcuacore_SOURCES
113114

114115
add_library(opcuacore ${opcuacore_SOURCES})
115116

@@ -128,7 +129,7 @@ index de03564..df3fcf6 100644
128129

129130
generate_pkgconfig("libopcuacore.pc")
130131

131-
@@ -306,7 +258,7 @@ if (BUILD_TESTING)
132+
@@ -306,7 +259,7 @@ if (BUILD_TESTING)
132133
)
133134

134135
if (NOT CMAKE_VERSION VERSION_LESS 2.8.12)
@@ -137,7 +138,7 @@ index de03564..df3fcf6 100644
137138
endif ()
138139

139140
add_test(NAME opcuacore COMMAND test_opcuacore)
140-
@@ -327,9 +279,6 @@ if (BUILD_CLIENT)
141+
@@ -327,9 +280,6 @@ if (BUILD_CLIENT)
141142
src/client/client.cpp
142143
)
143144

@@ -147,7 +148,7 @@ index de03564..df3fcf6 100644
147148
target_link_libraries(opcuaclient
148149
opcuacore
149150
${ADDITIONAL_LINK_LIBRARIES}
150-
@@ -338,8 +287,9 @@ if (BUILD_CLIENT)
151+
@@ -338,8 +288,9 @@ if (BUILD_CLIENT)
151152

152153
target_include_directories(opcuaclient PUBLIC $<INSTALL_INTERFACE:include>)
153154
install(TARGETS opcuaclient EXPORT FreeOpcUa
@@ -158,7 +159,7 @@ index de03564..df3fcf6 100644
158159

159160
generate_pkgconfig("libopcuaclient.pc")
160161

161-
@@ -371,9 +321,6 @@ if (BUILD_CLIENT)
162+
@@ -371,9 +322,6 @@ if (BUILD_CLIENT)
162163
opcuacore
163164
)
164165

@@ -168,7 +169,7 @@ index de03564..df3fcf6 100644
168169
endif(BUILD_CLIENT)
169170

170171

171-
@@ -423,14 +370,12 @@ if(BUILD_SERVER)
172+
@@ -423,14 +371,12 @@ if(BUILD_SERVER)
172173
src/server/subscription_service_internal.cpp
173174
)
174175

@@ -186,7 +187,7 @@ index de03564..df3fcf6 100644
186187

187188
generate_pkgconfig("libopcuaserver.pc")
188189

189-
@@ -481,7 +426,7 @@ if(BUILD_SERVER)
190+
@@ -481,7 +427,7 @@ if(BUILD_SERVER)
190191

191192
target_include_directories(test_opcuaserver PUBLIC .)
192193
if (NOT CMAKE_VERSION VERSION_LESS 2.8.12)
@@ -195,7 +196,7 @@ index de03564..df3fcf6 100644
195196
endif ()
196197

197198
add_test(NAME opcuaserverapp COMMAND test_opcuaserver)
198-
@@ -510,9 +455,6 @@ if(BUILD_SERVER)
199+
@@ -510,9 +456,6 @@ if(BUILD_SERVER)
199200
opcuaserver
200201
${Boost_PROGRAM_OPTIONS_LIBRARY}
201202
)
@@ -205,7 +206,7 @@ index de03564..df3fcf6 100644
205206

206207
endif(BUILD_SERVER)
207208

208-
@@ -533,9 +475,6 @@ if (BUILD_CLIENT)
209+
@@ -533,9 +476,6 @@ if (BUILD_CLIENT)
209210
${SSL_SUPPORT_LINK_LIBRARIES}
210211
)
211212

@@ -215,7 +216,7 @@ index de03564..df3fcf6 100644
215216

216217
endif (BUILD_CLIENT)
217218

218-
@@ -555,9 +494,6 @@ if(BUILD_SERVER)
219+
@@ -555,9 +495,6 @@ if(BUILD_SERVER)
219220
opcuaserver
220221
)
221222

@@ -225,7 +226,7 @@ index de03564..df3fcf6 100644
225226
if(MSVC)
226227
set_target_properties(example_server PROPERTIES LINK_FLAGS /STACK:3000000)
227228
endif(MSVC)
228-
@@ -572,8 +508,8 @@ if (BUILD_PYTHON)
229+
@@ -572,8 +509,8 @@ if (BUILD_PYTHON)
229230
add_subdirectory(python)
230231
endif (BUILD_PYTHON)
231232

ports/freeopcua/improve_compatibility_with_recent_boost.patch

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)