diff -Nru zycore-c-1.1.0/cmake/zyan-functions.cmake zycore-c-1.4.1/cmake/zyan-functions.cmake --- zycore-c-1.1.0/cmake/zyan-functions.cmake 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/cmake/zyan-functions.cmake 2022-11-20 13:58:40.000000000 +0000 @@ -3,8 +3,13 @@ # =============================================================================================== # function (zyan_set_common_flags target) - if (NOT MSVC) - target_compile_options("${target}" PRIVATE "-std=c99") + if (MSVC) + # MSVC support for C11 is still pretty lacking, so we instead just disable the warnings + # about using non-standard C extensions. + target_compile_options("${target}" PUBLIC "/wd4201") + else () + # For the more civilized compilers, we go with C11. + set_target_properties("${target}" PROPERTIES C_STANDARD 11) endif () if (ZYAN_DEV_MODE) @@ -29,16 +34,12 @@ endfunction () function (zyan_maybe_enable_wpo target) - if (ZYAN_WHOLE_PROGRAM_OPTIMIZATION AND MSVC) - set_target_properties("${target}" PROPERTIES COMPILE_FLAGS "/GL") - set_target_properties("${target}" PROPERTIES LINK_FLAGS_RELEASE "/LTCG") + if (ZYAN_WHOLE_PROGRAM_OPTIMIZATION) + set_property(TARGET "${target}" PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE) endif () endfunction () +# deprecated alias for `zyan_maybe_enable_wpo`, for backward compatibility. function (zyan_maybe_enable_wpo_for_lib target) - if (ZYAN_WHOLE_PROGRAM_OPTIMIZATION AND MSVC) - set_target_properties("${target}" PROPERTIES COMPILE_FLAGS "/GL") - set_target_properties("${target}" PROPERTIES LINK_FLAGS_RELEASE "/LTCG") - set_target_properties("${target}" PROPERTIES STATIC_LIBRARY_FLAGS_RELEASE "/LTCG") - endif () + zyan_maybe_enable_wpo("${target}") endfunction () diff -Nru zycore-c-1.1.0/CMakeLists.txt zycore-c-1.4.1/CMakeLists.txt --- zycore-c-1.1.0/CMakeLists.txt 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/CMakeLists.txt 2022-11-20 13:58:40.000000000 +0000 @@ -2,11 +2,15 @@ return() endif () -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.9 FATAL_ERROR) -project(Zycore VERSION 1.1.0.0 LANGUAGES C CXX) +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15") + # Enable runtime library selection via CMAKE_MSVC_RUNTIME_LIBRARY + cmake_policy(SET CMP0091 NEW) +endif () + +project(Zycore VERSION 1.4.0.0 LANGUAGES C) -include(GenerateExportHeader) include(GNUInstallDirs) include(CMakePackageConfigHelpers) @@ -63,31 +67,42 @@ # GoogleTest # # =============================================================================================== # -# Download and unpack googletest +# Search for GoogleTest, and fallback to downloading it if not found if (ZYCORE_BUILD_TESTS) - if (NOT DEFINED ZYCORE_DOWNLOADED_GTEST) - configure_file("CMakeLists.txt.in" "${CMAKE_BINARY_DIR}/gtest/download/CMakeLists.txt") - execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . - RESULT_VARIABLE result - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/gtest/download") - if (result) - message(FATAL_ERROR "CMake step for googletest failed: ${result}") - endif() - execute_process(COMMAND ${CMAKE_COMMAND} --build . - RESULT_VARIABLE result - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/gtest/download") - if (result) - message(FATAL_ERROR "Build step for googletest failed: ${result}") - endif() - - set(ZYCORE_DOWNLOADED_GTEST TRUE CACHE BOOL "") - mark_as_advanced(ZYCORE_DOWNLOADED_GTEST) - endif () + find_package(GTest QUIET) + if (GTest_FOUND) + # CMake 3.20 and upstream GTestConfig.cmake + if (TARGET GTest::gtest) + add_library(gtest ALIAS GTest::gtest) + # Older FindGTest + else () + add_library(gtest ALIAS GTest::GTest) + endif () + else () + if (NOT DEFINED ZYCORE_DOWNLOADED_GTEST) + configure_file("CMakeLists.txt.in" "${CMAKE_BINARY_DIR}/gtest/download/CMakeLists.txt") + execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . + RESULT_VARIABLE result + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/gtest/download") + if (result) + message(FATAL_ERROR "CMake step for googletest failed: ${result}") + endif() + execute_process(COMMAND ${CMAKE_COMMAND} --build . + RESULT_VARIABLE result + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/gtest/download") + if (result) + message(FATAL_ERROR "Build step for googletest failed: ${result}") + endif() + + set(ZYCORE_DOWNLOADED_GTEST TRUE CACHE BOOL "") + mark_as_advanced(ZYCORE_DOWNLOADED_GTEST) + endif () set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) add_subdirectory("${CMAKE_BINARY_DIR}/gtest/src" "${CMAKE_BINARY_DIR}/gtest/build" EXCLUDE_FROM_ALL) + endif () endif () list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") @@ -101,22 +116,23 @@ add_library("Zycore" SHARED) else () add_library("Zycore" STATIC) + target_compile_definitions("Zycore" PUBLIC "ZYCORE_STATIC_BUILD") endif () set_target_properties("Zycore" PROPERTIES LINKER_LANGUAGE C - VERSION ${Zycore_VERSION} - SOVERSION ${Zycore_VERSION_MAJOR}.${Zycore_VERSION_MINOR}) + VERSION "${Zycore_VERSION}" + SOVERSION "${Zycore_VERSION_MAJOR}.${Zycore_VERSION_MINOR}" + DEFINE_SYMBOL "ZYCORE_SHOULD_EXPORT") target_include_directories("Zycore" PUBLIC $ $ $ PRIVATE "src") -target_compile_definitions("Zycore" PRIVATE "_CRT_SECURE_NO_WARNINGS" "ZYCORE_EXPORTS") +target_compile_definitions("Zycore" PRIVATE "_CRT_SECURE_NO_WARNINGS") zyan_set_common_flags("Zycore") -zyan_maybe_enable_wpo_for_lib("Zycore") -generate_export_header("Zycore" BASE_NAME "ZYCORE" EXPORT_FILE_NAME "ZycoreExportConfig.h") +zyan_maybe_enable_wpo("Zycore") if (ZYAN_NO_LIBC) target_compile_definitions("Zycore" PUBLIC "ZYAN_NO_LIBC") @@ -136,6 +152,7 @@ # Common "${CMAKE_CURRENT_LIST_DIR}/include/Zycore/Allocator.h" "${CMAKE_CURRENT_LIST_DIR}/include/Zycore/ArgParse.h" + "${CMAKE_CURRENT_LIST_DIR}/include/Zycore/Atomic.h" "${CMAKE_CURRENT_LIST_DIR}/include/Zycore/Bitset.h" "${CMAKE_CURRENT_LIST_DIR}/include/Zycore/Comparison.h" "${CMAKE_CURRENT_LIST_DIR}/include/Zycore/Defines.h" @@ -148,6 +165,8 @@ "${CMAKE_CURRENT_LIST_DIR}/include/Zycore/Types.h" "${CMAKE_CURRENT_LIST_DIR}/include/Zycore/Vector.h" "${CMAKE_CURRENT_LIST_DIR}/include/Zycore/Zycore.h" + "${CMAKE_CURRENT_LIST_DIR}/include/Zycore/Internal/AtomicGNU.h" + "${CMAKE_CURRENT_LIST_DIR}/include/Zycore/Internal/AtomicMSVC.h" # API "src/API/Memory.c" "src/API/Process.c" @@ -172,6 +191,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND NOT ZYAN_NO_LIBC) target_compile_definitions("Zycore" PRIVATE "_GNU_SOURCE") + set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) target_link_libraries("Zycore" Threads::Threads) endif () @@ -191,16 +211,32 @@ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/zycore" ) -install(TARGETS "Zycore" EXPORT "zycore-targets") +install(TARGETS "Zycore" EXPORT "zycore-targets" + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) + install(EXPORT "zycore-targets" NAMESPACE "Zycore::" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/zycore") -install(FILES - "${PROJECT_BINARY_DIR}/ZycoreExportConfig.h" - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") install(DIRECTORY "include/" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) # =============================================================================================== # +# Doxygen documentation # +# =============================================================================================== # + +find_package(Doxygen) +if (DOXYGEN_FOUND) + doxygen_add_docs(ZycoreDoc "include/Zycore/" ALL) + install( + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/" + DESTINATION "${CMAKE_INSTALL_DOCDIR}/api" + COMPONENT Documentation + ) +endif() + +# =============================================================================================== # # Developer mode # # =============================================================================================== # @@ -234,19 +270,22 @@ function (zyan_add_test test) add_executable("Test${test}" "tests/${test}.cpp") - - if (NOT MSVC) - target_compile_options("Test${test}" PRIVATE "-std=c++17") - endif () - - target_link_libraries("Test${test}" "Zycore") - target_link_libraries("Test${test}" "gtest") - set_target_properties("Test${test}" PROPERTIES FOLDER "Tests") + target_link_libraries("Test${test}" "Zycore" "gtest") + set_target_properties("Test${test}" PROPERTIES + LANGUAGE CXX + CXX_STANDARD 17 + CXX_EXTENSIONS OFF + CXX_STANDARD_REQUIRED ON + FOLDER "Tests" + ) target_compile_definitions("Test${test}" PRIVATE "_CRT_SECURE_NO_WARNINGS") zyan_maybe_enable_wpo("Test${test}") + add_test("${test}" "Test${test}") endfunction () if (ZYCORE_BUILD_TESTS) + enable_language(CXX) + enable_testing() zyan_add_test("String") zyan_add_test("Vector") zyan_add_test("ArgParse") diff -Nru zycore-c-1.1.0/debian/changelog zycore-c-1.4.1/debian/changelog --- zycore-c-1.1.0/debian/changelog 2021-12-07 11:43:25.000000000 +0000 +++ zycore-c-1.4.1/debian/changelog 2022-11-20 15:42:22.000000000 +0000 @@ -1,3 +1,42 @@ +zycore-c (1.4.1-1) unstable; urgency=medium + + * New upstream version 1.4.1 + * Upload to unstable + + -- Andrea Pappacoda Sun, 20 Nov 2022 16:42:22 +0100 + +zycore-c (1.4.0-1) experimental; urgency=medium + + * New upstream version 1.4.0 + * d/control: libzycore1.2 -> libzycore1.4 + * d/control: add new libzycore-doc package + * d/control: build on any architecture (Closes: #1015787) + * d/patches: drop upstreamed patches + + -- Andrea Pappacoda Sun, 06 Nov 2022 23:24:02 +0100 + +zycore-c (1.2.0-2) unstable; urgency=medium + + * Upload to unstable + * d/patches: build Doxygen documentation + + -- Andrea Pappacoda Fri, 30 Sep 2022 14:35:40 +0200 + +zycore-c (1.2.0-1) experimental; urgency=medium + + [ Andrea Pappacoda ] + * New upstream version 1.2.0 + * d/control: libzycore1.1 -> libzycore1.2 + * d/control: mark Multi-Arch: same + * d/patches: drop upstreamed patches + * d/tests: add autopkgtests + * d/upstream/metadata: add Donation field + + [ Debian Janitor ] + * Remove constraints unnecessary since buster + + -- Andrea Pappacoda Wed, 14 Sep 2022 13:23:42 +0200 + zycore-c (1.1.0-4) unstable; urgency=medium * d/control: diff -Nru zycore-c-1.1.0/debian/control zycore-c-1.4.1/debian/control --- zycore-c-1.1.0/debian/control 2021-12-07 10:45:44.000000000 +0000 +++ zycore-c-1.4.1/debian/control 2022-11-20 15:30:46.000000000 +0000 @@ -2,17 +2,22 @@ Section: libs Priority: optional Maintainer: Andrea Pappacoda -Build-Depends: cmake (>= 3.1), - debhelper-compat (= 13), - libgtest-dev -Standards-Version: 4.6.0 +Build-Depends: debhelper-compat (= 13) +Build-Depends-Arch: cmake, + libgtest-dev +Build-Depends-Indep: cmake, + libgtest-dev , + doxygen , + graphviz +Standards-Version: 4.6.1 Homepage: https://github.com/zyantific/zycore-c Vcs-Git: https://salsa.debian.org/debian/zycore-c.git Vcs-Browser: https://salsa.debian.org/debian/zycore-c Rules-Requires-Root: no -Package: libzycore1.1 -Architecture: any-amd64 any-arm any-arm64 any-i386 +Package: libzycore1.4 +Architecture: any +Multi-Arch: same Depends: ${misc:Depends}, ${shlibs:Depends} Description: Zyan Core Library for C @@ -23,11 +28,25 @@ Package: libzycore-dev Section: libdevel -Architecture: any-amd64 any-arm any-arm64 any-i386 -Depends: libzycore1.1 (= ${binary:Version}), +Architecture: any +Multi-Arch: same +Depends: libzycore1.4 (= ${binary:Version}), ${misc:Depends} +Recommends: libzycore-doc Description: Zyan Core Library for C - development Zyan Core is an internal library providing platform independent types, macros and a fallback for environments without LibC. . This package contains the development files. + +Package: libzycore-doc +Section: doc +Architecture: all +Multi-Arch: foreign +Depends: libjs-jquery, + ${misc:Depends} +Description: Zyan Core Library for C - documentation + Zyan Core is an internal library providing platform independent types, + macros and a fallback for environments without LibC. + . + This package contains the generated Doxygen documentation. diff -Nru zycore-c-1.1.0/debian/copyright zycore-c-1.4.1/debian/copyright --- zycore-c-1.1.0/debian/copyright 2021-10-07 16:14:34.000000000 +0000 +++ zycore-c-1.4.1/debian/copyright 2022-11-20 15:30:46.000000000 +0000 @@ -9,7 +9,7 @@ License: Expat Files: debian/* -Copyright: 2021 Andrea Pappacoda +Copyright: 2021-2022 Andrea Pappacoda License: Expat License: Expat diff -Nru zycore-c-1.1.0/debian/gbp.conf zycore-c-1.4.1/debian/gbp.conf --- zycore-c-1.1.0/debian/gbp.conf 2021-12-07 10:58:48.000000000 +0000 +++ zycore-c-1.4.1/debian/gbp.conf 2022-11-20 15:30:46.000000000 +0000 @@ -6,6 +6,3 @@ debian-branch = debian/latest upstream-branch = upstream/latest dist = DEP14 -upstream-tag = v%(version)s -pbuilder = True -postbuild = lintian $GBP_CHANGES_FILE diff -Nru zycore-c-1.1.0/debian/libzycore1.0.symbols zycore-c-1.4.1/debian/libzycore1.0.symbols --- zycore-c-1.1.0/debian/libzycore1.0.symbols 2021-11-11 11:21:07.000000000 +0000 +++ zycore-c-1.4.1/debian/libzycore1.0.symbols 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ -libZycore.so.1.0 libzycore1.0 #MINVER# -* Build-Depends-Package: libzycore-dev - ZyanAllocatorDefault@Base 1.0.0 - ZyanAllocatorInit@Base 1.0.0 - ZyanArgParse@Base 1.0.0 - ZyanArgParseEx@Base 1.0.0 - ZyanBitsetAND@Base 1.0.0 - ZyanBitsetAll@Base 1.0.0 - ZyanBitsetAny@Base 1.0.0 - ZyanBitsetAssign@Base 1.0.0 - ZyanBitsetClear@Base 1.0.0 - ZyanBitsetCount@Base 1.0.0 - ZyanBitsetDestroy@Base 1.0.0 - ZyanBitsetFlip@Base 1.0.0 - ZyanBitsetGetCapacity@Base 1.0.0 - ZyanBitsetGetCapacityBytes@Base 1.0.0 - ZyanBitsetGetSize@Base 1.0.0 - ZyanBitsetGetSizeBytes@Base 1.0.0 - ZyanBitsetInit@Base 1.0.0 - ZyanBitsetInitBuffer@Base 1.0.0 - ZyanBitsetInitEx@Base 1.0.0 - ZyanBitsetNone@Base 1.0.0 - ZyanBitsetOR@Base 1.0.0 - ZyanBitsetPerformByteOperation@Base 1.0.0 - ZyanBitsetPop@Base 1.0.0 - ZyanBitsetPush@Base 1.0.0 - ZyanBitsetReserve@Base 1.0.0 - ZyanBitsetReset@Base 1.0.0 - ZyanBitsetResetAll@Base 1.0.0 - ZyanBitsetSet@Base 1.0.0 - ZyanBitsetSetAll@Base 1.0.0 - ZyanBitsetShrinkToFit@Base 1.0.0 - ZyanBitsetTest@Base 1.0.0 - ZyanBitsetTestLSB@Base 1.0.0 - ZyanBitsetTestMSB@Base 1.0.0 - ZyanBitsetToggle@Base 1.0.0 - ZyanBitsetXOR@Base 1.0.0 - ZyanCriticalSectionDelete@Base 1.0.0 - ZyanCriticalSectionEnter@Base 1.0.0 - ZyanCriticalSectionInitialize@Base 1.0.0 - ZyanCriticalSectionLeave@Base 1.0.0 - ZyanCriticalSectionTryEnter@Base 1.0.0 - ZyanListClear@Base 1.0.0 - ZyanListDestroy@Base 1.0.0 - ZyanListEmplaceBack@Base 1.0.0 - ZyanListEmplaceFront@Base 1.0.0 - ZyanListGetHeadNode@Base 1.0.0 - ZyanListGetNextNode@Base 1.0.0 - ZyanListGetNodeData@Base 1.0.0 - ZyanListGetNodeDataEx@Base 1.0.0 - ZyanListGetNodeDataMutable@Base 1.0.0 - ZyanListGetNodeDataMutableEx@Base 1.0.0 - ZyanListGetPrevNode@Base 1.0.0 - ZyanListGetSize@Base 1.0.0 - ZyanListGetTailNode@Base 1.0.0 - ZyanListInit@Base 1.0.0 - ZyanListInitCustomBuffer@Base 1.0.0 - ZyanListInitEx@Base 1.0.0 - ZyanListPopBack@Base 1.0.0 - ZyanListPopFront@Base 1.0.0 - ZyanListPushBack@Base 1.0.0 - ZyanListPushFront@Base 1.0.0 - ZyanListRemove@Base 1.0.0 - ZyanListRemoveRange@Base 1.0.0 - ZyanListResize@Base 1.0.0 - ZyanListResizeEx@Base 1.0.0 - ZyanListSetNodeData@Base 1.0.0 - ZyanMemoryGetSystemAllocationGranularity@Base 1.0.0 - ZyanMemoryGetSystemPageSize@Base 1.0.0 - ZyanMemoryVirtualFree@Base 1.0.0 - ZyanMemoryVirtualProtect@Base 1.0.0 - ZyanStringAppend@Base 1.0.0 - ZyanStringAppendDecS@Base 1.0.0 - ZyanStringAppendDecU64@Base 1.0.0 - ZyanStringAppendDecU@Base 1.0.0 - ZyanStringAppendEx@Base 1.0.0 - ZyanStringAppendFormat@Base 1.0.0 - ZyanStringAppendHexS@Base 1.0.0 - ZyanStringAppendHexU64@Base 1.0.0 - ZyanStringAppendHexU@Base 1.0.0 - ZyanStringClear@Base 1.0.0 - ZyanStringCompare@Base 1.0.0 - ZyanStringCompareI@Base 1.0.0 - ZyanStringConcat@Base 1.0.0 - ZyanStringConcatCustomBuffer@Base 1.0.0 - ZyanStringConcatEx@Base 1.0.0 - ZyanStringDelete@Base 1.0.0 - ZyanStringDestroy@Base 1.0.0 - ZyanStringDuplicate@Base 1.0.0 - ZyanStringDuplicateCustomBuffer@Base 1.0.0 - ZyanStringDuplicateEx@Base 1.0.0 - ZyanStringGetCapacity@Base 1.0.0 - ZyanStringGetChar@Base 1.0.0 - ZyanStringGetCharMutable@Base 1.0.0 - ZyanStringGetData@Base 1.0.0 - ZyanStringGetSize@Base 1.0.0 - ZyanStringInit@Base 1.0.0 - ZyanStringInitCustomBuffer@Base 1.0.0 - ZyanStringInitEx@Base 1.0.0 - ZyanStringInsert@Base 1.0.0 - ZyanStringInsertEx@Base 1.0.0 - ZyanStringLPos@Base 1.0.0 - ZyanStringLPosEx@Base 1.0.0 - ZyanStringLPosI@Base 1.0.0 - ZyanStringLPosIEx@Base 1.0.0 - ZyanStringRPos@Base 1.0.0 - ZyanStringRPosEx@Base 1.0.0 - ZyanStringRPosI@Base 1.0.0 - ZyanStringRPosIEx@Base 1.0.0 - ZyanStringReserve@Base 1.0.0 - ZyanStringResize@Base 1.0.0 - ZyanStringSetChar@Base 1.0.0 - ZyanStringShrinkToFit@Base 1.0.0 - ZyanStringToLowerCase@Base 1.0.0 - ZyanStringToLowerCaseEx@Base 1.0.0 - ZyanStringToUpperCase@Base 1.0.0 - ZyanStringToUpperCaseEx@Base 1.0.0 - ZyanStringTruncate@Base 1.0.0 - ZyanStringViewGetData@Base 1.0.0 - ZyanStringViewGetSize@Base 1.0.0 - ZyanStringViewInsideBuffer@Base 1.0.0 - ZyanStringViewInsideBufferEx@Base 1.0.0 - ZyanStringViewInsideView@Base 1.0.0 - ZyanStringViewInsideViewEx@Base 1.0.0 - ZyanTerminalEnableVT100@Base 1.0.0 - ZyanTerminalIsTTY@Base 1.0.0 - ZyanThreadGetCurrentThread@Base 1.0.0 - ZyanThreadGetCurrentThreadId@Base 1.0.0 - ZyanThreadTlsAlloc@Base 1.0.0 - ZyanThreadTlsFree@Base 1.0.0 - ZyanThreadTlsGetValue@Base 1.0.0 - ZyanThreadTlsSetValue@Base 1.0.0 - ZyanVectorBinarySearch@Base 1.0.0 - ZyanVectorBinarySearchEx@Base 1.0.0 - ZyanVectorClear@Base 1.0.0 - ZyanVectorDelete@Base 1.0.0 - ZyanVectorDeleteRange@Base 1.0.0 - ZyanVectorDestroy@Base 1.0.0 - ZyanVectorDuplicate@Base 1.0.0 - ZyanVectorDuplicateCustomBuffer@Base 1.0.0 - ZyanVectorDuplicateEx@Base 1.0.0 - ZyanVectorEmplace@Base 1.0.0 - ZyanVectorEmplaceEx@Base 1.0.0 - ZyanVectorFind@Base 1.0.0 - ZyanVectorFindEx@Base 1.0.0 - ZyanVectorGet@Base 1.0.0 - ZyanVectorGetCapacity@Base 1.0.0 - ZyanVectorGetMutable@Base 1.0.0 - ZyanVectorGetPointer@Base 1.0.0 - ZyanVectorGetPointerMutable@Base 1.0.0 - ZyanVectorGetSize@Base 1.0.0 - ZyanVectorInit@Base 1.0.0 - ZyanVectorInitCustomBuffer@Base 1.0.0 - ZyanVectorInitEx@Base 1.0.0 - ZyanVectorInsert@Base 1.0.0 - ZyanVectorInsertRange@Base 1.0.0 - ZyanVectorPopBack@Base 1.0.0 - ZyanVectorPushBack@Base 1.0.0 - ZyanVectorReserve@Base 1.0.0 - ZyanVectorResize@Base 1.0.0 - ZyanVectorResizeEx@Base 1.0.0 - ZyanVectorSet@Base 1.0.0 - ZyanVectorShrinkToFit@Base 1.0.0 - ZyanVectorSwapElements@Base 1.0.0 - ZycoreGetVersion@Base 1.0.0 diff -Nru zycore-c-1.1.0/debian/libzycore1.1.install zycore-c-1.4.1/debian/libzycore1.1.install --- zycore-c-1.1.0/debian/libzycore1.1.install 2021-11-12 12:15:38.000000000 +0000 +++ zycore-c-1.4.1/debian/libzycore1.1.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/*/libZycore.so.1.1* diff -Nru zycore-c-1.1.0/debian/libzycore1.1.symbols zycore-c-1.4.1/debian/libzycore1.1.symbols --- zycore-c-1.1.0/debian/libzycore1.1.symbols 2021-11-12 12:15:38.000000000 +0000 +++ zycore-c-1.4.1/debian/libzycore1.1.symbols 1970-01-01 00:00:00.000000000 +0000 @@ -1,166 +0,0 @@ -libZycore.so.1.1 libzycore1.1 #MINVER# -* Build-Depends-Package: libzycore-dev - ZyanAllocatorDefault@Base 1.1.0 - ZyanAllocatorInit@Base 1.1.0 - ZyanArgParse@Base 1.1.0 - ZyanArgParseEx@Base 1.1.0 - ZyanBitsetAND@Base 1.1.0 - ZyanBitsetAll@Base 1.1.0 - ZyanBitsetAny@Base 1.1.0 - ZyanBitsetAssign@Base 1.1.0 - ZyanBitsetClear@Base 1.1.0 - ZyanBitsetCount@Base 1.1.0 - ZyanBitsetDestroy@Base 1.1.0 - ZyanBitsetFlip@Base 1.1.0 - ZyanBitsetGetCapacity@Base 1.1.0 - ZyanBitsetGetCapacityBytes@Base 1.1.0 - ZyanBitsetGetSize@Base 1.1.0 - ZyanBitsetGetSizeBytes@Base 1.1.0 - ZyanBitsetInit@Base 1.1.0 - ZyanBitsetInitBuffer@Base 1.1.0 - ZyanBitsetInitEx@Base 1.1.0 - ZyanBitsetNone@Base 1.1.0 - ZyanBitsetOR@Base 1.1.0 - ZyanBitsetPerformByteOperation@Base 1.1.0 - ZyanBitsetPop@Base 1.1.0 - ZyanBitsetPush@Base 1.1.0 - ZyanBitsetReserve@Base 1.1.0 - ZyanBitsetReset@Base 1.1.0 - ZyanBitsetResetAll@Base 1.1.0 - ZyanBitsetSet@Base 1.1.0 - ZyanBitsetSetAll@Base 1.1.0 - ZyanBitsetShrinkToFit@Base 1.1.0 - ZyanBitsetTest@Base 1.1.0 - ZyanBitsetTestLSB@Base 1.1.0 - ZyanBitsetTestMSB@Base 1.1.0 - ZyanBitsetToggle@Base 1.1.0 - ZyanBitsetXOR@Base 1.1.0 - ZyanCriticalSectionDelete@Base 1.1.0 - ZyanCriticalSectionEnter@Base 1.1.0 - ZyanCriticalSectionInitialize@Base 1.1.0 - ZyanCriticalSectionLeave@Base 1.1.0 - ZyanCriticalSectionTryEnter@Base 1.1.0 - ZyanListClear@Base 1.1.0 - ZyanListDestroy@Base 1.1.0 - ZyanListEmplaceBack@Base 1.1.0 - ZyanListEmplaceFront@Base 1.1.0 - ZyanListGetHeadNode@Base 1.1.0 - ZyanListGetNextNode@Base 1.1.0 - ZyanListGetNodeData@Base 1.1.0 - ZyanListGetNodeDataEx@Base 1.1.0 - ZyanListGetNodeDataMutable@Base 1.1.0 - ZyanListGetNodeDataMutableEx@Base 1.1.0 - ZyanListGetPrevNode@Base 1.1.0 - ZyanListGetSize@Base 1.1.0 - ZyanListGetTailNode@Base 1.1.0 - ZyanListInit@Base 1.1.0 - ZyanListInitCustomBuffer@Base 1.1.0 - ZyanListInitEx@Base 1.1.0 - ZyanListPopBack@Base 1.1.0 - ZyanListPopFront@Base 1.1.0 - ZyanListPushBack@Base 1.1.0 - ZyanListPushFront@Base 1.1.0 - ZyanListRemove@Base 1.1.0 - ZyanListRemoveRange@Base 1.1.0 - ZyanListResize@Base 1.1.0 - ZyanListResizeEx@Base 1.1.0 - ZyanListSetNodeData@Base 1.1.0 - ZyanMemoryGetSystemAllocationGranularity@Base 1.1.0 - ZyanMemoryGetSystemPageSize@Base 1.1.0 - ZyanMemoryVirtualFree@Base 1.1.0 - ZyanMemoryVirtualProtect@Base 1.1.0 - ZyanProcessFlushInstructionCache@Base 1.1.0 - ZyanStringAppend@Base 1.1.0 - ZyanStringAppendDecS@Base 1.1.0 - ZyanStringAppendDecU64@Base 1.1.0 - ZyanStringAppendDecU@Base 1.1.0 - ZyanStringAppendEx@Base 1.1.0 - ZyanStringAppendFormat@Base 1.1.0 - ZyanStringAppendHexS@Base 1.1.0 - ZyanStringAppendHexU64@Base 1.1.0 - ZyanStringAppendHexU@Base 1.1.0 - ZyanStringClear@Base 1.1.0 - ZyanStringCompare@Base 1.1.0 - ZyanStringCompareI@Base 1.1.0 - ZyanStringConcat@Base 1.1.0 - ZyanStringConcatCustomBuffer@Base 1.1.0 - ZyanStringConcatEx@Base 1.1.0 - ZyanStringDelete@Base 1.1.0 - ZyanStringDestroy@Base 1.1.0 - ZyanStringDuplicate@Base 1.1.0 - ZyanStringDuplicateCustomBuffer@Base 1.1.0 - ZyanStringDuplicateEx@Base 1.1.0 - ZyanStringGetCapacity@Base 1.1.0 - ZyanStringGetChar@Base 1.1.0 - ZyanStringGetCharMutable@Base 1.1.0 - ZyanStringGetData@Base 1.1.0 - ZyanStringGetSize@Base 1.1.0 - ZyanStringInit@Base 1.1.0 - ZyanStringInitCustomBuffer@Base 1.1.0 - ZyanStringInitEx@Base 1.1.0 - ZyanStringInsert@Base 1.1.0 - ZyanStringInsertEx@Base 1.1.0 - ZyanStringLPos@Base 1.1.0 - ZyanStringLPosEx@Base 1.1.0 - ZyanStringLPosI@Base 1.1.0 - ZyanStringLPosIEx@Base 1.1.0 - ZyanStringRPos@Base 1.1.0 - ZyanStringRPosEx@Base 1.1.0 - ZyanStringRPosI@Base 1.1.0 - ZyanStringRPosIEx@Base 1.1.0 - ZyanStringReserve@Base 1.1.0 - ZyanStringResize@Base 1.1.0 - ZyanStringSetChar@Base 1.1.0 - ZyanStringShrinkToFit@Base 1.1.0 - ZyanStringToLowerCase@Base 1.1.0 - ZyanStringToLowerCaseEx@Base 1.1.0 - ZyanStringToUpperCase@Base 1.1.0 - ZyanStringToUpperCaseEx@Base 1.1.0 - ZyanStringTruncate@Base 1.1.0 - ZyanStringViewGetData@Base 1.1.0 - ZyanStringViewGetSize@Base 1.1.0 - ZyanStringViewInsideBuffer@Base 1.1.0 - ZyanStringViewInsideBufferEx@Base 1.1.0 - ZyanStringViewInsideView@Base 1.1.0 - ZyanStringViewInsideViewEx@Base 1.1.0 - ZyanTerminalEnableVT100@Base 1.1.0 - ZyanTerminalIsTTY@Base 1.1.0 - ZyanThreadGetCurrentThread@Base 1.1.0 - ZyanThreadGetCurrentThreadId@Base 1.1.0 - ZyanThreadTlsAlloc@Base 1.1.0 - ZyanThreadTlsFree@Base 1.1.0 - ZyanThreadTlsGetValue@Base 1.1.0 - ZyanThreadTlsSetValue@Base 1.1.0 - ZyanVectorBinarySearch@Base 1.1.0 - ZyanVectorBinarySearchEx@Base 1.1.0 - ZyanVectorClear@Base 1.1.0 - ZyanVectorDelete@Base 1.1.0 - ZyanVectorDeleteRange@Base 1.1.0 - ZyanVectorDestroy@Base 1.1.0 - ZyanVectorDuplicate@Base 1.1.0 - ZyanVectorDuplicateCustomBuffer@Base 1.1.0 - ZyanVectorDuplicateEx@Base 1.1.0 - ZyanVectorEmplace@Base 1.1.0 - ZyanVectorEmplaceEx@Base 1.1.0 - ZyanVectorFind@Base 1.1.0 - ZyanVectorFindEx@Base 1.1.0 - ZyanVectorGet@Base 1.1.0 - ZyanVectorGetCapacity@Base 1.1.0 - ZyanVectorGetMutable@Base 1.1.0 - ZyanVectorGetPointer@Base 1.1.0 - ZyanVectorGetPointerMutable@Base 1.1.0 - ZyanVectorGetSize@Base 1.1.0 - ZyanVectorInit@Base 1.1.0 - ZyanVectorInitCustomBuffer@Base 1.1.0 - ZyanVectorInitEx@Base 1.1.0 - ZyanVectorInsert@Base 1.1.0 - ZyanVectorInsertRange@Base 1.1.0 - ZyanVectorPopBack@Base 1.1.0 - ZyanVectorPushBack@Base 1.1.0 - ZyanVectorReserve@Base 1.1.0 - ZyanVectorResize@Base 1.1.0 - ZyanVectorResizeEx@Base 1.1.0 - ZyanVectorSet@Base 1.1.0 - ZyanVectorShrinkToFit@Base 1.1.0 - ZyanVectorSwapElements@Base 1.1.0 - ZycoreGetVersion@Base 1.1.0 diff -Nru zycore-c-1.1.0/debian/libzycore1.4.install zycore-c-1.4.1/debian/libzycore1.4.install --- zycore-c-1.1.0/debian/libzycore1.4.install 1970-01-01 00:00:00.000000000 +0000 +++ zycore-c-1.4.1/debian/libzycore1.4.install 2022-11-20 15:30:46.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/*/libZycore.so.1.4* diff -Nru zycore-c-1.1.0/debian/libzycore1.4.symbols zycore-c-1.4.1/debian/libzycore1.4.symbols --- zycore-c-1.1.0/debian/libzycore1.4.symbols 1970-01-01 00:00:00.000000000 +0000 +++ zycore-c-1.4.1/debian/libzycore1.4.symbols 2022-11-20 15:30:46.000000000 +0000 @@ -0,0 +1,166 @@ +libZycore.so.1.4 libzycore1.4 #MINVER# +* Build-Depends-Package: libzycore-dev + ZyanAllocatorDefault@Base 1.4.0 + ZyanAllocatorInit@Base 1.4.0 + ZyanArgParse@Base 1.4.0 + ZyanArgParseEx@Base 1.4.0 + ZyanBitsetAND@Base 1.4.0 + ZyanBitsetAll@Base 1.4.0 + ZyanBitsetAny@Base 1.4.0 + ZyanBitsetAssign@Base 1.4.0 + ZyanBitsetClear@Base 1.4.0 + ZyanBitsetCount@Base 1.4.0 + ZyanBitsetDestroy@Base 1.4.0 + ZyanBitsetFlip@Base 1.4.0 + ZyanBitsetGetCapacity@Base 1.4.0 + ZyanBitsetGetCapacityBytes@Base 1.4.0 + ZyanBitsetGetSize@Base 1.4.0 + ZyanBitsetGetSizeBytes@Base 1.4.0 + ZyanBitsetInit@Base 1.4.0 + ZyanBitsetInitBuffer@Base 1.4.0 + ZyanBitsetInitEx@Base 1.4.0 + ZyanBitsetNone@Base 1.4.0 + ZyanBitsetOR@Base 1.4.0 + ZyanBitsetPerformByteOperation@Base 1.4.0 + ZyanBitsetPop@Base 1.4.0 + ZyanBitsetPush@Base 1.4.0 + ZyanBitsetReserve@Base 1.4.0 + ZyanBitsetReset@Base 1.4.0 + ZyanBitsetResetAll@Base 1.4.0 + ZyanBitsetSet@Base 1.4.0 + ZyanBitsetSetAll@Base 1.4.0 + ZyanBitsetShrinkToFit@Base 1.4.0 + ZyanBitsetTest@Base 1.4.0 + ZyanBitsetTestLSB@Base 1.4.0 + ZyanBitsetTestMSB@Base 1.4.0 + ZyanBitsetToggle@Base 1.4.0 + ZyanBitsetXOR@Base 1.4.0 + ZyanCriticalSectionDelete@Base 1.4.0 + ZyanCriticalSectionEnter@Base 1.4.0 + ZyanCriticalSectionInitialize@Base 1.4.0 + ZyanCriticalSectionLeave@Base 1.4.0 + ZyanCriticalSectionTryEnter@Base 1.4.0 + ZyanListClear@Base 1.4.0 + ZyanListDestroy@Base 1.4.0 + ZyanListEmplaceBack@Base 1.4.0 + ZyanListEmplaceFront@Base 1.4.0 + ZyanListGetHeadNode@Base 1.4.0 + ZyanListGetNextNode@Base 1.4.0 + ZyanListGetNodeData@Base 1.4.0 + ZyanListGetNodeDataEx@Base 1.4.0 + ZyanListGetNodeDataMutable@Base 1.4.0 + ZyanListGetNodeDataMutableEx@Base 1.4.0 + ZyanListGetPrevNode@Base 1.4.0 + ZyanListGetSize@Base 1.4.0 + ZyanListGetTailNode@Base 1.4.0 + ZyanListInit@Base 1.4.0 + ZyanListInitCustomBuffer@Base 1.4.0 + ZyanListInitEx@Base 1.4.0 + ZyanListPopBack@Base 1.4.0 + ZyanListPopFront@Base 1.4.0 + ZyanListPushBack@Base 1.4.0 + ZyanListPushFront@Base 1.4.0 + ZyanListRemove@Base 1.4.0 + ZyanListRemoveRange@Base 1.4.0 + ZyanListResize@Base 1.4.0 + ZyanListResizeEx@Base 1.4.0 + ZyanListSetNodeData@Base 1.4.0 + ZyanMemoryGetSystemAllocationGranularity@Base 1.4.0 + ZyanMemoryGetSystemPageSize@Base 1.4.0 + ZyanMemoryVirtualFree@Base 1.4.0 + ZyanMemoryVirtualProtect@Base 1.4.0 + ZyanProcessFlushInstructionCache@Base 1.4.0 + ZyanStringAppend@Base 1.4.0 + ZyanStringAppendDecS@Base 1.4.0 + ZyanStringAppendDecU64@Base 1.4.0 + ZyanStringAppendDecU@Base 1.4.0 + ZyanStringAppendEx@Base 1.4.0 + ZyanStringAppendFormat@Base 1.4.0 + ZyanStringAppendHexS@Base 1.4.0 + ZyanStringAppendHexU64@Base 1.4.0 + ZyanStringAppendHexU@Base 1.4.0 + ZyanStringClear@Base 1.4.0 + ZyanStringCompare@Base 1.4.0 + ZyanStringCompareI@Base 1.4.0 + ZyanStringConcat@Base 1.4.0 + ZyanStringConcatCustomBuffer@Base 1.4.0 + ZyanStringConcatEx@Base 1.4.0 + ZyanStringDelete@Base 1.4.0 + ZyanStringDestroy@Base 1.4.0 + ZyanStringDuplicate@Base 1.4.0 + ZyanStringDuplicateCustomBuffer@Base 1.4.0 + ZyanStringDuplicateEx@Base 1.4.0 + ZyanStringGetCapacity@Base 1.4.0 + ZyanStringGetChar@Base 1.4.0 + ZyanStringGetCharMutable@Base 1.4.0 + ZyanStringGetData@Base 1.4.0 + ZyanStringGetSize@Base 1.4.0 + ZyanStringInit@Base 1.4.0 + ZyanStringInitCustomBuffer@Base 1.4.0 + ZyanStringInitEx@Base 1.4.0 + ZyanStringInsert@Base 1.4.0 + ZyanStringInsertEx@Base 1.4.0 + ZyanStringLPos@Base 1.4.0 + ZyanStringLPosEx@Base 1.4.0 + ZyanStringLPosI@Base 1.4.0 + ZyanStringLPosIEx@Base 1.4.0 + ZyanStringRPos@Base 1.4.0 + ZyanStringRPosEx@Base 1.4.0 + ZyanStringRPosI@Base 1.4.0 + ZyanStringRPosIEx@Base 1.4.0 + ZyanStringReserve@Base 1.4.0 + ZyanStringResize@Base 1.4.0 + ZyanStringSetChar@Base 1.4.0 + ZyanStringShrinkToFit@Base 1.4.0 + ZyanStringToLowerCase@Base 1.4.0 + ZyanStringToLowerCaseEx@Base 1.4.0 + ZyanStringToUpperCase@Base 1.4.0 + ZyanStringToUpperCaseEx@Base 1.4.0 + ZyanStringTruncate@Base 1.4.0 + ZyanStringViewGetData@Base 1.4.0 + ZyanStringViewGetSize@Base 1.4.0 + ZyanStringViewInsideBuffer@Base 1.4.0 + ZyanStringViewInsideBufferEx@Base 1.4.0 + ZyanStringViewInsideView@Base 1.4.0 + ZyanStringViewInsideViewEx@Base 1.4.0 + ZyanTerminalEnableVT100@Base 1.4.0 + ZyanTerminalIsTTY@Base 1.4.0 + ZyanThreadGetCurrentThread@Base 1.4.0 + ZyanThreadGetCurrentThreadId@Base 1.4.0 + ZyanThreadTlsAlloc@Base 1.4.0 + ZyanThreadTlsFree@Base 1.4.0 + ZyanThreadTlsGetValue@Base 1.4.0 + ZyanThreadTlsSetValue@Base 1.4.0 + ZyanVectorBinarySearch@Base 1.4.0 + ZyanVectorBinarySearchEx@Base 1.4.0 + ZyanVectorClear@Base 1.4.0 + ZyanVectorDelete@Base 1.4.0 + ZyanVectorDeleteRange@Base 1.4.0 + ZyanVectorDestroy@Base 1.4.0 + ZyanVectorDuplicate@Base 1.4.0 + ZyanVectorDuplicateCustomBuffer@Base 1.4.0 + ZyanVectorDuplicateEx@Base 1.4.0 + ZyanVectorEmplace@Base 1.4.0 + ZyanVectorEmplaceEx@Base 1.4.0 + ZyanVectorFind@Base 1.4.0 + ZyanVectorFindEx@Base 1.4.0 + ZyanVectorGet@Base 1.4.0 + ZyanVectorGetCapacity@Base 1.4.0 + ZyanVectorGetMutable@Base 1.4.0 + ZyanVectorGetPointer@Base 1.4.0 + ZyanVectorGetPointerMutable@Base 1.4.0 + ZyanVectorGetSize@Base 1.4.0 + ZyanVectorInit@Base 1.4.0 + ZyanVectorInitCustomBuffer@Base 1.4.0 + ZyanVectorInitEx@Base 1.4.0 + ZyanVectorInsert@Base 1.4.0 + ZyanVectorInsertRange@Base 1.4.0 + ZyanVectorPopBack@Base 1.4.0 + ZyanVectorPushBack@Base 1.4.0 + ZyanVectorReserve@Base 1.4.0 + ZyanVectorResize@Base 1.4.0 + ZyanVectorResizeEx@Base 1.4.0 + ZyanVectorSet@Base 1.4.0 + ZyanVectorShrinkToFit@Base 1.4.0 + ZyanVectorSwapElements@Base 1.4.0 + ZycoreGetVersion@Base 1.4.0 diff -Nru zycore-c-1.1.0/debian/libzycore-dev.examples zycore-c-1.4.1/debian/libzycore-dev.examples --- zycore-c-1.1.0/debian/libzycore-dev.examples 2021-10-07 16:14:34.000000000 +0000 +++ zycore-c-1.4.1/debian/libzycore-dev.examples 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -examples/* diff -Nru zycore-c-1.1.0/debian/libzycore-doc.doc-base zycore-c-1.4.1/debian/libzycore-doc.doc-base --- zycore-c-1.1.0/debian/libzycore-doc.doc-base 1970-01-01 00:00:00.000000000 +0000 +++ zycore-c-1.4.1/debian/libzycore-doc.doc-base 2022-11-20 15:30:46.000000000 +0000 @@ -0,0 +1,10 @@ +Document: zycore +Title: Zycore API documentation +Author: zyantific +Abstract: Zyan Core (or zycore) is an internal library providing platform + independent types, macros and a fallback for environments without LibC. +Section: Programming/C + +Format: HTML +Index: /usr/share/doc/libzycore-doc/api/index.html +Files: /usr/share/doc/libzycore-doc/api/*.html diff -Nru zycore-c-1.1.0/debian/libzycore-doc.docs zycore-c-1.4.1/debian/libzycore-doc.docs --- zycore-c-1.1.0/debian/libzycore-doc.docs 1970-01-01 00:00:00.000000000 +0000 +++ zycore-c-1.4.1/debian/libzycore-doc.docs 2022-11-20 15:30:46.000000000 +0000 @@ -0,0 +1 @@ +usr/share/doc/Zycore/api/ diff -Nru zycore-c-1.1.0/debian/libzycore-doc.examples zycore-c-1.4.1/debian/libzycore-doc.examples --- zycore-c-1.1.0/debian/libzycore-doc.examples 1970-01-01 00:00:00.000000000 +0000 +++ zycore-c-1.4.1/debian/libzycore-doc.examples 2022-11-20 15:30:46.000000000 +0000 @@ -0,0 +1 @@ +examples/* diff -Nru zycore-c-1.1.0/debian/libzycore-doc.links zycore-c-1.4.1/debian/libzycore-doc.links --- zycore-c-1.1.0/debian/libzycore-doc.links 1970-01-01 00:00:00.000000000 +0000 +++ zycore-c-1.4.1/debian/libzycore-doc.links 2022-11-20 15:30:46.000000000 +0000 @@ -0,0 +1 @@ +/usr/share/javascript/jquery/jquery.js usr/share/doc/libzycore-doc/api/jquery.js diff -Nru zycore-c-1.1.0/debian/patches/build-use-system-GTest-when-available.patch zycore-c-1.4.1/debian/patches/build-use-system-GTest-when-available.patch --- zycore-c-1.1.0/debian/patches/build-use-system-GTest-when-available.patch 2021-11-12 12:15:38.000000000 +0000 +++ zycore-c-1.4.1/debian/patches/build-use-system-GTest-when-available.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,95 +0,0 @@ -Origin: upstream, https://github.com/zyantific/zycore-c/pull/38/commits/e0d4dd3571aefd014d3d9dd714468a3241026693 -Forwarded: https://github.com/zyantific/zycore-c/pull/38 -Last-Update: 2021-11-12 - -From e0d4dd3571aefd014d3d9dd714468a3241026693 Mon Sep 17 00:00:00 2001 -From: Andrea Pappacoda -Date: Fri, 12 Nov 2021 17:04:33 +0100 -Subject: [PATCH] build: use system GTest when available - -This reduces compile times and allows tests to be ran in environments -without internet access (e.g. when building a Debian package). - -CMake will look for an installed copy of GoogleTest on the system, and -will use it if found, and will fallback to download and unpack it -otherwise. - -There are a lot of checks involved since CMake changed the way FindGTest -works in newer CMake versions, and they are needed to ensure 3.1 -compatibility. ---- - CMakeLists.txt | 55 +++++++++++++++++++++++++++++++++----------------- - 1 file changed, 36 insertions(+), 19 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 90e495d..97ea83d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -63,31 +63,48 @@ endif () - # GoogleTest # - # =============================================================================================== # - --# Download and unpack googletest -+# Search for GoogleTest, and fallback to downloading it if not found - if (ZYCORE_BUILD_TESTS) -- if (NOT DEFINED ZYCORE_DOWNLOADED_GTEST) -- configure_file("CMakeLists.txt.in" "${CMAKE_BINARY_DIR}/gtest/download/CMakeLists.txt") -- execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . -- RESULT_VARIABLE result -- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/gtest/download") -- if (result) -- message(FATAL_ERROR "CMake step for googletest failed: ${result}") -- endif() -- execute_process(COMMAND ${CMAKE_COMMAND} --build . -- RESULT_VARIABLE result -- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/gtest/download") -- if (result) -- message(FATAL_ERROR "Build step for googletest failed: ${result}") -- endif() -- -- set(ZYCORE_DOWNLOADED_GTEST TRUE CACHE BOOL "") -- mark_as_advanced(ZYCORE_DOWNLOADED_GTEST) -- endif () -+ find_package(GTest QUIET) -+ if (GTest_FOUND) -+ # CMake 3.20 and upstream GTestConfig.cmake -+ if (TARGET GTest::gtest) -+ add_library(gtest ALIAS GTest::gtest) -+ # CMake 3.5 and newer -+ elseif (TARGET GTest::GTest) -+ add_library(gtest ALIAS GTest::GTest) -+ # Older CMake versions -+ else () -+ add_library(gtest INTERFACE) -+ find_package(Threads REQUIRED) -+ target_include_directories(gtest INTERFACE "${GTEST_INCLUDE_DIRS}") -+ target_link_libraries(gtest INTERFACE "${GTEST_LIBRARIES}" Threads::Threads) -+ endif () -+ else () -+ if (NOT DEFINED ZYCORE_DOWNLOADED_GTEST) -+ configure_file("CMakeLists.txt.in" "${CMAKE_BINARY_DIR}/gtest/download/CMakeLists.txt") -+ execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . -+ RESULT_VARIABLE result -+ WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/gtest/download") -+ if (result) -+ message(FATAL_ERROR "CMake step for googletest failed: ${result}") -+ endif() -+ execute_process(COMMAND ${CMAKE_COMMAND} --build . -+ RESULT_VARIABLE result -+ WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/gtest/download") -+ if (result) -+ message(FATAL_ERROR "Build step for googletest failed: ${result}") -+ endif() -+ -+ set(ZYCORE_DOWNLOADED_GTEST TRUE CACHE BOOL "") -+ mark_as_advanced(ZYCORE_DOWNLOADED_GTEST) -+ endif () - - set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) - - add_subdirectory("${CMAKE_BINARY_DIR}/gtest/src" "${CMAKE_BINARY_DIR}/gtest/build" - EXCLUDE_FROM_ALL) -+ endif () - endif () - - list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") diff -Nru zycore-c-1.1.0/debian/patches/series zycore-c-1.4.1/debian/patches/series --- zycore-c-1.1.0/debian/patches/series 2021-11-12 12:15:38.000000000 +0000 +++ zycore-c-1.4.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -test-make-tests-runnable-with-ctest.patch -build-use-system-GTest-when-available.patch diff -Nru zycore-c-1.1.0/debian/patches/test-make-tests-runnable-with-ctest.patch zycore-c-1.4.1/debian/patches/test-make-tests-runnable-with-ctest.patch --- zycore-c-1.1.0/debian/patches/test-make-tests-runnable-with-ctest.patch 2021-11-12 12:15:38.000000000 +0000 +++ zycore-c-1.4.1/debian/patches/test-make-tests-runnable-with-ctest.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ -Origin: upstream, https://github.com/zyantific/zycore-c/pull/38/commits/de914783032470d8f97565ccf46fe01941c862c4 -Forwarded: https://github.com/zyantific/zycore-c/pull/38 -Last-Update: 2021-11-12 - -From de914783032470d8f97565ccf46fe01941c862c4 Mon Sep 17 00:00:00 2001 -From: Andrea Pappacoda -Date: Fri, 12 Nov 2021 16:57:38 +0100 -Subject: [PATCH] test: make tests runnable with ctest - -This helps with automated testing, as tests can be ran with `ctest` or -by "building" the target `test` - -I also changed the way the C++ standard version is handled; the tests -require C++17, and this was previously accomplished by manually passing -the `-std=c++17` flag, while the "CMake way" of doing this is to set the -`CXX_STANDARD` property. Unfortunately the value `17` of the property -was only added in CMake 3.8, so when using older CMake versions the flag -is still passed manually. I've also set the `CXX_EXTENSIONS` and -`CXX_STANDARD_REQUIRED` to false and true, respectively, to ensure that -`-std=c++17` gets passed instead of `-std=gnu++17` on GCC-like compilers -and that CMake doesn't fallback to older standards versions when the -requested standard is not available. ---- - CMakeLists.txt | 20 ++++++++++++++------ - 1 file changed, 14 insertions(+), 6 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5110d0f..90e495d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -234,19 +234,27 @@ endif () - - function (zyan_add_test test) - add_executable("Test${test}" "tests/${test}.cpp") -- -- if (NOT MSVC) -- target_compile_options("Test${test}" PRIVATE "-std=c++17") -- endif () -- - target_link_libraries("Test${test}" "Zycore") - target_link_libraries("Test${test}" "gtest") -- set_target_properties("Test${test}" PROPERTIES FOLDER "Tests") -+ set_target_properties("Test${test}" PROPERTIES -+ LANGUAGE CXX -+ CXX_EXTENSIONS OFF -+ CXX_STANDARD_REQUIRED ON -+ FOLDER "Tests" -+ ) -+ # CXX_STANDARD 17 is only available in CMake 3.8 and newer -+ if (CMAKE_VERSION VERSION_GREATER "3.7") -+ set_target_properties("Test${test}" PROPERTIES CXX_STANDARD 17) -+ elseif(NOT MSVC) -+ target_compile_options("Test${test}" PRIVATE "-std=c++17") -+ endif () - target_compile_definitions("Test${test}" PRIVATE "_CRT_SECURE_NO_WARNINGS") - zyan_maybe_enable_wpo("Test${test}") -+ add_test("${test}" "Test${test}") - endfunction () - - if (ZYCORE_BUILD_TESTS) -+ enable_testing() - zyan_add_test("String") - zyan_add_test("Vector") - zyan_add_test("ArgParse") diff -Nru zycore-c-1.1.0/debian/rules zycore-c-1.4.1/debian/rules --- zycore-c-1.1.0/debian/rules 2021-12-07 10:47:16.000000000 +0000 +++ zycore-c-1.4.1/debian/rules 2022-11-20 15:30:46.000000000 +0000 @@ -1,13 +1,31 @@ #!/usr/bin/make -f -export DEB_BUILD_MAINT_OPTIONS = hardening=+all qa=+all +# optimize=-lto because zycore handles LTO in CMake +export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto qa=+all %: dh $@ +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + test := true +else + test := false +endif + override_dh_auto_configure: dh_auto_configure -- \ -DBUILD_SHARED_LIBS=ON \ -DZYAN_WHOLE_PROGRAM_OPTIMIZATION=ON \ -DZYCORE_BUILD_SHARED_LIB=ON \ - -DZYCORE_BUILD_TESTS=ON + -DZYCORE_BUILD_TESTS=$(test) + +override_dh_installdocs-indep: + dh_installdocs --indep --doc-main-package=libzycore-doc + +override_dh_installexamples-indep: + dh_installexamples --indep --doc-main-package=libzycore-doc + +ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) +execute_after_dh_installdocs-indep: + dh_doxygen --indep +endif diff -Nru zycore-c-1.1.0/debian/tests/cmake zycore-c-1.4.1/debian/tests/cmake --- zycore-c-1.1.0/debian/tests/cmake 1970-01-01 00:00:00.000000000 +0000 +++ zycore-c-1.4.1/debian/tests/cmake 2022-11-20 15:30:46.000000000 +0000 @@ -0,0 +1,21 @@ +#!/bin/sh + +set -eu + +cd "$AUTOPKGTEST_TMP" + +cat <<'EOF' > CMakeLists.txt +cmake_minimum_required(VERSION 3.13) + +project("zycore-autopkgtest" LANGUAGES C) + +find_package("zycore") + +add_executable(main "${test_file}") +target_link_libraries(main Zycore::Zycore) +EOF + +export CFLAGS='-Wall -Wextra -Wpedantic -Werror' + +cmake -Dtest_file:FILEPATH="$OLDPWD/examples/String.c" -B build +cmake --build build diff -Nru zycore-c-1.1.0/debian/tests/control zycore-c-1.4.1/debian/tests/control --- zycore-c-1.1.0/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ zycore-c-1.4.1/debian/tests/control 2022-11-20 15:30:46.000000000 +0000 @@ -0,0 +1,2 @@ +Tests: cmake +Depends: @, cmake, gcc | c-compiler, libc-dev diff -Nru zycore-c-1.1.0/debian/upstream/metadata zycore-c-1.4.1/debian/upstream/metadata --- zycore-c-1.1.0/debian/upstream/metadata 2021-10-07 16:14:34.000000000 +0000 +++ zycore-c-1.4.1/debian/upstream/metadata 2022-11-20 15:30:46.000000000 +0000 @@ -1,6 +1,6 @@ -Archive: GitHub Bug-Database: https://github.com/zyantific/zycore-c/issues Bug-Submit: https://github.com/zyantific/zycore-c/issues/new Changelog: https://github.com/zyantific/zycore-c/releases +Donation: https://github.com/sponsors/flobernd Repository: https://github.com/zyantific/zycore-c.git Repository-Browse: https://github.com/zyantific/zycore-c diff -Nru zycore-c-1.1.0/examples/Vector.c zycore-c-1.4.1/examples/Vector.c --- zycore-c-1.1.0/examples/Vector.c 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/examples/Vector.c 2022-11-20 13:58:40.000000000 +0000 @@ -98,6 +98,7 @@ { InitTestdata(&e_v, i); ZYAN_CHECK(ZyanVectorPushBack(vector, &e_v)); + printf("i=%d cap=%" PRIuPTR, i, vector->capacity); } // Remove elements `#05..#09` diff -Nru zycore-c-1.1.0/.github/FUNDING.yml zycore-c-1.4.1/.github/FUNDING.yml --- zycore-c-1.1.0/.github/FUNDING.yml 1970-01-01 00:00:00.000000000 +0000 +++ zycore-c-1.4.1/.github/FUNDING.yml 2022-11-20 13:58:40.000000000 +0000 @@ -0,0 +1 @@ +github: flobernd \ No newline at end of file diff -Nru zycore-c-1.1.0/.github/workflows/main.yml zycore-c-1.4.1/.github/workflows/main.yml --- zycore-c-1.1.0/.github/workflows/main.yml 1970-01-01 00:00:00.000000000 +0000 +++ zycore-c-1.4.1/.github/workflows/main.yml 2022-11-20 13:58:40.000000000 +0000 @@ -0,0 +1,86 @@ +name: GitHub Actions CI + +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] + +jobs: + build-linux: + name: Build ${{ matrix.platform.name }} ${{ matrix.compiler.name }} ${{ matrix.flavor }} (${{ matrix.mode.name }}) + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + platform: + - { name: x86, flags: "-m32" } + - { name: x64, flags: "-m64" } + compiler: + - { name: GNU, CC: gcc } + - { name: LLVM, CC: clang } + flavor: + - Debug + - Release + mode: + - { name: default, args: "" } + - { name: NO_LIBC, args: -DZYAN_NO_LIBC=ON } + + steps: + - name: Checkout + uses: actions/checkout@v3.1.0 + + - if: matrix.platform.name == 'x86' + name: Bootstrap + run: | + sudo dpkg --add-architecture i386 + sudo rm /etc/apt/sources.list.d/* && sudo apt-get update + sudo apt-get install -y g++-multilib g++ + + - name: Configure + env: + CC: ${{ matrix.compiler.CC }} + CXX: ${{ matrix.compiler.CXX }} + run: | + mkdir build + cd build + cmake -DCMAKE_C_FLAGS=${{ matrix.platform.flags }} -DCMAKE_CXX_FLAGS=${{ matrix.platform.flags }} -DZYAN_DEV_MODE=ON ${{ matrix.mode.args }} .. + + - name: Build + run: | + cmake --build build --config ${{ matrix.flavor }} + + build-windows: + name: Build ${{ matrix.platform.name }} ${{ matrix.compiler.name }} ${{ matrix.flavor }} (${{ matrix.mode.name }}) + runs-on: windows-latest + + strategy: + fail-fast: false + matrix: + platform: + - { name: x86, flags: "Win32" } + - { name: x64, flags: "x64" } + compiler: + - { name: MSVC } + flavor: + - Debug + - Release + mode: + - { name: default, args: "" } + - { name: NO_LIBC, args: -DZYAN_NO_LIBC=ON } + + steps: + - name: Checkout + uses: actions/checkout@v3.1.0 + + - name: Configure + run: | + mkdir build + cd build + cmake -DCMAKE_GENERATOR_PLATFORM=${{ matrix.platform.flags }} -DZYAN_DEV_MODE=ON ${{ matrix.mode.args }} .. + + - name: Build + run: | + cmake --build build --config ${{ matrix.flavor }} diff -Nru zycore-c-1.1.0/include/Zycore/Allocator.h zycore-c-1.4.1/include/Zycore/Allocator.h --- zycore-c-1.1.0/include/Zycore/Allocator.h 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/include/Zycore/Allocator.h 2022-11-20 13:58:40.000000000 +0000 @@ -32,7 +32,6 @@ #ifndef ZYCORE_ALLOCATOR_H #define ZYCORE_ALLOCATOR_H -#include #include #include diff -Nru zycore-c-1.1.0/include/Zycore/API/Memory.h zycore-c-1.4.1/include/Zycore/API/Memory.h --- zycore-c-1.1.0/include/Zycore/API/Memory.h 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/include/Zycore/API/Memory.h 2022-11-20 13:58:40.000000000 +0000 @@ -32,7 +32,6 @@ #ifndef ZYCORE_API_MEMORY_H #define ZYCORE_API_MEMORY_H -#include #include #include #include diff -Nru zycore-c-1.1.0/include/Zycore/API/Process.h zycore-c-1.4.1/include/Zycore/API/Process.h --- zycore-c-1.1.0/include/Zycore/API/Process.h 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/include/Zycore/API/Process.h 2022-11-20 13:58:40.000000000 +0000 @@ -32,7 +32,6 @@ #ifndef ZYCORE_API_PROCESS_H #define ZYCORE_API_PROCESS_H -#include #include #include diff -Nru zycore-c-1.1.0/include/Zycore/API/Synchronization.h zycore-c-1.4.1/include/Zycore/API/Synchronization.h --- zycore-c-1.1.0/include/Zycore/API/Synchronization.h 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/include/Zycore/API/Synchronization.h 2022-11-20 13:58:40.000000000 +0000 @@ -32,7 +32,6 @@ #ifndef ZYCORE_API_SYNCHRONIZATION_H #define ZYCORE_API_SYNCHRONIZATION_H -#include #include #include diff -Nru zycore-c-1.1.0/include/Zycore/API/Terminal.h zycore-c-1.4.1/include/Zycore/API/Terminal.h --- zycore-c-1.1.0/include/Zycore/API/Terminal.h 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/include/Zycore/API/Terminal.h 2022-11-20 13:58:40.000000000 +0000 @@ -32,7 +32,6 @@ #ifndef ZYCORE_API_TERMINAL_H #define ZYCORE_API_TERMINAL_H -#include #include #include diff -Nru zycore-c-1.1.0/include/Zycore/API/Thread.h zycore-c-1.4.1/include/Zycore/API/Thread.h --- zycore-c-1.1.0/include/Zycore/API/Thread.h 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/include/Zycore/API/Thread.h 2022-11-20 13:58:40.000000000 +0000 @@ -32,7 +32,6 @@ #ifndef ZYCORE_API_THREAD_H #define ZYCORE_API_THREAD_H -#include #include #include diff -Nru zycore-c-1.1.0/include/Zycore/Atomic.h zycore-c-1.4.1/include/Zycore/Atomic.h --- zycore-c-1.1.0/include/Zycore/Atomic.h 1970-01-01 00:00:00.000000000 +0000 +++ zycore-c-1.4.1/include/Zycore/Atomic.h 2022-11-20 13:58:40.000000000 +0000 @@ -0,0 +1,236 @@ +/*************************************************************************************************** + + Zyan Core Library (Zyan-C) + + Original Author : Florian Bernd + + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + +***************************************************************************************************/ + +/** + * @file + * Cross compiler atomic intrinsics. + */ + +#ifndef ZYCORE_ATOMIC_H +#define ZYCORE_ATOMIC_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +/* ============================================================================================== */ +/* Enums and Types */ +/* ============================================================================================== */ + +/* + * Wraps a 32-bit value to provide atomic access. + */ +typedef struct ZyanAtomic32_ +{ + ZyanU32 volatile value; +} ZyanAtomic32; + +/* + * Wraps a 64-bit value to provide atomic access. + */ +typedef struct ZyanAtomic64_ +{ + ZyanU64 volatile value; +} ZyanAtomic64; + +/* + * Wraps a pointer-sized value to provide atomic access. + */ +typedef struct ZyanAtomicPointer_ +{ + ZyanVoidPointer volatile value; +} ZyanAtomicPointer; + +/* ============================================================================================== */ +/* Macros */ +/* ============================================================================================== */ + +/* ---------------------------------------------------------------------------------------------- */ +/* Pointer sized */ +/* ---------------------------------------------------------------------------------------------- */ + +/** + * @copydoc ZyanAtomicCompareExchange + */ +#define ZYAN_ATOMIC_COMPARE_EXCHANGE(destination, comparand, value) \ + ZyanAtomicCompareExchange((ZyanAtomicPointer*)&(destination), (comparand), (value)) + +/** + * @copydoc ZyanAtomicIncrement + */ +#define ZYAN_ATOMIC_INCREMENT(destination) \ + ZyanAtomicIncrement((ZyanAtomicPointer*)&(destination)); + +/** + * @copydoc ZyanAtomicDecrement + */ +#define ZYAN_ATOMIC_DECREMENT(destination) \ + ZyanAtomicDecrement((ZyanAtomicPointer*)&(destination)); + +/* ---------------------------------------------------------------------------------------------- */ +/* 32-bit */ +/* ---------------------------------------------------------------------------------------------- */ + +/** + * @copydoc ZyanAtomicCompareExchange + */ +#define ZYAN_ATOMIC_COMPARE_EXCHANGE32(destination, comparand, value) \ + ZyanAtomicCompareExchange32((ZyanAtomic32*)&(destination), (comparand), (value)) + +/** + * @copydoc ZyanAtomicIncrement + */ +#define ZYAN_ATOMIC_INCREMENT32(destination) \ + ZyanAtomicIncrement32((ZyanAtomic32*)&(destination)); + +/** + * @copydoc ZyanAtomicDecrement + */ +#define ZYAN_ATOMIC_DECREMENT32(destination) \ + ZyanAtomicDecrement32((ZyanAtomic32*)&(destination)); + +/* ---------------------------------------------------------------------------------------------- */ +/* 64-bit */ +/* ---------------------------------------------------------------------------------------------- */ + +/** + * @copydoc ZyanAtomicCompareExchange + */ +#define ZYAN_ATOMIC_COMPARE_EXCHANGE64(destination, comparand, value) \ + ZyanAtomicCompareExchange64((ZyanAtomic64*)&(destination), (comparand), (value)) + +/** + * @copydoc ZyanAtomicIncrement + */ +#define ZYAN_ATOMIC_INCREMENT64(destination) \ + ZyanAtomicIncrement64((ZyanAtomic64*)&(destination)); + +/** + * @copydoc ZyanAtomicDecrement + */ +#define ZYAN_ATOMIC_DECREMENT64(destination) \ + ZyanAtomicDecrement64((ZyanAtomic64*)&(destination)); + +/* ---------------------------------------------------------------------------------------------- */ + +/* ============================================================================================== */ +/* Functions */ +/* ============================================================================================== */ + +/* ---------------------------------------------------------------------------------------------- */ +/* Pointer sized */ +/* ---------------------------------------------------------------------------------------------- */ + +/** + * Compares two values for equality and, if they are equal, replaces the first value. + * + * @param destination A pointer to the destination value. + * @param comparand The value to compare with. + * @param value The replacement value. + * + * @return The original value. + */ +static ZyanUPointer ZyanAtomicCompareExchange(ZyanAtomicPointer* destination, + ZyanUPointer comparand, ZyanUPointer value); + +/** + * Increments the given value and stores the result, as an atomic operation. + * + * @param destination A pointer to the destination value. + * + * @return The incremented value. +*/ +static ZyanUPointer ZyanAtomicIncrement(ZyanAtomicPointer* destination); + +/** + * Decrements the given value and stores the result, as an atomic operation. + * + * @param destination A pointer to the destination value. + * + * @return The decremented value. +*/ +static ZyanUPointer ZyanAtomicDecrement(ZyanAtomicPointer* destination); + +/* ---------------------------------------------------------------------------------------------- */ +/* 32-bit */ +/* ---------------------------------------------------------------------------------------------- */ + +/** + * @copydoc ZyanAtomicCompareExchange + */ +static ZyanU32 ZyanAtomicCompareExchange32(ZyanAtomic32* destination, + ZyanU32 comparand, ZyanU32 value); + +/** + * @copydoc ZyanAtomicIncrement + */ +static ZyanU32 ZyanAtomicIncrement32(ZyanAtomic32* destination); + +/** + * @copydoc ZyanAtomicDecrement + */ +static ZyanU32 ZyanAtomicDecrement32(ZyanAtomic32* destination); + +/* ---------------------------------------------------------------------------------------------- */ +/* 64-bit */ +/* ---------------------------------------------------------------------------------------------- */ + +/** + * @copydoc ZyanAtomicCompareExchange + */ +static ZyanU64 ZyanAtomicCompareExchange64(ZyanAtomic64* destination, + ZyanU64 comparand, ZyanU64 value); + +/** + * @copydoc ZyanAtomicIncrement + */ +static ZyanU64 ZyanAtomicIncrement64(ZyanAtomic64* destination); + +/** + * @copydoc ZyanAtomicDecrement + */ +static ZyanU64 ZyanAtomicDecrement64(ZyanAtomic64* destination); + +/* ---------------------------------------------------------------------------------------------- */ + +/* ============================================================================================== */ + +#if defined(ZYAN_CLANG) || defined(ZYAN_GCC) || defined(ZYAN_ICC) +# include +#elif defined(ZYAN_MSVC) +# include +#else +# error "Unsupported compiler detected" +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* ZYCORE_ATOMIC_H */ diff -Nru zycore-c-1.1.0/include/Zycore/Bitset.h zycore-c-1.4.1/include/Zycore/Bitset.h --- zycore-c-1.1.0/include/Zycore/Bitset.h 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/include/Zycore/Bitset.h 2022-11-20 13:58:40.000000000 +0000 @@ -32,7 +32,6 @@ #ifndef ZYCORE_BITSET_H #define ZYCORE_BITSET_H -#include #include #include #include diff -Nru zycore-c-1.1.0/include/Zycore/Defines.h zycore-c-1.4.1/include/Zycore/Defines.h --- zycore-c-1.1.0/include/Zycore/Defines.h 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/include/Zycore/Defines.h 2022-11-20 13:58:40.000000000 +0000 @@ -85,6 +85,9 @@ # define ZYAN_WINDOWS #elif defined(__EMSCRIPTEN__) # define ZYAN_EMSCRIPTEN +#elif defined(__wasi__) || defined(__WASI__) +// via: https://reviews.llvm.org/D57155 +# define ZYAN_WASI #elif defined(__APPLE__) # define ZYAN_APPLE # define ZYAN_POSIX @@ -131,8 +134,14 @@ # define ZYAN_AARCH64 #elif defined(_M_ARM) || defined(_M_ARMT) || defined(__arm__) || defined(__thumb__) # define ZYAN_ARM -#elif defined(__EMSCRIPTEN__) - // Nothing to do, `ZYAN_EMSCRIPTEN` is both platform and arch macro for this one. +#elif defined(__EMSCRIPTEN__) || defined(__wasm__) || defined(__WASM__) +# define ZYAN_WASM +#elif defined(__powerpc64__) +# define ZYAN_PPC64 +#elif defined(__powerpc__) +# define ZYAN_PPC +#elif defined(__riscv) && __riscv_xlen == 64 +# define ZYAN_RISCV64 #else # error "Unsupported architecture detected" #endif @@ -158,6 +167,73 @@ #endif /* ============================================================================================== */ +/* Deprecation hint */ +/* ============================================================================================== */ + +#if defined(ZYAN_GCC) || defined(ZYAN_CLANG) +# define ZYAN_DEPRECATED __attribute__((__deprecated__)) +#elif defined(ZYAN_MSVC) +# define ZYAN_DEPRECATED __declspec(deprecated) +#else +# define ZYAN_DEPRECATED +#endif + +/* ============================================================================================== */ +/* Generic DLL import/export helpers */ +/* ============================================================================================== */ + +#if defined(ZYAN_MSVC) +# define ZYAN_DLLEXPORT __declspec(dllexport) +# define ZYAN_DLLIMPORT __declspec(dllimport) +#else +# define ZYAN_DLLEXPORT +# define ZYAN_DLLIMPORT +#endif + +/* ============================================================================================== */ +/* Zycore dll{export,import} */ +/* ============================================================================================== */ + +// This is a cut-down version of what CMake's `GenerateExportHeader` would usually generate. To +// simplify builds without CMake, we define these things manually instead of relying on CMake +// to generate the header. +// +// For static builds, our CMakeList will define `ZYCORE_STATIC_BUILD`. For shared library builds, +// our CMake will define `ZYCORE_SHOULD_EXPORT` depending on whether the target is being imported or +// exported. If CMake isn't used, users can manually define these to fit their use-case. + +// Backward compatibility: CMake would previously generate these variables names. However, because +// they have pretty cryptic names, we renamed them when we got rid of `GenerateExportHeader`. For +// backward compatibility for users that don't use CMake and previously manually defined these, we +// translate the old defines here and print a warning. +#if defined(ZYCORE_STATIC_DEFINE) +# pragma message("ZYCORE_STATIC_DEFINE was renamed to ZYCORE_STATIC_BUILD.") +# define ZYCORE_STATIC_BUILD +#endif +#if defined(Zycore_EXPORTS) +# pragma message("Zycore_EXPORTS was renamed to ZYCORE_SHOULD_EXPORT.") +# define ZYCORE_SHOULD_EXPORT +#endif + +/** + * Symbol is exported in shared library builds. + */ +#if defined(ZYCORE_STATIC_BUILD) +# define ZYCORE_EXPORT +#else +# if defined(ZYCORE_SHOULD_EXPORT) +# define ZYCORE_EXPORT ZYAN_DLLEXPORT +# else +# define ZYCORE_EXPORT ZYAN_DLLIMPORT +# endif +#endif + +/** + * Symbol is not exported and for internal use only. + */ +#define ZYCORE_NO_EXPORT + +/* ============================================================================================== */ /* Misc compatibility macros */ /* ============================================================================================== */ @@ -201,7 +277,7 @@ /** * Compiler-time assertion. */ -#if __STDC_VERSION__ >= 201112L && !defined(__cplusplus) +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(__cplusplus) # define ZYAN_STATIC_ASSERT(x) _Static_assert(x, #x) #elif (defined(__cplusplus) && __cplusplus >= 201103L) || \ (defined(__cplusplus) && defined (_MSC_VER) && (_MSC_VER >= 1600)) || \ @@ -264,7 +340,7 @@ * Intentional fallthrough. */ #if defined(ZYAN_GCC) && __GNUC__ >= 7 -# define ZYAN_FALLTHROUGH __attribute__((__fallthrough__)) +# define ZYAN_FALLTHROUGH ; __attribute__((__fallthrough__)) #else # define ZYAN_FALLTHROUGH #endif diff -Nru zycore-c-1.1.0/include/Zycore/Format.h zycore-c-1.4.1/include/Zycore/Format.h --- zycore-c-1.1.0/include/Zycore/Format.h 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/include/Zycore/Format.h 2022-11-20 13:58:40.000000000 +0000 @@ -32,7 +32,6 @@ #ifndef ZYCORE_FORMAT_H #define ZYCORE_FORMAT_H -#include #include #include #include diff -Nru zycore-c-1.1.0/include/Zycore/Internal/AtomicGNU.h zycore-c-1.4.1/include/Zycore/Internal/AtomicGNU.h --- zycore-c-1.1.0/include/Zycore/Internal/AtomicGNU.h 1970-01-01 00:00:00.000000000 +0000 +++ zycore-c-1.4.1/include/Zycore/Internal/AtomicGNU.h 2022-11-20 13:58:40.000000000 +0000 @@ -0,0 +1,117 @@ +/*************************************************************************************************** + + Zyan Core Library (Zyan-C) + + Original Author : Florian Bernd + + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + +***************************************************************************************************/ + +#ifndef ZYCORE_ATOMIC_GNU_H +#define ZYCORE_ATOMIC_GNU_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +/* ============================================================================================== */ +/* Functions */ +/* ============================================================================================== */ + +#if defined(ZYAN_CLANG) || defined(ZYAN_GCC) || defined(ZYAN_ICC) + +/* ---------------------------------------------------------------------------------------------- */ +/* Pointer sized */ +/* ---------------------------------------------------------------------------------------------- */ + +ZYAN_INLINE ZyanUPointer ZyanAtomicCompareExchange(ZyanAtomicPointer* destination, + ZyanUPointer comparand, ZyanUPointer value) +{ + return (ZyanUPointer)(__sync_val_compare_and_swap( + &destination->value, (void*)comparand, (void*)value, &destination->value)); +} + +ZYAN_INLINE ZyanUPointer ZyanAtomicIncrement(ZyanAtomicPointer* destination) +{ + return (ZyanUPointer)(__sync_fetch_and_add(&destination->value, (void*)1, + &destination->value)) + 1; +} + +ZYAN_INLINE ZyanUPointer ZyanAtomicDecrement(ZyanAtomicPointer* destination) +{ + return (ZyanUPointer)(__sync_sub_and_fetch(&destination->value, (void*)1, &destination->value)); +} + +/* ---------------------------------------------------------------------------------------------- */ +/* 32-bit */ +/* ---------------------------------------------------------------------------------------------- */ + +ZYAN_INLINE ZyanU32 ZyanAtomicCompareExchange32(ZyanAtomic32* destination, + ZyanU32 comparand, ZyanU32 value) +{ + return (ZyanU32)(__sync_val_compare_and_swap(&destination->value, comparand, value, + &destination->value)); +} + +ZYAN_INLINE ZyanU32 ZyanAtomicIncrement32(ZyanAtomic32* destination) +{ + return (ZyanU32)(__sync_fetch_and_add(&destination->value, 1, &destination->value)) + 1; +} + +ZYAN_INLINE ZyanU32 ZyanAtomicDecrement32(ZyanAtomic32* destination) +{ + return (ZyanU32)(__sync_sub_and_fetch(&destination->value, 1, &destination->value)); +} + +/* ---------------------------------------------------------------------------------------------- */ +/* 64-bit */ +/* ---------------------------------------------------------------------------------------------- */ + +ZYAN_INLINE ZyanU64 ZyanAtomicCompareExchange64(ZyanAtomic64* destination, + ZyanU64 comparand, ZyanU64 value) +{ + return (ZyanU64)(__sync_val_compare_and_swap(&destination->value, comparand, value, + &destination->value)); +} + +ZYAN_INLINE ZyanU64 ZyanAtomicIncrement64(ZyanAtomic64* destination) +{ + return (ZyanU64)(__sync_fetch_and_add(&destination->value, 1, &destination->value)) + 1; +} + +ZYAN_INLINE ZyanU64 ZyanAtomicDecrement64(ZyanAtomic64* destination) +{ + return (ZyanU64)(__sync_sub_and_fetch(&destination->value, 1, &destination->value)); +} + +/* ---------------------------------------------------------------------------------------------- */ + +#endif + +/* ============================================================================================== */ + +#ifdef __cplusplus +} +#endif + +#endif /* ZYCORE_ATOMIC_GNU_H */ diff -Nru zycore-c-1.1.0/include/Zycore/Internal/AtomicMSVC.h zycore-c-1.4.1/include/Zycore/Internal/AtomicMSVC.h --- zycore-c-1.1.0/include/Zycore/Internal/AtomicMSVC.h 1970-01-01 00:00:00.000000000 +0000 +++ zycore-c-1.4.1/include/Zycore/Internal/AtomicMSVC.h 2022-11-20 13:58:40.000000000 +0000 @@ -0,0 +1,141 @@ +/*************************************************************************************************** + + Zyan Core Library (Zyan-C) + + Original Author : Florian Bernd + + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + +***************************************************************************************************/ + +#ifndef ZYCORE_ATOMIC_MSVC_H +#define ZYCORE_ATOMIC_MSVC_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#include +#include + +/* ============================================================================================== */ +/* Functions */ +/* ============================================================================================== */ + +#if defined(ZYAN_MSVC) + +/* ---------------------------------------------------------------------------------------------- */ +/* Pointer sized */ +/* ---------------------------------------------------------------------------------------------- */ + +#if defined(ZYAN_X86) + +static ZYAN_INLINE ZyanUPointer ZyanAtomicCompareExchange(ZyanAtomicPointer* destination, + ZyanUPointer comparand, ZyanUPointer value) +{ + return (ZyanUPointer)ZyanAtomicCompareExchange32((ZyanAtomic32*)destination, comparand, value); +} + +static ZYAN_INLINE ZyanUPointer ZyanAtomicIncrement(ZyanAtomicPointer* destination) +{ + return (ZyanUPointer)ZyanAtomicIncrement32((ZyanAtomic32*)destination); +} + +static ZYAN_INLINE ZyanUPointer ZyanAtomicDecrement(ZyanAtomicPointer* destination) +{ + return (ZyanUPointer)ZyanAtomicDecrement32((ZyanAtomic32*)destination); +} + +#elif defined(ZYAN_X64) + +static ZYAN_INLINE ZyanUPointer ZyanAtomicCompareExchange(ZyanAtomicPointer* destination, + ZyanUPointer comparand, ZyanUPointer value) +{ + return (ZyanUPointer)ZyanAtomicCompareExchange64((ZyanAtomic64*)destination, comparand, value); +} + +static ZYAN_INLINE ZyanUPointer ZyanAtomicIncrement(ZyanAtomicPointer* destination) +{ + return (ZyanUPointer)ZyanAtomicIncrement64((ZyanAtomic64*)destination); +} + +static ZYAN_INLINE ZyanUPointer ZyanAtomicDecrement(ZyanAtomicPointer* destination) +{ + return (ZyanUPointer)ZyanAtomicDecrement64((ZyanAtomic64*)destination); +} + +#else +# error "Unsupported architecture detected" +#endif + +/* ---------------------------------------------------------------------------------------------- */ +/* 32-bit */ +/* ---------------------------------------------------------------------------------------------- */ + +static ZYAN_INLINE ZyanU32 ZyanAtomicCompareExchange32(ZyanAtomic32* destination, + ZyanU32 comparand, ZyanU32 value) +{ + return (ZyanU32)(_InterlockedCompareExchange((volatile LONG*)&(destination->value), + (LONG)value, (LONG)comparand)); +} + +static ZYAN_INLINE ZyanU32 ZyanAtomicIncrement32(ZyanAtomic32* destination) +{ + return (ZyanU32)(_InterlockedIncrement((volatile LONG*)&(destination->value))); +} + +static ZYAN_INLINE ZyanU32 ZyanAtomicDecrement32(ZyanAtomic32* destination) +{ + return (ZyanU32)(_InterlockedDecrement((volatile LONG*)&(destination->value))); +} + +/* ---------------------------------------------------------------------------------------------- */ +/* 64-bit */ +/* ---------------------------------------------------------------------------------------------- */ + +static ZYAN_INLINE ZyanU64 ZyanAtomicCompareExchange64(ZyanAtomic64* destination, + ZyanU64 comparand, ZyanU64 value) +{ + return (ZyanU64)(_InterlockedCompareExchange64((volatile LONG64*)&(destination->value), + (LONG64)value, (LONG64)comparand)); +} + +static ZYAN_INLINE ZyanU64 ZyanAtomicIncrement64(ZyanAtomic64* destination) +{ + return (ZyanU64)(_InterlockedIncrement64((volatile LONG64*)&(destination->value))); +} + +static ZYAN_INLINE ZyanU64 ZyanAtomicDecrement64(ZyanAtomic64* destination) +{ + return (ZyanU64)(_InterlockedDecrement64((volatile LONG64*)&(destination->value))); +} + +/* ---------------------------------------------------------------------------------------------- */ + +#endif + +/* ============================================================================================== */ + +#ifdef __cplusplus +} +#endif + +#endif /* ZYCORE_ATOMIC_MSVC_H */ diff -Nru zycore-c-1.1.0/include/Zycore/List.h zycore-c-1.4.1/include/Zycore/List.h --- zycore-c-1.1.0/include/Zycore/List.h 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/include/Zycore/List.h 2022-11-20 13:58:40.000000000 +0000 @@ -32,7 +32,6 @@ #ifndef ZYCORE_LIST_H #define ZYCORE_LIST_H -#include #include #include #include diff -Nru zycore-c-1.1.0/include/Zycore/String.h zycore-c-1.4.1/include/Zycore/String.h --- zycore-c-1.1.0/include/Zycore/String.h 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/include/Zycore/String.h 2022-11-20 13:58:40.000000000 +0000 @@ -32,7 +32,6 @@ #ifndef ZYCORE_STRING_H #define ZYCORE_STRING_H -#include #include #include #include diff -Nru zycore-c-1.1.0/include/Zycore/Types.h zycore-c-1.4.1/include/Zycore/Types.h --- zycore-c-1.1.0/include/Zycore/Types.h 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/include/Zycore/Types.h 2022-11-20 13:58:40.000000000 +0000 @@ -163,7 +163,7 @@ /** * Defines the `ZyanVoidPointer` data-type. */ -typedef char* ZyanVoidPointer; +typedef void* ZyanVoidPointer; /** * Defines the `ZyanConstVoidPointer` data-type. @@ -180,8 +180,8 @@ /* Boolean */ /* ---------------------------------------------------------------------------------------------- */ -#define ZYAN_FALSE 0 -#define ZYAN_TRUE 1 +#define ZYAN_FALSE 0u +#define ZYAN_TRUE 1u /** * Defines the `ZyanBool` data-type. diff -Nru zycore-c-1.1.0/include/Zycore/Vector.h zycore-c-1.4.1/include/Zycore/Vector.h --- zycore-c-1.1.0/include/Zycore/Vector.h 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/include/Zycore/Vector.h 2022-11-20 13:58:40.000000000 +0000 @@ -32,7 +32,6 @@ #ifndef ZYCORE_VECTOR_H #define ZYCORE_VECTOR_H -#include #include #include #include @@ -193,7 +192,7 @@ ZYAN_MACRO_CONCAT_EXPAND(size_d50d3303, item_name); \ ++ZYAN_MACRO_CONCAT_EXPAND(i_bfd62679, item_name)) \ { \ - (type)* const item_name = ZyanVectorGetMutable(vector, \ + type* const item_name = ZyanVectorGetMutable(vector, \ ZYAN_MACRO_CONCAT_EXPAND(i_bfd62679, item_name)); \ body \ } \ diff -Nru zycore-c-1.1.0/include/Zycore/Zycore.h zycore-c-1.4.1/include/Zycore/Zycore.h --- zycore-c-1.1.0/include/Zycore/Zycore.h 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/include/Zycore/Zycore.h 2022-11-20 13:58:40.000000000 +0000 @@ -32,7 +32,6 @@ #ifndef ZYCORE_H #define ZYCORE_H -#include #include // TODO: @@ -52,7 +51,7 @@ /** * A macro that defines the zycore version. */ -#define ZYCORE_VERSION (ZyanU64)0x0001000100000000 +#define ZYCORE_VERSION (ZyanU64)0x0001000400010000 /* ---------------------------------------------------------------------------------------------- */ /* Helper macros */ diff -Nru zycore-c-1.1.0/README.md zycore-c-1.4.1/README.md --- zycore-c-1.1.0/README.md 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/README.md 2022-11-20 13:58:40.000000000 +0000 @@ -1,5 +1,9 @@ # Zyan Core Library for C +License: MIT +GitHub Actions +Discord + Internal library providing platform independent types, macros and a fallback for environments without LibC. ## Features Binary files /tmp/tmpa06t0yt9/4wwoQXLsqK/zycore-c-1.1.0/resources/VersionInfo.rc and /tmp/tmpa06t0yt9/fweoBe2xd9/zycore-c-1.4.1/resources/VersionInfo.rc differ diff -Nru zycore-c-1.1.0/src/API/Process.c zycore-c-1.4.1/src/API/Process.c --- zycore-c-1.1.0/src/API/Process.c 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/src/API/Process.c 2022-11-20 13:58:40.000000000 +0000 @@ -25,6 +25,10 @@ ***************************************************************************************************/ #include +#include + +#ifndef ZYAN_NO_LIBC + #if defined(ZYAN_WINDOWS) #if defined(ZYAN_KERNEL) # include @@ -36,9 +40,6 @@ #else # error "Unsupported platform detected" #endif -#include - -#ifndef ZYAN_NO_LIBC /* ============================================================================================== */ /* Exported functions */ diff -Nru zycore-c-1.1.0/src/Format.c zycore-c-1.4.1/src/Format.c --- zycore-c-1.1.0/src/Format.c 2021-10-26 05:13:51.000000000 +0000 +++ zycore-c-1.4.1/src/Format.c 2022-11-20 13:58:40.000000000 +0000 @@ -83,7 +83,7 @@ /* Decimal */ /* ---------------------------------------------------------------------------------------------- */ -#if defined(ZYAN_X86) || defined(ZYAN_ARM) || defined(ZYAN_EMSCRIPTEN) +#if defined(ZYAN_X86) || defined(ZYAN_ARM) || defined(ZYAN_EMSCRIPTEN) || defined(ZYAN_WASM) || defined(ZYAN_PPC) ZyanStatus ZyanStringAppendDecU32(ZyanString* string, ZyanU32 value, ZyanU8 padding_length) { if (!string) @@ -179,7 +179,7 @@ /* Hexadecimal */ /* ---------------------------------------------------------------------------------------------- */ -#if defined(ZYAN_X86) || defined(ZYAN_ARM) || defined(ZYAN_EMSCRIPTEN) +#if defined(ZYAN_X86) || defined(ZYAN_ARM) || defined(ZYAN_EMSCRIPTEN) || defined(ZYAN_WASM) || defined(ZYAN_PPC) ZyanStatus ZyanStringAppendHexU32(ZyanString* string, ZyanU32 value, ZyanU8 padding_length, ZyanBool uppercase) { @@ -423,7 +423,7 @@ ZyanStatus ZyanStringAppendDecU(ZyanString* string, ZyanU64 value, ZyanU8 padding_length) { -#if defined(ZYAN_X64) || defined(ZYAN_AARCH64) +#if defined(ZYAN_X64) || defined(ZYAN_AARCH64) || defined(ZYAN_PPC64) || defined(ZYAN_RISCV64) return ZyanStringAppendDecU64(string, value, padding_length); #else // Working with 64-bit values is slow on non 64-bit systems @@ -464,7 +464,7 @@ ZyanStatus ZyanStringAppendHexU(ZyanString* string, ZyanU64 value, ZyanU8 padding_length, ZyanBool uppercase) { -#if defined(ZYAN_X64) || defined(ZYAN_AARCH64) +#if defined(ZYAN_X64) || defined(ZYAN_AARCH64) || defined(ZYAN_PPC64) || defined(ZYAN_RISCV64) return ZyanStringAppendHexU64(string, value, padding_length, uppercase); #else // Working with 64-bit values is slow on non 64-bit systems