For example, doxygen defines `register` to shut up an error due to it being
deprecated/removed in ISO C++ 17, but that causes issues with this
construct, which is an extension and still supported.
Fixes: f0044963d7ba ("headers: Use register variable for NtCurrentTeb
implementation on aarch64.")
---
Is this OK, or does it need any other preprocessor checks before using
push_macro/pop_macro? I grepped for other usages and it seems like this
is how it's done...
mingw-w64-headers/include/winnt.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mingw-w64-headers/include/winnt.h
b/mingw-w64-headers/include/winnt.h
index b6d1f58ed..e6fdfac51 100644
--- a/mingw-w64-headers/include/winnt.h
+++ b/mingw-w64-headers/include/winnt.h
@@ -10211,7 +10211,10 @@ typedef DWORD (WINAPI
*PRTL_RUN_ONCE_INIT_FN)(PRTL_RUN_ONCE, PVOID, PVOID *);
PVOID GetFiberData(VOID);
#if defined (__aarch64__) || defined(__arm64ec__)
+#pragma push_macro ("register")
+#undef register
register struct _TEB *__mingw_current_teb __asm__("x18");
+#pragma pop_macro ("register")
FORCEINLINE struct _TEB *NtCurrentTeb(VOID)
{
return __mingw_current_teb;
--
2.47.1.windows.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public