[duckdb] Avoid stdext::checked_array_iterator. (#51749)

This commit is contained in:
Billy O'Neal 2026-05-14 10:37:29 -07:00 committed by GitHub
parent 4a1e40572d
commit 542289e02d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 32 additions and 11 deletions

View File

@ -0,0 +1,13 @@
diff --git a/third_party/fmt/include/fmt/format.h b/third_party/fmt/include/fmt/format.h
index 4c51630..bc2496c 100644
--- a/third_party/fmt/include/fmt/format.h
+++ b/third_party/fmt/include/fmt/format.h
@@ -321,7 +321,7 @@ inline typename Container::value_type* get_data(Container& c) {
return c.data();
}
-#ifdef _SECURE_SCL
+#if defined(_SECURE_SCL) && defined(_MSC_VER) && _MSC_VER < 1951
// Make a checked iterator to avoid MSVC warnings.
template <typename T> using checked_ptr = stdext::checked_array_iterator<T*>;
template <typename T> checked_ptr<T> make_checked(T* p, std::size_t size) {

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4e9d498..70414b4 100644
index 3246265..295da5f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -410,7 +410,6 @@ option(EXTENSION_STATIC_BUILD
@@ -420,7 +420,6 @@ option(EXTENSION_STATIC_BUILD
FALSE)
if(WIN32 OR ZOS)
@ -10,7 +10,7 @@ index 4e9d498..70414b4 100644
add_definitions(-D_SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS=1)
endif()
@@ -857,6 +856,7 @@ if (NOT EXTENSION_CONFIG_BUILD AND NOT ${EXTENSION_TESTS_ONLY} AND NOT CLANG_TID
@@ -863,6 +862,7 @@ if (NOT ${EXTENSION_CONFIG_BUILD} AND NOT ${EXTENSION_TESTS_ONLY} AND NOT CLANG_
message(STATUS "Extensions will be deployed to: ${LOCAL_EXTENSION_REPO_DIR}")
endif()
endif()
@ -18,7 +18,7 @@ index 4e9d498..70414b4 100644
function(build_loadable_extension_directory NAME ABI_TYPE OUTPUT_DIRECTORY EXTENSION_VERSION CAPI_VERSION PARAMETERS)
set(TARGET_NAME ${NAME}_loadable_extension)
@@ -875,6 +875,8 @@ function(build_loadable_extension_directory NAME ABI_TYPE OUTPUT_DIRECTORY EXTEN
@@ -881,6 +881,8 @@ function(build_loadable_extension_directory NAME ABI_TYPE OUTPUT_DIRECTORY EXTEN
if(EMSCRIPTEN)
add_library(${TARGET_NAME} STATIC ${FILES})

View File

@ -6,10 +6,12 @@ vcpkg_from_github(
HEAD_REF main
PATCHES
library-linkage.diff
avoid-stdext-checked-array-iterator.diff
)
# Remove vendored dependencies which are optional or not properly namespaced
file(REMOVE_RECURSE
"${SOURCE_PATH}/extension/third_party/icu"
"${SOURCE_PATH}/extension/icu/third_party/icu"
"${SOURCE_PATH}/third_party/catch"
"${SOURCE_PATH}/third_party/imdb"
"${SOURCE_PATH}/third_party/snowball"

View File

@ -1,6 +1,7 @@
{
"name": "duckdb",
"version": "1.4.4",
"port-version": 1,
"description": "High-performance in-process analytical database system",
"homepage": "https://duckdb.org",
"license": null,

View File

@ -2638,7 +2638,7 @@
},
"duckdb": {
"baseline": "1.4.4",
"port-version": 0
"port-version": 1
},
"duckx": {
"baseline": "1.2.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6ba0158231318c84f32a9c56525d13d733e89161",
"version": "1.4.4",
"port-version": 1
},
{
"git-tree": "1d8bae3bb7089ffc184af199c454e7aa704e4eee",
"version": "1.4.4",