Skip to content

Commit

Permalink
Patch Tuesday for November 2024 (microsoft#42165)
Browse files Browse the repository at this point in the history
  • Loading branch information
BillyONeal authored Nov 19, 2024
1 parent 0d9926a commit 0857a4b
Show file tree
Hide file tree
Showing 49 changed files with 463 additions and 364 deletions.
4 changes: 2 additions & 2 deletions ports/chartdir/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "chartdir",
"version": "7.0.0",
"port-version": 7,
"port-version": 8,
"description": "ChartDirector is a powerful chart component for creating professional looking charts for web and windows applications.",
"homepage": "https://www.advsofteng.com/",
"license": null,
"supports": "!(arm & windows) & !uwp"
"supports": "(windows & !uwp & (x86 | x64)) | osx | linux"
}
29 changes: 0 additions & 29 deletions ports/freeopcua/boost-1.70.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
diff --git a/include/opc/ua/services/services.h b/include/opc/ua/services/services.h
index f138831..4732a59 100644
--- a/include/opc/ua/services/services.h
+++ b/include/opc/ua/services/services.h
@@ -26,20 +26,7 @@
#include <vector>

#include <boost/version.hpp>
-
-
-namespace boost
-{
-namespace asio
-{
-#if BOOST_VERSION < 106600
- class io_service;
-#else
- class io_context;
- typedef io_context io_service;
-#endif
-}
-}
+#include <boost/asio/io_service.hpp>

namespace OpcUa
{
diff --git a/src/core/subscription.cpp b/src/core/subscription.cpp
index b690d3a..fdac2f3 100644
--- a/src/core/subscription.cpp
Expand Down Expand Up @@ -31,8 +57,30 @@ index 795a6b2..532ac3c 100644
#include <iostream>
#include <thread>

diff --git a/src/server/internal_subscription.cpp b/src/server/internal_subscription.cpp
index edf4715..32f6a2b 100644
--- a/src/server/internal_subscription.cpp
+++ b/src/server/internal_subscription.cpp
@@ -14,7 +14,7 @@ InternalSubscription::InternalSubscription(SubscriptionServiceInternal & service
, CurrentSession(SessionAuthenticationToken)
, Callback(callback)
, io(service.GetIOService())
- , Timer(io, boost::posix_time::milliseconds(data.RevisedPublishingInterval))
+ , Timer(io, boost::posix_time::milliseconds((int)data.RevisedPublishingInterval))
, LifeTimeCount(data.RevisedLifetimeCount)
, Logger(logger)
{
@@ -105,7 +105,7 @@ void InternalSubscription::PublishResults(const boost::system::error_code & erro
}

TimerStopped = false;
- Timer.expires_at(Timer.expires_at() + boost::posix_time::milliseconds(Data.RevisedPublishingInterval));
+ Timer.expires_at(Timer.expires_at() + boost::posix_time::milliseconds((int)Data.RevisedPublishingInterval));
std::shared_ptr<InternalSubscription> self = shared_from_this();
Timer.async_wait([self](const boost::system::error_code & error) { self->PublishResults(error); });
}
diff --git a/src/server/internal_subscription.h b/src/server/internal_subscription.h
index d42aa65..dd193a9 100644
index d42aa65..440c7ee 100644
--- a/src/server/internal_subscription.h
+++ b/src/server/internal_subscription.h
@@ -1,6 +1,7 @@
Expand All @@ -51,14 +99,8 @@ index d42aa65..dd193a9 100644
#include <boost/thread/shared_mutex.hpp>
#include <chrono>
#include <iostream>
@@ -115,5 +115,3 @@ private:

}
}
-
-
diff --git a/src/server/opc_tcp_async.cpp b/src/server/opc_tcp_async.cpp
index dc700c2..f3a66b8 100644
index dc700c2..c761a9e 100644
--- a/src/server/opc_tcp_async.cpp
+++ b/src/server/opc_tcp_async.cpp
@@ -17,6 +17,7 @@
Expand All @@ -77,8 +119,32 @@ index dc700c2..f3a66b8 100644
#include <future>
#include <iostream>
#include <set>
@@ -106,7 +106,11 @@ public:
*/
typedef std::promise<void> Promise;
Promise promise;
+#if BOOST_VERSION >= 107000
+ boost::asio::post(Socket.get_executor(), bind(&Promise::set_value, &promise));
+#else
Socket.get_io_service().post(bind(&Promise::set_value, &promise));
+#endif
promise.get_future().wait();
}

@@ -372,7 +376,11 @@ void OpcTcpServer::Shutdown()
*/
typedef std::promise<void> Promise;
Promise promise;
+#if BOOST_VERSION >= 107000
+ boost::asio::post(acceptor.get_executor(), bind(&Promise::set_value, &promise));
+#else
acceptor.get_io_service().post(bind(&Promise::set_value, &promise));
+#endif
promise.get_future().wait();
}

diff --git a/src/server/subscription_service_internal.h b/src/server/subscription_service_internal.h
index 6b16e1d..f7e5dfe 100644
index 6b16e1d..53cfd22 100644
--- a/src/server/subscription_service_internal.h
+++ b/src/server/subscription_service_internal.h
@@ -9,6 +9,7 @@
Expand All @@ -97,13 +163,8 @@ index 6b16e1d..f7e5dfe 100644
#include <boost/thread/shared_mutex.hpp>
#include <ctime>
#include <limits>
@@ -76,4 +76,3 @@ private:
}

}
-
diff --git a/src/server/tcp_server.cpp b/src/server/tcp_server.cpp
index b4f2000..2430820 100644
index b4f2000..b7f4df1 100644
--- a/src/server/tcp_server.cpp
+++ b/src/server/tcp_server.cpp
@@ -8,9 +8,6 @@
Expand All @@ -116,14 +177,10 @@ index b4f2000..2430820 100644

