externals: Update zycore to 1.4.1

Merge commit 'cd2ede593acee9c4956c79da4377ce890ac3a9c0'
This commit is contained in:
Alexandre Bouvier
2022-11-20 21:49:18 +01:00
35 changed files with 1120 additions and 228 deletions

View File

@@ -26,6 +26,8 @@
#include <Zycore/API/Memory.h>
#ifndef ZYAN_NO_LIBC
#if defined(ZYAN_WINDOWS)
#elif defined(ZYAN_POSIX)
@@ -126,3 +128,5 @@ ZyanStatus ZyanMemoryVirtualFree(void* address, ZyanUSize size)
/* ---------------------------------------------------------------------------------------------- */
/* ============================================================================================== */
#endif /* ZYAN_NO_LIBC */

View File

@@ -25,14 +25,21 @@
***************************************************************************************************/
#include <Zycore/Defines.h>
#if defined(ZYAN_WINDOWS)
# include <windows.h>
#include <Zycore/API/Process.h>
#ifndef ZYAN_NO_LIBC
#if defined(ZYAN_WINDOWS)
#if defined(ZYAN_KERNEL)
# include <wdm.h>
#else
# include <windows.h>
#endif
#elif defined(ZYAN_POSIX)
# include <sys/mman.h>
#else
# error "Unsupported platform detected"
#endif
#include <Zycore/API/Process.h>
/* ============================================================================================== */
/* Exported functions */
@@ -66,3 +73,5 @@ ZyanStatus ZyanProcessFlushInstructionCache(void* address, ZyanUSize size)
/* ---------------------------------------------------------------------------------------------- */
/* ============================================================================================== */
#endif /* ZYAN_NO_LIBC */

View File

@@ -26,6 +26,8 @@
#include <Zycore/API/Synchronization.h>
#ifndef ZYAN_NO_LIBC
/* ============================================================================================== */
/* Internal functions */
/* ============================================================================================== */
@@ -198,3 +200,5 @@ ZyanStatus ZyanCriticalSectionDelete(ZyanCriticalSection* critical_section)
#endif
/* ============================================================================================== */
#endif /* ZYAN_NO_LIBC */

View File

@@ -26,6 +26,8 @@
#include <Zycore/API/Terminal.h>
#ifndef ZYAN_NO_LIBC
#if defined(ZYAN_POSIX)
# include <unistd.h>
#elif defined(ZYAN_WINDOWS)
@@ -154,3 +156,5 @@ ZyanStatus ZyanTerminalIsTTY(ZyanStandardStream stream)
}
/* ============================================================================================== */
#endif /* ZYAN_NO_LIBC */

View File

@@ -26,14 +26,62 @@
#include <Zycore/API/Thread.h>
#ifndef ZYAN_NO_LIBC
/* ============================================================================================== */
/* Internal functions */
/* ============================================================================================== */
/* ---------------------------------------------------------------------------------------------- */
/* */
/* Legacy Windows import declarations */
/* ---------------------------------------------------------------------------------------------- */
#if defined(ZYAN_WINDOWS) && defined(_WIN32_WINNT) && \
(_WIN32_WINNT >= 0x0501) && (_WIN32_WINNT < 0x0600)
/**
* The Windows SDK conditionally declares the following prototypes: the target OS must be Vista
* (0x0600) or above. MSDN states the same incorrect minimum requirement for the Fls* functions.
*
* However, these functions exist and work perfectly fine on XP (SP3) and Server 2003.
* Preserve backward compatibility with these OSes by declaring the prototypes here if needed.
*/
#ifndef FLS_OUT_OF_INDEXES
#define FLS_OUT_OF_INDEXES ((DWORD)0xFFFFFFFF)
#endif
WINBASEAPI
DWORD
WINAPI
FlsAlloc(
_In_opt_ PFLS_CALLBACK_FUNCTION lpCallback
);
WINBASEAPI
PVOID
WINAPI
FlsGetValue(
_In_ DWORD dwFlsIndex
);
WINBASEAPI
BOOL
WINAPI
FlsSetValue(
_In_ DWORD dwFlsIndex,
_In_opt_ PVOID lpFlsData
);
WINBASEAPI
BOOL
WINAPI
FlsFree(
_In_ DWORD dwFlsIndex
);
#endif /* (_WIN32_WINNT >= 0x0501) && (_WIN32_WINNT < 0x0600)*/
/* ---------------------------------------------------------------------------------------------- */
@@ -192,3 +240,5 @@ ZyanStatus ZyanThreadTlsSetValue(ZyanThreadTlsIndex index, void* data)
#endif
/* ============================================================================================== */
#endif /* ZYAN_NO_LIBC */