diff options
-rw-r--r-- | src/win_trace.h | 8 | ||||
-rw-r--r-- | src/winreg.c | 7 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/win_trace.h b/src/win_trace.h index d2e2114..d5e1e5c 100644 --- a/src/win_trace.h +++ b/src/win_trace.h @@ -17,7 +17,13 @@ extern "C" { #endif
#include <windows.h>
-#ifdef NDEBUG
+#if defined(NDEBUG) && (defined(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER >= 1400)))
+ #define WIN_TRACET(...) do {} while(0)
+ #define WIN_TRACEA(...) do {} while(0)
+ #define WIN_TRACEW(...) do {} while(0)
+ #define WIN_TRACEA_FT(...) do {} while(0)
+ #define WIN_TRACEA_ST(...) do {} while(0)
+#elif defined(NDEBUG) && defined(_MSC_VER) && (_MSC_VER < 1400)
#define WIN_TRACET NOP_FUNCTION
#define WIN_TRACEA NOP_FUNCTION
#define WIN_TRACEW NOP_FUNCTION
diff --git a/src/winreg.c b/src/winreg.c index 87b518a..775c158 100644 --- a/src/winreg.c +++ b/src/winreg.c @@ -39,6 +39,13 @@ #define REG_QWORD ( 11 ) // 64-bit number
#endif
+#if !defined(KEY_WOW64_32KEY) && defined(__MINGW32__)
+#define KEY_WOW64_32KEY (0x0200)
+#endif
+#if !defined(KEY_WOW64_64KEY) && defined(__MINGW32__)
+#define KEY_WOW64_64KEY (0x0100)
+#endif
+
#ifndef LUA_REG_NO_DLL
BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved){
UNUSED(hModule);
|