| author | |
| committer | |
| log | 8019694e17b6e6b6d3f9cab91233deea7c39a301 |
| tree | eed1466c4299241a1392ef5f26b910ead8f74a5d |
| parent | fb43e91b226a9cde51967455c57989c0371d4b0a |
Closes #22475.2 files changed, 18 insertions(+), 0 deletions(-)
lib/libc/mingw/crt/intrincs/RtlSecureZeroMemory.c created+17| ... | ... | @@ -0,0 +1,17 @@ |
| 1 | #define __CRT__NO_INLINE 1 | |
| 2 | #include <windows.h> | |
| 3 | ||
| 4 | PVOID WINAPI RtlSecureZeroMemory(PVOID ptr,SIZE_T cnt) | |
| 5 | { | |
| 6 | volatile char *vptr = (volatile char *)ptr; | |
| 7 | #ifdef __x86_64 | |
| 8 | __stosb ((PBYTE)((DWORD64)vptr),0,cnt); | |
| 9 | #else | |
| 10 | while (cnt != 0) | |
| 11 | { | |
| 12 | *vptr++ = 0; | |
| 13 | cnt--; | |
| 14 | } | |
| 15 | #endif /* __x86_64 */ | |
| 16 | return ptr; | |
| 17 | } |
src/mingw.zig+1| ... | ... | @@ -487,6 +487,7 @@ const mingw32_generic_src = [_][]const u8{ |
| 487 | 487 | "crt" ++ path.sep_str ++ "cxa_atexit.c", |
| 488 | 488 | "crt" ++ path.sep_str ++ "cxa_thread_atexit.c", |
| 489 | 489 | "crt" ++ path.sep_str ++ "tls_atexit.c", |
| 490 | "crt" ++ path.sep_str ++ "intrincs" ++ path.sep_str ++ "RtlSecureZeroMemory.c", | |
| 490 | 491 | // mingwex |
| 491 | 492 | "cfguard" ++ path.sep_str ++ "mingw_cfguard_support.c", |
| 492 | 493 | "complex" ++ path.sep_str ++ "_cabs.c", |