headers: allow RtlSecureZeroMemory in all targets
It's usually an inline function doing native CPU calls. It's also unrestricted
in the Windows SDK since Windows 8, as well as SecureZeroMemory.
Signed-off-by: LIU Hao <lh_mouse@126.com>
diff --git a/mingw-w64-headers/include/winnt.h b/mingw-w64-headers/include/winnt.h
index 396580d..7da2f78 100644
--- a/mingw-w64-headers/include/winnt.h
+++ b/mingw-w64-headers/include/winnt.h
@@ -8933,6 +8933,24 @@
#define HEAP_MAXIMUM_TAG 0x0FFF
#define HEAP_PSEUDO_TAG_FLAG 0x8000
#define HEAP_TAG_SHIFT 18
+
+ PVOID WINAPI RtlSecureZeroMemory(PVOID ptr,SIZE_T cnt);
+
+#if !defined (__CRT__NO_INLINE) && !defined (__WIDL__)
+ __CRT_INLINE PVOID WINAPI RtlSecureZeroMemory(PVOID ptr,SIZE_T cnt) {
+ volatile char *vptr =(volatile char *)ptr;
+#ifdef __x86_64
+ __stosb((PBYTE)((DWORD64)vptr),0,cnt);
+#else
+ while(cnt) {
+ *vptr++ = 0;
+ cnt--;
+ }
+#endif /* __x86_64 */
+ return ptr;
+ }
+#endif /* !__CRT__NO_INLINE // !__WIDL__ */
+
/* Let this macro fail for non-desktop mode. AFAIU this should be better an inline-function ... */
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
#define HEAP_MAKE_TAG_FLAGS(b,o) ((DWORD)((b) + ((o) << 18)))
@@ -8988,23 +9006,6 @@
#define RtlFillMemory(Destination,Length,Fill) memset((Destination),(Fill),(Length))
#define RtlZeroMemory(Destination,Length) memset((Destination),0,(Length))
- PVOID WINAPI RtlSecureZeroMemory(PVOID ptr,SIZE_T cnt);
-
-#if !defined (__CRT__NO_INLINE) && !defined (__WIDL__)
- __CRT_INLINE PVOID WINAPI RtlSecureZeroMemory(PVOID ptr,SIZE_T cnt) {
- volatile char *vptr =(volatile char *)ptr;
-#ifdef __x86_64
- __stosb((PBYTE)((DWORD64)vptr),0,cnt);
-#else
- while(cnt) {
- *vptr++ = 0;
- cnt--;
- }
-#endif /* __x86_64 */
- return ptr;
- }
-#endif /* !__CRT__NO_INLINE // !__WIDL__ */
-
typedef struct _MESSAGE_RESOURCE_ENTRY {
WORD Length;
WORD Flags;