Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/lua-winreg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Schneider <oliver@assarbad.net>2018-10-10 01:52:50 +0300
committerOliver Schneider <oliver@assarbad.net>2018-10-10 01:52:50 +0300
commit8bfb0e9e5942e070a4d61a47e8facc482c14800d (patch)
tree9361f53546fa8ad303f60f345df6cd37c6b5ac60
parent7a0d09f972e82117c706c3fa6e22e80961bdc6bb (diff)
Trying to address the Appveyor issues with lua-winreg
- We now define KEY_WOW64_32KEY and KEY_WOW64_64KEY locally, if on MinGW - We use variadic macros on VS2005 and newer as well as on MinGW instead of the NOP_FUNCTION construct
-rw-r--r--src/win_trace.h8
-rw-r--r--src/winreg.c7
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);