Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libdispatch for openSUSE:Factory checked in at 2021-10-19 23:04:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libdispatch (Old) and /work/SRC/openSUSE:Factory/.libdispatch.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libdispatch" Tue Oct 19 23:04:00 2021 rev:2 rq:926301 version:5.5 Changes: -------- --- /work/SRC/openSUSE:Factory/libdispatch/libdispatch.changes 2021-04-15 16:57:32.426685989 +0200 +++ /work/SRC/openSUSE:Factory/.libdispatch.new.1890/libdispatch.changes 2021-10-19 23:04:26.677289765 +0200 @@ -1,0 +2,10 @@ +Tue Oct 19 08:51:35 UTC 2021 - Predrag Ivanovi?? <[email protected]> + +- Update to version 5.5 + * No upstream provided changelog + * Drop asprintf.patch, merged upstream + * Add patches to fix build failures caused by clang13 warnings treated as errors + (https://patch-diff.githubusercontent.com/raw/apple/swift-corelibs-libdispatch/pull/563.patch) + (https://patch-diff.githubusercontent.com/raw/apple/swift-corelibs-libdispatch/pull/574.patch) + +------------------------------------------------------------------- Old: ---- asprintf.patch New: ---- 563.patch 574.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libdispatch.spec ++++++ --- /var/tmp/diff_new_pack.imJbXD/_old 2021-10-19 23:04:27.181289994 +0200 +++ /var/tmp/diff_new_pack.imJbXD/_new 2021-10-19 23:04:27.185289996 +0200 @@ -16,9 +16,9 @@ # -%define reltag 5.3.3-RELEASE +%define reltag 5.5-RELEASE Name: libdispatch -Version: 5.3.3 +Version: 5.5 Release: 0 Summary: Apple's Grand Central Dispatch library License: Apache-2.0 @@ -26,10 +26,13 @@ URL: https://github.com/apple/swift-corelibs-libdispatch Source0: https://github.com/apple/swift-corelibs-libdispatch/archive/swift-%{reltag}.tar.gz#/corelibs-libdispatch.tar.gz Source1: libdispatch-rpmlintrc -# Fedora patch -Patch0: asprintf.patch +# Clang13 fix for warnings treated as errors +# https://patch-diff.githubusercontent.com/raw/apple/swift-corelibs-libdispatch/pull/574.patch +Patch0: 574.patch +# https://patch-diff.githubusercontent.com/raw/apple/swift-corelibs-libdispatch/pull/563.patch +Patch1: 563.patch # set library versions -Patch1: soversion.patch +Patch2: soversion.patch BuildRequires: chrpath BuildRequires: clang BuildRequires: cmake @@ -45,6 +48,7 @@ %package devel Summary: Development files for %{name} +Group: Development/Languages/C and C++ Requires: %{name} = %{version} %description devel @@ -53,8 +57,9 @@ %prep %setup -q -n swift-corelibs-libdispatch-swift-%{reltag} -%patch0 -p2 +%patch0 -p1 %patch1 -p1 +%patch2 -p1 %build export CC=clang export CXX=clang++ ++++++ asprintf.patch -> 563.patch ++++++ --- /work/SRC/openSUSE:Factory/libdispatch/asprintf.patch 2021-04-15 16:57:32.398685944 +0200 +++ /work/SRC/openSUSE:Factory/.libdispatch.new.1890/563.patch 2021-10-19 23:04:26.645289751 +0200 @@ -1,104 +1,38 @@ -diff -Naur ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE-orig/tests/bsdtests.c ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE/tests/bsdtests.c ---- ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE-orig/tests/bsdtests.c 2020-09-02 02:28:48.000000000 -0500 -+++ ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE/tests/bsdtests.c 2021-01-19 11:17:43.952112327 -0600 -@@ -347,8 +347,8 @@ - { - char* actual_str; - char* expected_str; -- asprintf(&actual_str, "%d\t%s", actual, actual ? strerror(actual) : ""); -- asprintf(&expected_str, "%d\t%s", expected, expected ? strerror(expected) : ""); -+ (void)asprintf(&actual_str, "%d\t%s", actual, actual ? strerror(actual) : ""); -+ (void)asprintf(&expected_str, "%d\t%s", expected, expected ? strerror(expected) : ""); - _test_print(file, line, desc, - (actual == expected), "%s", actual_str, "%s", expected_str); - free(actual_str); -@@ -369,8 +369,8 @@ - { - char* actual_str; - char* expected_str; -- asprintf(&actual_str, "%d %s", actual, actual ? mach_error_string(actual) : ""); -- asprintf(&expected_str, "%d %s", expected, expected ? mach_error_string(expected) : ""); -+ (void)asprintf(&actual_str, "%d %s", actual, actual ? mach_error_string(actual) : ""); -+ (void)asprintf(&expected_str, "%d %s", expected, expected ? mach_error_string(expected) : ""); - _test_print(file, line, desc, - (actual == expected), "%s", actual_str, "%s", expected_str); - free(actual_str); -@@ -416,12 +416,12 @@ - if (code != expectedCode) { - char buffer[BUFSIZ]; - CFStringGetCString(errDesc, buffer, sizeof(buffer), kCFStringEncodingUTF8); -- asprintf(&actual_str, "%ld\t%s", code, buffer); -+ (void)asprintf(&actual_str, "%ld\t%s", code, buffer); - } else { -- asprintf(&actual_str, "%ld", code); -+ (void)asprintf(&actual_str, "%ld", code); - } +From 729e25d92d05a8c4a8136e831ec6123bbf7f2654 Mon Sep 17 00:00:00 2001 +From: Evan Wilde <[email protected]> +Date: Thu, 19 Aug 2021 11:57:34 -0700 +Subject: [PATCH] Removing unused refcount variable + +The rebranch branch is failing to build due to an unused refcount +variable in runtime.c. The variable is only used by an os_assert and +nowhere else. I've removed it and instead put the check directly in the +assert. +--- + src/BlocksRuntime/runtime.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/src/BlocksRuntime/runtime.c b/src/BlocksRuntime/runtime.c +index bfec1a0bf..4b7d4bfa2 100644 +--- a/src/BlocksRuntime/runtime.c ++++ b/src/BlocksRuntime/runtime.c +@@ -468,18 +468,16 @@ static void _Block_byref_assign_copy(void *dest, const void *arg, const int flag + // Old compiler SPI + static void _Block_byref_release(const void *arg) { + struct Block_byref *byref = (struct Block_byref *)arg; +- int32_t refcount; -- asprintf(&expected_str, "%ld", expectedCode); -+ (void)asprintf(&expected_str, "%ld", expectedCode); - _test_print("", (long) 0, desc, - (code == expectedCode), "%s", actual_str, "%s", expected_str); - -diff -Naur ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE-orig/tests/dispatch_io.c ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE/tests/dispatch_io.c ---- ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE-orig/tests/dispatch_io.c 2020-09-02 02:28:48.000000000 -0500 -+++ ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE/tests/dispatch_io.c 2021-01-19 11:19:09.286850562 -0600 -@@ -255,7 +255,7 @@ - test_stop(); - } - char *path_out = NULL; -- asprintf(&path_out, "%s\\dispatchtest_io.XXXXXX", temp_dir); -+ (void)asprintf(&path_out, "%s\\dispatchtest_io.XXXXXX", temp_dir); - #else - char path_out[] = "/tmp/dispatchtest_io.XXXXXX"; - #endif -@@ -486,7 +486,7 @@ - #if defined(_WIN32) - for (size_t i = 0; paths[i]; i++) { - char *search_path = NULL; -- asprintf(&search_path, "%s\\*", paths[i]); -+ (void)asprintf(&search_path, "%s\\*", paths[i]); - WIN32_FIND_DATAA node; - HANDLE find = FindFirstFileA(search_path, &node); - free(search_path); -@@ -503,7 +503,7 @@ - continue; - } - char *node_path = NULL; -- asprintf(&node_path, "%s\\%s", paths[i], node.cFileName); -+ (void)asprintf(&node_path, "%s\\%s", paths[i], node.cFileName); - if (node.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - char *subdir_paths[] = {node_path, NULL}; - test_enumerate_dir_trees(subdir_paths, process_file); -@@ -590,7 +590,7 @@ - test_ptr_notnull("SystemRoot", system_root); - test_stop(); - } -- asprintf(&paths[0], "%s\\System32", system_root); -+ (void)asprintf(&paths[0], "%s\\System32", system_root); - #else - char *paths[] = {"/usr/lib", NULL}; - #endif -diff -Naur ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE-orig/tests/dispatch_io_muxed.c ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE/tests/dispatch_io_muxed.c ---- ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE-orig/tests/dispatch_io_muxed.c 2020-09-02 02:28:48.000000000 -0500 -+++ ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE/tests/dispatch_io_muxed.c 2021-01-19 11:18:19.122416587 -0600 -@@ -64,7 +64,7 @@ - const char *path_separator = "/"; - #endif - char *path = NULL; -- asprintf(&path, "%s%sdispatchtest_io.XXXXXX", temp_dir, path_separator); -+ (void)asprintf(&path, "%s%sdispatchtest_io.XXXXXX", temp_dir, path_separator); - dispatch_fd_t fd = mkstemp(path); - if (fd == -1) { - test_errno("mkstemp", errno, 0); -diff -Naur ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE-orig/tests/dispatch_overcommit.c ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE/tests/dispatch_overcommit.c ---- ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE-orig/tests/dispatch_overcommit.c 2020-09-02 02:28:48.000000000 -0500 -+++ ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE/tests/dispatch_overcommit.c 2021-01-19 11:16:37.385536454 -0600 -@@ -48,7 +48,7 @@ - int i; - for (i = 0; i < final; ++i) { - char* name; -- asprintf(&name, "test.overcommit.%d", i); -+ (void)asprintf(&name, "test.overcommit.%d", i); - - dispatch_queue_t queue = dispatch_queue_create(name, NULL); - test_ptr_notnull("dispatch_queue_create", queue); + // dereference the forwarding pointer since the compiler isn't doing this anymore (ever?) + byref = byref->forwarding; +- ++ + // To support C++ destructors under GC we arrange for there to be a finalizer for this + // by using an isa that directs the code to a finalizer that calls the byref_destroy method. + if ((byref->flags & BLOCK_BYREF_NEEDS_FREE) == 0) { + return; // stack or GC or global + } +- refcount = byref->flags & BLOCK_REFCOUNT_MASK; +- os_assert(refcount); ++ os_assert(byref->flags & BLOCK_REFCOUNT_MASK); + if (latching_decr_int_should_deallocate(&byref->flags)) { + if (byref->flags & BLOCK_BYREF_HAS_COPY_DISPOSE) { + struct Block_byref_2 *byref2 = (struct Block_byref_2 *)(byref+1); ++++++ asprintf.patch -> 574.patch ++++++ --- /work/SRC/openSUSE:Factory/libdispatch/asprintf.patch 2021-04-15 16:57:32.398685944 +0200 +++ /work/SRC/openSUSE:Factory/.libdispatch.new.1890/574.patch 2021-10-19 23:04:26.653289754 +0200 @@ -1,104 +1,46 @@ -diff -Naur ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE-orig/tests/bsdtests.c ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE/tests/bsdtests.c ---- ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE-orig/tests/bsdtests.c 2020-09-02 02:28:48.000000000 -0500 -+++ ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE/tests/bsdtests.c 2021-01-19 11:17:43.952112327 -0600 -@@ -347,8 +347,8 @@ - { - char* actual_str; - char* expected_str; -- asprintf(&actual_str, "%d\t%s", actual, actual ? strerror(actual) : ""); -- asprintf(&expected_str, "%d\t%s", expected, expected ? strerror(expected) : ""); -+ (void)asprintf(&actual_str, "%d\t%s", actual, actual ? strerror(actual) : ""); -+ (void)asprintf(&expected_str, "%d\t%s", expected, expected ? strerror(expected) : ""); - _test_print(file, line, desc, - (actual == expected), "%s", actual_str, "%s", expected_str); - free(actual_str); -@@ -369,8 +369,8 @@ - { - char* actual_str; - char* expected_str; -- asprintf(&actual_str, "%d %s", actual, actual ? mach_error_string(actual) : ""); -- asprintf(&expected_str, "%d %s", expected, expected ? mach_error_string(expected) : ""); -+ (void)asprintf(&actual_str, "%d %s", actual, actual ? mach_error_string(actual) : ""); -+ (void)asprintf(&expected_str, "%d %s", expected, expected ? mach_error_string(expected) : ""); - _test_print(file, line, desc, - (actual == expected), "%s", actual_str, "%s", expected_str); - free(actual_str); -@@ -416,12 +416,12 @@ - if (code != expectedCode) { - char buffer[BUFSIZ]; - CFStringGetCString(errDesc, buffer, sizeof(buffer), kCFStringEncodingUTF8); -- asprintf(&actual_str, "%ld\t%s", code, buffer); -+ (void)asprintf(&actual_str, "%ld\t%s", code, buffer); - } else { -- asprintf(&actual_str, "%ld", code); -+ (void)asprintf(&actual_str, "%ld", code); - } +From 6ffc3ed464fa7930ac59b77d534a0607ef95c57f Mon Sep 17 00:00:00 2001 +From: Ron Olson <[email protected]> +Date: Fri, 17 Sep 2021 12:21:34 -0500 +Subject: [PATCH 1/2] Added no-op for variable to avoid a warning treated as + error with Clang 13 + +--- + tests/bsdtestharness.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/bsdtestharness.c b/tests/bsdtestharness.c +index ca52d6e97..38ef26ac9 100644 +--- a/tests/bsdtestharness.c ++++ b/tests/bsdtestharness.c +@@ -152,6 +152,7 @@ main(int argc, char *argv[]) + assert(pid > 0); -- asprintf(&expected_str, "%ld", expectedCode); -+ (void)asprintf(&expected_str, "%ld", expectedCode); - _test_print("", (long) 0, desc, - (code == expectedCode), "%s", actual_str, "%s", expected_str); + #if defined(__linux__) ++ (void)to; + int status; + struct rusage usage; + struct timeval tv_stop, tv_wall; + +From 6656bb31079e974c5886dcb81d60d785fb5874e0 Mon Sep 17 00:00:00 2001 +From: Ron Olson <[email protected]> +Date: Tue, 21 Sep 2021 09:33:31 -0500 +Subject: [PATCH 2/2] Found another spot where no-ops are necessary to keep + Clang 13 happy + +--- + tests/dispatch_apply.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/dispatch_apply.c b/tests/dispatch_apply.c +index fa7fab53f..2c52da993 100644 +--- a/tests/dispatch_apply.c ++++ b/tests/dispatch_apply.c +@@ -57,6 +57,8 @@ static void busythread(void *ignored) + /* prevent i and j been optimized out */ + volatile uint64_t i = 0, j = 0; -diff -Naur ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE-orig/tests/dispatch_io.c ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE/tests/dispatch_io.c ---- ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE-orig/tests/dispatch_io.c 2020-09-02 02:28:48.000000000 -0500 -+++ ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE/tests/dispatch_io.c 2021-01-19 11:19:09.286850562 -0600 -@@ -255,7 +255,7 @@ - test_stop(); - } - char *path_out = NULL; -- asprintf(&path_out, "%s\\dispatchtest_io.XXXXXX", temp_dir); -+ (void)asprintf(&path_out, "%s\\dispatchtest_io.XXXXXX", temp_dir); - #else - char path_out[] = "/tmp/dispatchtest_io.XXXXXX"; - #endif -@@ -486,7 +486,7 @@ - #if defined(_WIN32) - for (size_t i = 0; paths[i]; i++) { - char *search_path = NULL; -- asprintf(&search_path, "%s\\*", paths[i]); -+ (void)asprintf(&search_path, "%s\\*", paths[i]); - WIN32_FIND_DATAA node; - HANDLE find = FindFirstFileA(search_path, &node); - free(search_path); -@@ -503,7 +503,7 @@ - continue; - } - char *node_path = NULL; -- asprintf(&node_path, "%s\\%s", paths[i], node.cFileName); -+ (void)asprintf(&node_path, "%s\\%s", paths[i], node.cFileName); - if (node.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - char *subdir_paths[] = {node_path, NULL}; - test_enumerate_dir_trees(subdir_paths, process_file); -@@ -590,7 +590,7 @@ - test_ptr_notnull("SystemRoot", system_root); - test_stop(); - } -- asprintf(&paths[0], "%s\\System32", system_root); -+ (void)asprintf(&paths[0], "%s\\System32", system_root); - #else - char *paths[] = {"/usr/lib", NULL}; - #endif -diff -Naur ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE-orig/tests/dispatch_io_muxed.c ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE/tests/dispatch_io_muxed.c ---- ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE-orig/tests/dispatch_io_muxed.c 2020-09-02 02:28:48.000000000 -0500 -+++ ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE/tests/dispatch_io_muxed.c 2021-01-19 11:18:19.122416587 -0600 -@@ -64,7 +64,7 @@ - const char *path_separator = "/"; - #endif - char *path = NULL; -- asprintf(&path, "%s%sdispatchtest_io.XXXXXX", temp_dir, path_separator); -+ (void)asprintf(&path, "%s%sdispatchtest_io.XXXXXX", temp_dir, path_separator); - dispatch_fd_t fd = mkstemp(path); - if (fd == -1) { - test_errno("mkstemp", errno, 0); -diff -Naur ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE-orig/tests/dispatch_overcommit.c ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE/tests/dispatch_overcommit.c ---- ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE-orig/tests/dispatch_overcommit.c 2020-09-02 02:28:48.000000000 -0500 -+++ ./swift-corelibs-libdispatch-swift-5.3.2-RELEASE/tests/dispatch_overcommit.c 2021-01-19 11:16:37.385536454 -0600 -@@ -48,7 +48,7 @@ - int i; - for (i = 0; i < final; ++i) { - char* name; -- asprintf(&name, "test.overcommit.%d", i); -+ (void)asprintf(&name, "test.overcommit.%d", i); ++ (void)i; ++ (void)j; + OSAtomicIncrement32(&busy_threads_started); - dispatch_queue_t queue = dispatch_queue_create(name, NULL); - test_ptr_notnull("dispatch_queue_create", queue); + while(!all_done) ++++++ corelibs-libdispatch.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/CMakeLists.txt new/swift-corelibs-libdispatch-swift-5.5-RELEASE/CMakeLists.txt --- old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/CMakeLists.txt 2020-09-02 09:28:48.000000000 +0200 +++ new/swift-corelibs-libdispatch-swift-5.5-RELEASE/CMakeLists.txt 2021-09-17 06:54:52.000000000 +0200 @@ -24,6 +24,36 @@ include_directories(BEFORE SYSTEM ${DISPATCH_INCLUDES}) dispatch_windows_lib_for_arch(${CMAKE_SYSTEM_PROCESSOR} DISPATCH_LIBDIR) link_directories(${DISPATCH_LIBDIR}) + + include(CheckCSourceCompiles) + check_c_source_compiles([=[ +#include <Windows.h> +int main(int argc, char *argv[]) { + switch ((LOGICAL_PROCESSOR_RELATIONSHIP)0) { + case RelationProcessorDie: + case RelationNumaNodeEx: + return 0; + } + return 0; +} +]=] DISPATCH_HAVE_EXTENDED_SLPI_20348) + if(DISPATCH_HAVE_EXTENDED_SLPI_20348) + add_compile_definitions(DISPATCH_HAVE_EXTENDED_SLPI_20348) + endif() + + check_c_source_compiles([=[ +#include <Windows.h> +int main(int argc, char *argv[]) { + switch ((LOGICAL_PROCESSOR_RELATIONSHIP)0) { + case RelationProcessorModule: + return 0; + } + return 0; +} +]=] DISPATCH_HAVE_EXTENDED_SLPI_22000) + if(DISPATCH_HAVE_EXTENDED_SLPI_22000) + add_compile_definitions(DISPATCH_HAVE_EXTENDED_SLPI_22000) + endif() endif() set(CMAKE_C_STANDARD 11) @@ -113,7 +143,9 @@ set(HAVE_NORETURN_BUILTIN_TRAP 1) endif() -find_package(LibRT) +if(NOT CMAKE_SYSTEM_NAME STREQUAL Android) + find_package(LibRT) +endif() check_function_exists(_pthread_workqueue_init HAVE__PTHREAD_WORKQUEUE_INIT) check_function_exists(getprogname HAVE_GETPROGNAME) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/src/object.c new/swift-corelibs-libdispatch-swift-5.5-RELEASE/src/object.c --- old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/src/object.c 2020-09-02 09:28:48.000000000 +0200 +++ new/swift-corelibs-libdispatch-swift-5.5-RELEASE/src/object.c 2021-09-17 06:54:52.000000000 +0200 @@ -202,9 +202,11 @@ _dispatch_mach_xref_dispose(dou._dm); break; #endif +#if DISPATCH_COCOA_COMPAT case DISPATCH_QUEUE_RUNLOOP_TYPE: _dispatch_runloop_queue_xref_dispose(dou._dl); break; +#endif } return _dispatch_release_tailcall(dou._os_obj); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/src/queue.c new/swift-corelibs-libdispatch-swift-5.5-RELEASE/src/queue.c --- old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/src/queue.c 2020-09-02 09:28:48.000000000 +0200 +++ new/swift-corelibs-libdispatch-swift-5.5-RELEASE/src/queue.c 2021-09-17 06:54:52.000000000 +0200 @@ -6560,7 +6560,7 @@ handle = fd; #elif defined(_WIN32) HANDLE hEvent; - hEvent = CreateEventW(NULL, /*bManualReset=*/TRUE, + hEvent = CreateEventW(NULL, /*bManualReset=*/FALSE, /*bInitialState=*/FALSE, NULL); if (hEvent == NULL) { DISPATCH_INTERNAL_CRASH(GetLastError(), "CreateEventW"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/src/shims/hw_config.h new/swift-corelibs-libdispatch-swift-5.5-RELEASE/src/shims/hw_config.h --- old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/src/shims/hw_config.h 2020-09-02 09:28:48.000000000 +0200 +++ new/swift-corelibs-libdispatch-swift-5.5-RELEASE/src/shims/hw_config.h 2021-09-17 06:54:52.000000000 +0200 @@ -156,10 +156,19 @@ ++dwProcessorPhysicalCount; dwProcessorLogicalCount += __popcnt64(slpiCurrent->ProcessorMask); break; +#if defined(DISPATCH_HAVE_EXTENDED_SLPI_20348) + case RelationProcessorDie: +#endif case RelationProcessorPackage: case RelationNumaNode: +#if defined(DISPATCH_HAVE_EXTENDED_SLPI_20348) + case RelationNumaNodeEx: +#endif case RelationCache: case RelationGroup: +#if defined(DISPATCH_HAVE_EXTENDED_SLPI_22000) + case RelationProcessorModule: +#endif case RelationAll: break; } @@ -187,12 +196,16 @@ name = "hw.activecpu"; break; } #elif defined(__FreeBSD__) - (void)c; name = "kern.smp.cpus"; + (void)c; name = "kern.smp.cpus"; +#elif defined(__OpenBSD__) + (void)c; #endif if (name) { size_t valsz = sizeof(val); +#if !defined(__OpenBSD__) r = sysctlbyname(name, &val, &valsz, NULL, 0); (void)dispatch_assume_zero(r); +#endif dispatch_assert(valsz == sizeof(uint32_t)); } else { #if HAVE_SYSCONF && defined(_SC_NPROCESSORS_ONLN) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/src/shims/lock.h new/swift-corelibs-libdispatch-swift-5.5-RELEASE/src/shims/lock.h --- old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/src/shims/lock.h 2020-09-02 09:28:48.000000000 +0200 +++ new/swift-corelibs-libdispatch-swift-5.5-RELEASE/src/shims/lock.h 2021-09-17 06:54:52.000000000 +0200 @@ -564,7 +564,7 @@ * effect of the dispatch once initialization. * * Per Lemma 2, when the DONE transition happens in a thread zone { N+3, N+4 }, - * then threads can observe this transiton in their { N+2, N+3 } zone at the + * then threads can observe this transition in their { N+2, N+3 } zone at the * earliest. * * Hence for an initializer bracket of { N, N+1 }, the first safe bracket for diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/src/swift/IO.swift new/swift-corelibs-libdispatch-swift-5.5-RELEASE/src/swift/IO.swift --- old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/src/swift/IO.swift 2020-09-02 09:28:48.000000000 +0200 +++ new/swift-corelibs-libdispatch-swift-5.5-RELEASE/src/swift/IO.swift 2021-09-17 06:54:52.000000000 +0200 @@ -67,7 +67,7 @@ public convenience init( type: StreamType, - fileDescriptor: Int32, + fileDescriptor: dispatch_fd_t, queue: DispatchQueue, cleanupHandler: @escaping (_ error: Int32) -> Void) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/src/swift/Private.swift new/swift-corelibs-libdispatch-swift-5.5-RELEASE/src/swift/Private.swift --- old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/src/swift/Private.swift 2020-09-02 09:28:48.000000000 +0200 +++ new/swift-corelibs-libdispatch-swift-5.5-RELEASE/src/swift/Private.swift 2021-09-17 06:54:52.000000000 +0200 @@ -27,7 +27,7 @@ } @available(*, unavailable, renamed:"DispatchIO.init(type:fileDescriptor:queue:cleanupHandler:)") -public func dispatch_io_create(_ type: UInt, _ fd: Int32, _ queue: DispatchQueue, _ cleanup_handler: @escaping (Int32) -> Void) -> DispatchIO +public func dispatch_io_create(_ type: UInt, _ fd: dispatch_fd_t, _ queue: DispatchQueue, _ cleanup_handler: @escaping (Int32) -> Void) -> DispatchIO { fatalError() } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/src/swift/Wrapper.swift new/swift-corelibs-libdispatch-swift-5.5-RELEASE/src/swift/Wrapper.swift --- old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/src/swift/Wrapper.swift 2020-09-02 09:28:48.000000000 +0200 +++ new/swift-corelibs-libdispatch-swift-5.5-RELEASE/src/swift/Wrapper.swift 2021-09-17 06:54:52.000000000 +0200 @@ -91,7 +91,7 @@ return unsafeBitCast(__wrapped, to: dispatch_object_t.self) } - internal init(__type: UInt, fd: Int32, queue: DispatchQueue, + internal init(__type: UInt, fd: dispatch_fd_t, queue: DispatchQueue, handler: @escaping (_ error: Int32) -> Void) { __wrapped = dispatch_io_create(dispatch_io_type_t(__type), dispatch_fd_t(fd), queue.__wrapped, handler) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/src/transform.c new/swift-corelibs-libdispatch-swift-5.5-RELEASE/src/transform.c --- old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/src/transform.c 2020-09-02 09:28:48.000000000 +0200 +++ new/swift-corelibs-libdispatch-swift-5.5-RELEASE/src/transform.c 2021-09-17 06:54:52.000000000 +0200 @@ -26,7 +26,7 @@ #include <endian.h> #define OSLittleEndian __LITTLE_ENDIAN #define OSBigEndian __BIG_ENDIAN -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__OpenBSD__) #include <sys/endian.h> #define OSLittleEndian _LITTLE_ENDIAN #define OSBigEndian _BIG_ENDIAN @@ -35,7 +35,7 @@ #define OSBigEndian 4321 #endif -#if defined(__linux__) || defined(__FreeBSD__) +#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) #define OSSwapLittleToHostInt16 le16toh #define OSSwapBigToHostInt16 be16toh #define OSSwapHostToLittleInt16 htole16 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/tests/CMakeLists.txt new/swift-corelibs-libdispatch-swift-5.5-RELEASE/tests/CMakeLists.txt --- old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/tests/CMakeLists.txt 2020-09-02 09:28:48.000000000 +0200 +++ new/swift-corelibs-libdispatch-swift-5.5-RELEASE/tests/CMakeLists.txt 2021-09-17 06:54:52.000000000 +0200 @@ -88,6 +88,14 @@ target_compile_options(${name} PRIVATE -fblocks) target_compile_options(${name} PRIVATE -Wall -Wno-deprecated-declarations) endif() + # Without this flag, cross-compiling static test executables for Android armv7 + # fails with the multiple definition errors seen in android/ndk#176, so I + # pulled in this workaround noted there. The tests build and run with this + # flag applied. + if(NOT BUILD_SHARED_LIBS AND CMAKE_SYSTEM_NAME STREQUAL Android AND + CMAKE_SYSTEM_PROCESSOR STREQUAL armv7-a) + target_link_options(${name} PRIVATE "LINKER:--allow-multiple-definition") + endif() target_link_libraries(${name} PRIVATE dispatch diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/tests/bsdtests.c new/swift-corelibs-libdispatch-swift-5.5-RELEASE/tests/bsdtests.c --- old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/tests/bsdtests.c 2020-09-02 09:28:48.000000000 +0200 +++ new/swift-corelibs-libdispatch-swift-5.5-RELEASE/tests/bsdtests.c 2021-09-17 06:54:52.000000000 +0200 @@ -347,8 +347,8 @@ { char* actual_str; char* expected_str; - asprintf(&actual_str, "%d\t%s", actual, actual ? strerror(actual) : ""); - asprintf(&expected_str, "%d\t%s", expected, expected ? strerror(expected) : ""); + (void)asprintf(&actual_str, "%d\t%s", actual, actual ? strerror(actual) : ""); + (void)asprintf(&expected_str, "%d\t%s", expected, expected ? strerror(expected) : ""); _test_print(file, line, desc, (actual == expected), "%s", actual_str, "%s", expected_str); free(actual_str); @@ -369,8 +369,8 @@ { char* actual_str; char* expected_str; - asprintf(&actual_str, "%d %s", actual, actual ? mach_error_string(actual) : ""); - asprintf(&expected_str, "%d %s", expected, expected ? mach_error_string(expected) : ""); + (void)asprintf(&actual_str, "%d %s", actual, actual ? mach_error_string(actual) : ""); + (void)asprintf(&expected_str, "%d %s", expected, expected ? mach_error_string(expected) : ""); _test_print(file, line, desc, (actual == expected), "%s", actual_str, "%s", expected_str); free(actual_str); @@ -416,12 +416,12 @@ if (code != expectedCode) { char buffer[BUFSIZ]; CFStringGetCString(errDesc, buffer, sizeof(buffer), kCFStringEncodingUTF8); - asprintf(&actual_str, "%ld\t%s", code, buffer); + (void)asprintf(&actual_str, "%ld\t%s", code, buffer); } else { - asprintf(&actual_str, "%ld", code); + (void)asprintf(&actual_str, "%ld", code); } - asprintf(&expected_str, "%ld", expectedCode); + (void)asprintf(&expected_str, "%ld", expectedCode); _test_print("", (long) 0, desc, (code == expectedCode), "%s", actual_str, "%s", expected_str); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/tests/dispatch_apply.c new/swift-corelibs-libdispatch-swift-5.5-RELEASE/tests/dispatch_apply.c --- old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/tests/dispatch_apply.c 2020-09-02 09:28:48.000000000 +0200 +++ new/swift-corelibs-libdispatch-swift-5.5-RELEASE/tests/dispatch_apply.c 2021-09-17 06:54:52.000000000 +0200 @@ -80,7 +80,7 @@ static void test_apply_contended(dispatch_queue_t dq) { uint32_t activecpu; -#ifdef __linux__ +#if defined(__linux__) || defined(__OpenBSD__) activecpu = (uint32_t)sysconf(_SC_NPROCESSORS_ONLN); #elif defined(_WIN32) SYSTEM_INFO si; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/tests/dispatch_io_muxed.c new/swift-corelibs-libdispatch-swift-5.5-RELEASE/tests/dispatch_io_muxed.c --- old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/tests/dispatch_io_muxed.c 2020-09-02 09:28:48.000000000 +0200 +++ new/swift-corelibs-libdispatch-swift-5.5-RELEASE/tests/dispatch_io_muxed.c 2021-09-17 06:54:52.000000000 +0200 @@ -64,7 +64,7 @@ const char *path_separator = "/"; #endif char *path = NULL; - asprintf(&path, "%s%sdispatchtest_io.XXXXXX", temp_dir, path_separator); + (void)asprintf(&path, "%s%sdispatchtest_io.XXXXXX", temp_dir, path_separator); dispatch_fd_t fd = mkstemp(path); if (fd == -1) { test_errno("mkstemp", errno, 0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/tests/dispatch_io_net.c new/swift-corelibs-libdispatch-swift-5.5-RELEASE/tests/dispatch_io_net.c --- old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/tests/dispatch_io_net.c 2020-09-02 09:28:48.000000000 +0200 +++ new/swift-corelibs-libdispatch-swift-5.5-RELEASE/tests/dispatch_io_net.c 2021-09-17 06:54:52.000000000 +0200 @@ -55,7 +55,7 @@ #endif #endif -#if defined(__linux__) || defined(__FreeBSD__) || defined(_WIN32) +#if defined(__linux__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__OpenBSD__) #define _NSGetExecutablePath(ef,bs) (*(bs)=(size_t)snprintf(ef,*(bs),"%s",argv[0]),0) #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/tests/dispatch_overcommit.c new/swift-corelibs-libdispatch-swift-5.5-RELEASE/tests/dispatch_overcommit.c --- old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/tests/dispatch_overcommit.c 2020-09-02 09:28:48.000000000 +0200 +++ new/swift-corelibs-libdispatch-swift-5.5-RELEASE/tests/dispatch_overcommit.c 2021-09-17 06:54:52.000000000 +0200 @@ -48,7 +48,7 @@ int i; for (i = 0; i < final; ++i) { char* name; - asprintf(&name, "test.overcommit.%d", i); + (void)asprintf(&name, "test.overcommit.%d", i); dispatch_queue_t queue = dispatch_queue_create(name, NULL); test_ptr_notnull("dispatch_queue_create", queue); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/tests/dispatch_test.h new/swift-corelibs-libdispatch-swift-5.5-RELEASE/tests/dispatch_test.h --- old/swift-corelibs-libdispatch-swift-5.3.3-RELEASE/tests/dispatch_test.h 2020-09-02 09:28:48.000000000 +0200 +++ new/swift-corelibs-libdispatch-swift-5.5-RELEASE/tests/dispatch_test.h 2021-09-17 06:54:52.000000000 +0200 @@ -21,7 +21,7 @@ #include <stdbool.h> #include <dispatch/dispatch.h> -#if defined(__linux__) || defined(__FreeBSD__) +#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) #include <generic_unix_port.h> #elif defined(_WIN32) #include <generic_win_port.h>
