Skip to content

Commit e2e6fcd

Browse files
authored
[IMM32] Revert to Wine module (reactos#8003)
Partially revert reactos#7912. JIRA issue: CORE-5743 - Use wine instead of wine2ros. - Improve Unexpected Condition Checkers.
1 parent a2dd6ef commit e2e6fcd

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

dll/win32/imm32/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ add_rc_deps(imm32.rc ${imm32_rc_deps})
2828

2929
add_library(imm32 MODULE ${SOURCE} imm32.rc)
3030
set_module_type(imm32 win32dll UNICODE ENTRYPOINT ImmDllInitialize 12)
31-
target_link_libraries(imm32 wine2ros win32ksys uuid)
31+
target_link_libraries(imm32 wine win32ksys uuid)
3232
add_importlibs(imm32 advapi32 user32 gdi32 kernel32 ntdll)
3333
add_cd_file(TARGET imm32 DESTINATION reactos/system32 FOR all)

dll/win32/imm32/precomp.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,26 @@
4444

4545
#include <strsafe.h>
4646

47-
#include <wine2ros.h>
47+
#include <wine/debug.h>
4848

4949
/* #define UNEXPECTED() (ASSERT(FALSE), TRUE) */
5050
#define UNEXPECTED() TRUE
5151

52+
#define ERR_PRINTF(fmt, ...) (__WINE_IS_DEBUG_ON(_ERR, __wine_dbch___default) ? \
53+
(wine_dbg_printf(fmt, ##__VA_ARGS__), UNEXPECTED()) : UNEXPECTED())
54+
5255
/* Unexpected Condition Checkers */
5356
#if DBG
5457
#define FAILED_UNEXPECTEDLY(hr) \
55-
(FAILED(hr) ? (ERR("FAILED(0x%08X)\n", hr), UNEXPECTED()) : FALSE)
58+
(FAILED(hr) ? ERR_PRINTF("FAILED(0x%08X)\n", hr) : FALSE)
5659
#define IS_NULL_UNEXPECTEDLY(p) \
57-
(!(p) ? (ERR("%s was NULL\n", #p), UNEXPECTED()) : FALSE)
60+
(!(p) ? ERR_PRINTF("%s was NULL\n", #p) : FALSE)
5861
#define IS_ZERO_UNEXPECTEDLY(p) \
59-
(!(p) ? (ERR("%s was zero\n", #p), UNEXPECTED()) : FALSE)
62+
(!(p) ? ERR_PRINTF("%s was zero\n", #p) : FALSE)
6063
#define IS_TRUE_UNEXPECTEDLY(x) \
61-
((x) ? (ERR("%s was %d\n", #x, (int)(x)), UNEXPECTED()) : FALSE)
64+
((x) ? ERR_PRINTF("%s was non-zero\n", #x) : FALSE)
6265
#define IS_ERROR_UNEXPECTEDLY(x) \
63-
((x) != ERROR_SUCCESS ? (ERR("%s was %d\n", #x, (int)(x)), UNEXPECTED()) : FALSE)
66+
((x) != ERROR_SUCCESS ? ERR_PRINTF("%s was %d\n", #x, (int)(x)) : FALSE)
6467
#else
6568
#define FAILED_UNEXPECTEDLY(hr) FAILED(hr)
6669
#define IS_NULL_UNEXPECTEDLY(p) (!(p))

0 commit comments

Comments
 (0)