https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f76ac9dc71a08d618b1fa…
commit f76ac9dc71a08d618b1fac5c4a891cf101f532d4
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Fri Mar 23 12:33:24 2018 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Fri Mar 23 12:33:24 2018 +0100
[TWAIN_32] Sync with Wine Staging 3.3. CORE-14434
---
dll/win32/twain_32/CMakeLists.txt | 4 ++--
dll/win32/twain_32/dsm_ctrl.c | 14 ++++++++++++--
dll/win32/twain_32/precomp.h | 16 ++++++++++++++++
dll/win32/twain_32/twain32_main.c | 10 ++++++++++
dll/win32/twain_32/twain_i.h | 21 ++++++++-------------
media/doc/README.WINE | 2 +-
6 files changed, 49 insertions(+), 18 deletions(-)
diff --git a/dll/win32/twain_32/CMakeLists.txt b/dll/win32/twain_32/CMakeLists.txt
index ac028ed450..2861f22ba2 100644
--- a/dll/win32/twain_32/CMakeLists.txt
+++ b/dll/win32/twain_32/CMakeLists.txt
@@ -6,7 +6,7 @@ spec2def(twain_32.dll twain_32.spec)
list(APPEND SOURCE
dsm_ctrl.c
twain32_main.c
- twain_i.h)
+ precomp.h)
add_library(twain_32 SHARED
${SOURCE}
@@ -16,5 +16,5 @@ add_library(twain_32 SHARED
set_module_type(twain_32 win32dll)
target_link_libraries(twain_32 wine)
add_importlibs(twain_32 user32 msvcrt kernel32 ntdll)
-add_pch(twain_32 twain_i.h SOURCE)
+add_pch(twain_32 precomp.h SOURCE)
add_cd_file(TARGET twain_32 DESTINATION reactos FOR all)
diff --git a/dll/win32/twain_32/dsm_ctrl.c b/dll/win32/twain_32/dsm_ctrl.c
index ce845c9531..0b2098654f 100644
--- a/dll/win32/twain_32/dsm_ctrl.c
+++ b/dll/win32/twain_32/dsm_ctrl.c
@@ -19,11 +19,21 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "twain_i.h"
+#include "config.h"
-#include <winuser.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "twain.h"
+#include "twain_i.h"
#include "resource.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(twain);
static TW_UINT16 DSM_initialized; /* whether Source Manager is initialized */
static TW_UINT32 DSM_sourceId; /* source id generator */
diff --git a/dll/win32/twain_32/precomp.h b/dll/win32/twain_32/precomp.h
new file mode 100644
index 0000000000..ac103c9644
--- /dev/null
+++ b/dll/win32/twain_32/precomp.h
@@ -0,0 +1,16 @@
+
+#ifndef _TWAIN32_PRECOMP_H
+#define _TWAIN32_PRECOMP_H
+
+#include <wine/config.h>
+
+#define NONAMELESSUNION
+#define NONAMELESSSTRUCT
+
+#include "twain_i.h"
+
+#include <winuser.h>
+
+#include <wine/debug.h>
+
+#endif /* !_TWAIN32_PRECOMP_H */
diff --git a/dll/win32/twain_32/twain32_main.c b/dll/win32/twain_32/twain32_main.c
index 1607c9b2d7..016680b96e 100644
--- a/dll/win32/twain_32/twain32_main.c
+++ b/dll/win32/twain_32/twain32_main.c
@@ -19,7 +19,17 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#include "config.h"
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "twain.h"
#include "twain_i.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(twain);
extern HINSTANCE DSM_hinstance;
diff --git a/dll/win32/twain_32/twain_i.h b/dll/win32/twain_32/twain_i.h
index 32ebc2a221..4d33135344 100644
--- a/dll/win32/twain_32/twain_i.h
+++ b/dll/win32/twain_32/twain_i.h
@@ -20,21 +20,16 @@
#ifndef _TWAIN32_H
#define _TWAIN32_H
-#include <wine/config.h>
+#ifndef __WINE_CONFIG_H
+# error You must include config.h first
+#endif
#include <stdarg.h>
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
-
-#include <windef.h>
-#include <winbase.h>
-#include <twain.h>
-
-#include <wine/debug.h>
-#include <wine/list.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(twain);
+#include "windef.h"
+#include "winbase.h"
+#include "twain.h"
+#include "wine/list.h"
struct pending_message
{
@@ -84,4 +79,4 @@ extern TW_UINT16 TWAIN_ControlNull
extern TW_UINT16 TWAIN_ProcessEvent
(pTW_IDENTITY pOrigin, activeDS *pSource, TW_MEMREF pData) DECLSPEC_HIDDEN;
-#endif /* _TWAIN32_H */
+#endif
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 5576071605..f544ea18d0 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -185,7 +185,7 @@ reactos/dll/win32/sxs # Synced to WineStaging-3.3
reactos/dll/win32/t2embed # Synced to WineStaging-3.3
reactos/dll/win32/tapi32 # Synced to WineStaging-3.3
reactos/dll/win32/traffic # Synced to WineStaging-3.3
-reactos/dll/win32/twain_32 # Synced to Wine-3.0
+reactos/dll/win32/twain_32 # Synced to WineStaging-3.3
reactos/dll/win32/updspapi # Synced to WineStaging-2.9
reactos/dll/win32/url # Synced to WineStaging-2.9
reactos/dll/win32/urlmon # Synced to Wine-3.0