#include "tcp_server.h"

@@ -34,8 +31,18 @@
#include <string.h>
#include <sys/types.h>
@@ -36,6 +33,15 @@


-
#ifdef _WIN32
+#include <WinSock2.h>
+#include <windows.h>
+#if !defined SHUT_RD && defined SD_RECEIVE
+#define SHUT_RD SD_RECEIVE
+#endif
Expand Down
33 changes: 17 additions & 16 deletions ports/freeopcua/cmakelists_fixes.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index de03564..df3fcf6 100644
index de03564..fe9f536 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,11 +1,8 @@
Expand Down Expand Up @@ -45,7 +45,7 @@ index de03564..df3fcf6 100644
# Helper function to generate a pkg-config file for a single library
# Takes the filename of the .pc file as a parameter and replaces all
# placeholders in the .pc.in file with the actual values
@@ -60,23 +35,9 @@ function(generate_pkgconfig BASENAME)
@@ -60,23 +35,10 @@ function(generate_pkgconfig BASENAME)
endif()
endfunction(generate_pkgconfig)
if(MSVC)
Expand All @@ -68,11 +68,12 @@ index de03564..df3fcf6 100644
- #set(CMAKE_SHARED_LINKER_FLAGS "--no-undefined" )
+ add_definitions(-D_SCL_SECURE_NO_WARNINGS)
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+ add_compile_options(/bigobj)
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
endif()

if(WIN32)
@@ -105,7 +66,7 @@ else(WIN32)
@@ -105,7 +67,7 @@ else(WIN32)

endif(WIN32)

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

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

generate_pkgconfig("libopcuaprotocol.pc")

@@ -227,10 +186,6 @@ if (BUILD_TESTING)
@@ -227,10 +187,6 @@ if (BUILD_TESTING)
gtest_main
)

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

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

add_library(opcuacore ${opcuacore_SOURCES})

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

generate_pkgconfig("libopcuacore.pc")

@@ -306,7 +258,7 @@ if (BUILD_TESTING)
@@ -306,7 +259,7 @@ if (BUILD_TESTING)
)

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

add_test(NAME opcuacore COMMAND test_opcuacore)
@@ -327,9 +279,6 @@ if (BUILD_CLIENT)
@@ -327,9 +280,6 @@ if (BUILD_CLIENT)
src/client/client.cpp
)

Expand All @@ -147,7 +148,7 @@ index de03564..df3fcf6 100644
target_link_libraries(opcuaclient
opcuacore
${ADDITIONAL_LINK_LIBRARIES}
@@ -338,8 +287,9 @@ if (BUILD_CLIENT)
@@ -338,8 +288,9 @@ if (BUILD_CLIENT)

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

generate_pkgconfig("libopcuaclient.pc")

@@ -371,9 +321,6 @@ if (BUILD_CLIENT)
@@ -371,9 +322,6 @@ if (BUILD_CLIENT)
opcuacore
)

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


@@ -423,14 +370,12 @@ if(BUILD_SERVER)
@@ -423,14 +371,12 @@ if(BUILD_SERVER)
src/server/subscription_service_internal.cpp
)

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

generate_pkgconfig("libopcuaserver.pc")

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

target_include_directories(test_opcuaserver PUBLIC .)
if (NOT CMAKE_VERSION VERSION_LESS 2.8.12)
Expand All @@ -195,7 +196,7 @@ index de03564..df3fcf6 100644
endif ()

add_test(NAME opcuaserverapp COMMAND test_opcuaserver)
@@ -510,9 +455,6 @@ if(BUILD_SERVER)
@@ -510,9 +456,6 @@ if(BUILD_SERVER)
opcuaserver
${Boost_PROGRAM_OPTIONS_LIBRARY}
)
Expand All @@ -205,7 +206,7 @@ index de03564..df3fcf6 100644

endif(BUILD_SERVER)

@@ -533,9 +475,6 @@ if (BUILD_CLIENT)
@@ -533,9 +476,6 @@ if (BUILD_CLIENT)
${SSL_SUPPORT_LINK_LIBRARIES}
)

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

endif (BUILD_CLIENT)

@@ -555,9 +494,6 @@ if(BUILD_SERVER)
@@ -555,9 +495,6 @@ if(BUILD_SERVER)
opcuaserver
)

Expand All @@ -225,7 +226,7 @@ index de03564..df3fcf6 100644
if(MSVC)
set_target_properties(example_server PROPERTIES LINK_FLAGS /STACK:3000000)
endif(MSVC)
@@ -572,8 +508,8 @@ if (BUILD_PYTHON)
@@ -572,8 +509,8 @@ if (BUILD_PYTHON)
add_subdirectory(python)
endif (BUILD_PYTHON)

Expand Down
54 changes: 0 additions & 54 deletions ports/freeopcua/improve_compatibility_with_recent_boost.patch

This file was deleted.

Loading

0 comments on commit 0857a4b

Please sign in to comment.