https://git.reactos.org/?p=reactos.git;a=commitdiff;h=afb6bca511b8c085c37b8…
commit afb6bca511b8c085c37b89f4e273282abf40fa79
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Fri Mar 9 12:48:26 2018 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Fri Mar 9 12:48:26 2018 +0100
[CABINET] Sync with Wine Staging 3.3. CORE-14434
---
dll/win32/cabinet/CMakeLists.txt | 4 ++--
dll/win32/cabinet/cabinet.h | 18 +++++-------------
dll/win32/cabinet/cabinet_main.c | 18 ++++++++++++++++--
dll/win32/cabinet/fci.c | 20 ++++++++++++++++----
dll/win32/cabinet/fdi.c | 13 ++++++++++++-
dll/win32/cabinet/precomp.h | 15 +++++++++++++++
media/doc/README.WINE | 2 +-
7 files changed, 67 insertions(+), 23 deletions(-)
diff --git a/dll/win32/cabinet/CMakeLists.txt b/dll/win32/cabinet/CMakeLists.txt
index c812df3642..20eb368d00 100644
--- a/dll/win32/cabinet/CMakeLists.txt
+++ b/dll/win32/cabinet/CMakeLists.txt
@@ -13,7 +13,7 @@ list(APPEND SOURCE
cabinet_main.c
fci.c
fdi.c
- cabinet.h)
+ precomp.h)
add_library(cabinet SHARED
${SOURCE}
@@ -24,5 +24,5 @@ add_library(cabinet SHARED
set_module_type(cabinet win32dll)
target_link_libraries(cabinet wine zlib)
add_importlibs(cabinet msvcrt kernel32 ntdll)
-add_pch(cabinet cabinet.h SOURCE)
+add_pch(cabinet precomp.h SOURCE)
add_cd_file(TARGET cabinet DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/cabinet/cabinet.h b/dll/win32/cabinet/cabinet.h
index 4bc4be7344..52736db513 100644
--- a/dll/win32/cabinet/cabinet.h
+++ b/dll/win32/cabinet/cabinet.h
@@ -18,24 +18,16 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-
#ifndef __WINE_CABINET_H
#define __WINE_CABINET_H
-#include <wine/config.h>
-
#include <stdarg.h>
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#include <windef.h>
-#include <winbase.h>
-#include <fdi.h>
-
-#include <wine/debug.h>
-WINE_DEFAULT_DEBUG_CHANNEL(cabinet);
+#include "windef.h"
+#include "winbase.h"
+#include "winnt.h"
+#include "fdi.h"
+#include "fci.h"
/* from msvcrt/sys/stat.h */
#define _S_IWRITE 0x0080
diff --git a/dll/win32/cabinet/cabinet_main.c b/dll/win32/cabinet/cabinet_main.c
index a329e4d8de..8af0fb1e6d 100644
--- a/dll/win32/cabinet/cabinet_main.c
+++ b/dll/win32/cabinet/cabinet_main.c
@@ -18,12 +18,26 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "cabinet.h"
+#include "config.h"
+
+#include <assert.h>
+#include <stdarg.h>
+#include <string.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
#define NO_SHLWAPI_REG
-#include <shlwapi.h>
+#include "shlwapi.h"
#undef NO_SHLWAPI_REG
+#include "cabinet.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(cabinet);
+
+
/***********************************************************************
* DllGetVersion (CABINET.2)
*
diff --git a/dll/win32/cabinet/fci.c b/dll/win32/cabinet/fci.c
index 9930f08c38..167ca747d0 100644
--- a/dll/win32/cabinet/fci.c
+++ b/dll/win32/cabinet/fci.c
@@ -30,16 +30,28 @@ There is still some work to be done:
*/
-#include "cabinet.h"
-#include <assert.h>
-#include <fci.h>
+#include "config.h"
+
+#include <assert.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
#ifdef HAVE_ZLIB
# include <zlib.h>
#endif
-#include <wine/list.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+#include "wine/winternl.h"
+#include "fci.h"
+#include "cabinet.h"
+#include "wine/list.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(cabinet);
#ifdef WORDS_BIGENDIAN
#define fci_endian_ulong(x) RtlUlongByteSwap(x)
diff --git a/dll/win32/cabinet/fdi.c b/dll/win32/cabinet/fdi.c
index a864bd7fdb..01a0c4d05c 100644
--- a/dll/win32/cabinet/fdi.c
+++ b/dll/win32/cabinet/fdi.c
@@ -58,10 +58,21 @@
* -gmt
*/
-#include "cabinet.h"
+#include "config.h"
+#include <stdarg.h>
#include <stdio.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+#include "fdi.h"
+#include "cabinet.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(cabinet);
+
THOSE_ZIP_CONSTS;
struct fdi_file {
diff --git a/dll/win32/cabinet/precomp.h b/dll/win32/cabinet/precomp.h
new file mode 100644
index 0000000000..c2aa4fdf4b
--- /dev/null
+++ b/dll/win32/cabinet/precomp.h
@@ -0,0 +1,15 @@
+
+#ifndef _WINE_CABINET_PRECOMP_H
+#define _WINE_CABINET_PRECOMP_H
+
+#include <wine/config.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#include "cabinet.h"
+
+#include <wine/debug.h>
+
+#endif /* !_WINE_CABINET_PRECOMP_H */
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 5d569bf0b9..3cbd73c49e 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -51,7 +51,7 @@ reactos/dll/win32/atl100 # Synced to WineStaging-3.3
reactos/dll/win32/avifil32 # Synced to WineStaging-3.3
reactos/dll/win32/bcrypt # Synced to WineStaging-1.9.23
reactos/dll/win32/browseui # Out of sync
-reactos/dll/win32/cabinet # Synced to Wine-3.0
+reactos/dll/win32/cabinet # Synced to WineStaging-3.3
reactos/dll/win32/clusapi # Synced to WineStaging-2.9
reactos/dll/win32/comcat # Synced to WineStaging-2.9
reactos/dll/win32/comctl32 # Synced to Wine-3.0