Alexandre Julliard : include: Don't allow using wine/ library.h with msvcrt.

Alexandre Julliard julliard at winehq.org
Fri May 17 16:10:14 CDT 2019


Module: wine
Branch: master
Commit: a23c20eee1c6570847081c31c139396468f69310
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=a23c20eee1c6570847081c31c139396468f69310

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri May 17 16:46:47 2019 +0200

include: Don't allow using wine/library.h with msvcrt.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/krnl386.exe16/kernel16_private.h | 1 +
 dlls/toolhelp.dll16/toolhelp.c        | 1 +
 dlls/user.exe16/message.c             | 1 +
 include/wine/library.h                | 4 ++++
 include/wine/winbase16.h              | 1 -
 programs/winevdm/winevdm.c            | 1 +
 6 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/dlls/krnl386.exe16/kernel16_private.h b/dlls/krnl386.exe16/kernel16_private.h
index 1fb4968..284b063 100644
--- a/dlls/krnl386.exe16/kernel16_private.h
+++ b/dlls/krnl386.exe16/kernel16_private.h
@@ -25,6 +25,7 @@
 #include "winreg.h"
 #include "winternl.h"
 #include "wine/asm.h"
+#include "wine/library.h"
 
 #include "pshpack1.h"
 
diff --git a/dlls/toolhelp.dll16/toolhelp.c b/dlls/toolhelp.dll16/toolhelp.c
index cf5e6ef..47c2d2d 100644
--- a/dlls/toolhelp.dll16/toolhelp.c
+++ b/dlls/toolhelp.dll16/toolhelp.c
@@ -36,6 +36,7 @@
 
 #include "wine/winbase16.h"
 #include "toolhelp.h"
+#include "wine/library.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(toolhelp);
diff --git a/dlls/user.exe16/message.c b/dlls/user.exe16/message.c
index 290f36b..c0b60ad 100644
--- a/dlls/user.exe16/message.c
+++ b/dlls/user.exe16/message.c
@@ -30,6 +30,7 @@
 #include "winerror.h"
 #include "dde.h"
 #include "user_private.h"
+#include "wine/library.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(msg);
diff --git a/include/wine/library.h b/include/wine/library.h
index 242bb69..af9deaf 100644
--- a/include/wine/library.h
+++ b/include/wine/library.h
@@ -31,6 +31,10 @@
 #error This file should not be used in Wine tests
 #endif
 
+#ifdef __WINE_USE_MSVCRT
+#error This file should not be used with msvcrt headers
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/include/wine/winbase16.h b/include/wine/winbase16.h
index 16c6324..d4a5096 100644
--- a/include/wine/winbase16.h
+++ b/include/wine/winbase16.h
@@ -24,7 +24,6 @@
 #include <winbase.h>
 #include <winnls.h>
 #include <wine/windef16.h>
-#include <wine/library.h>
 
 #include <pshpack1.h>
 
diff --git a/programs/winevdm/winevdm.c b/programs/winevdm/winevdm.c
index ccf6c8b..bde85a7 100644
--- a/programs/winevdm/winevdm.c
+++ b/programs/winevdm/winevdm.c
@@ -31,6 +31,7 @@
 #include "winuser.h"
 #include "wincon.h"
 #include "wine/unicode.h"
+#include "wine/library.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(winevdm);




More information about the wine-cvs mailing list