https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6d238e451345dfd4f5b817...
commit 6d238e451345dfd4f5b8178d4d515801546fe95d Author: Serge Gautherie 32623169+SergeGautherie@users.noreply.github.com AuthorDate: Thu Jul 4 21:16:12 2019 +0200 Commit: Pierre Schweitzer pierre@reactos.org CommitDate: Thu Jul 4 21:16:12 2019 +0200
[FASTFAT_NEW] Fix MSVC builds
CORE-14879 --- drivers/filesystems/fastfat_new/cachesup.c | 4 ++-- drivers/filesystems/fastfat_new/create.c | 2 +- drivers/filesystems/fastfat_new/dirsup.c | 2 +- drivers/filesystems/fastfat_new/fatdata.c | 18 +++++++++--------- drivers/filesystems/fastfat_new/fatinit.c | 12 ++++-------- drivers/filesystems/fastfat_new/fatstruc.h | 3 +++ drivers/filesystems/fastfat_new/fileinfo.c | 2 +- 7 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/drivers/filesystems/fastfat_new/cachesup.c b/drivers/filesystems/fastfat_new/cachesup.c index c3d5140d93d..7fcc3898597 100644 --- a/drivers/filesystems/fastfat_new/cachesup.c +++ b/drivers/filesystems/fastfat_new/cachesup.c @@ -1675,8 +1675,8 @@ FatZeroData ( LARGE_INTEGER ZeroStart = {0,0}; LARGE_INTEGER BeyondZeroEnd = {0,0}; #else - LARGE_INTEGER ZeroStart = {.LowPart = 0, .HighPart = 0}; - LARGE_INTEGER BeyondZeroEnd = {.LowPart = 0, .HighPart = 0}; + LARGE_INTEGER ZeroStart = {{0,0}}; + LARGE_INTEGER BeyondZeroEnd = {{0,0}}; #endif
ULONG SectorSize; diff --git a/drivers/filesystems/fastfat_new/create.c b/drivers/filesystems/fastfat_new/create.c index 19eca72131b..7210d362c0f 100644 --- a/drivers/filesystems/fastfat_new/create.c +++ b/drivers/filesystems/fastfat_new/create.c @@ -6448,7 +6448,7 @@ Return Value: #ifndef __REACTOS__ LARGE_INTEGER AllocSize = {0}; #else - LARGE_INTEGER AllocSize = {.LowPart = 0, .HighPart = 0}; + LARGE_INTEGER AllocSize = {{0}}; #endif
// diff --git a/drivers/filesystems/fastfat_new/dirsup.c b/drivers/filesystems/fastfat_new/dirsup.c index 907c72997bb..b94f2c2fc28 100644 --- a/drivers/filesystems/fastfat_new/dirsup.c +++ b/drivers/filesystems/fastfat_new/dirsup.c @@ -2643,7 +2643,7 @@ Return Value: #ifndef __REACTOS__ LARGE_INTEGER CurrentDay = {0}; #else - LARGE_INTEGER CurrentDay = {.LowPart = 0, .HighPart = 0}; + LARGE_INTEGER CurrentDay = {{0}}; #endif LARGE_INTEGER LastAccessDay;
diff --git a/drivers/filesystems/fastfat_new/fatdata.c b/drivers/filesystems/fastfat_new/fatdata.c index ddfeb1f1b19..0c92389d98e 100644 --- a/drivers/filesystems/fastfat_new/fatdata.c +++ b/drivers/filesystems/fastfat_new/fatdata.c @@ -62,8 +62,8 @@ PDEVICE_OBJECT FatCdromFileSystemDeviceObject; LARGE_INTEGER FatLargeZero = {0,0}; LARGE_INTEGER FatMaxLarge = {MAXULONG,MAXLONG}; #else -LARGE_INTEGER FatLargeZero = {.LowPart = 0, .HighPart = 0}; -LARGE_INTEGER FatMaxLarge = {.LowPart = MAXULONG, .HighPart = MAXLONG}; +LARGE_INTEGER FatLargeZero = {{0,0}}; +LARGE_INTEGER FatMaxLarge = {{MAXULONG,MAXLONG}}; #endif
#ifndef __REACTOS__ @@ -73,11 +73,11 @@ LARGE_INTEGER FatOneDay = {0x2a69c000, 0xc9}; LARGE_INTEGER FatJanOne1980 = {0xe1d58000,0x01a8e79f}; LARGE_INTEGER FatDecThirtyOne1979 = {0xb76bc000,0x01a8e6d6}; #else -LARGE_INTEGER Fat30Milliseconds = {.LowPart = (ULONG)(-30 * 1000 * 10), .HighPart = -1}; -LARGE_INTEGER Fat100Milliseconds = {.LowPart = (ULONG)(-30 * 1000 * 10), .HighPart = -1}; -LARGE_INTEGER FatOneDay = {.LowPart = 0x2a69c000, .HighPart = 0xc9}; -LARGE_INTEGER FatJanOne1980 = {.LowPart = 0xe1d58000, .HighPart = 0x01a8e79f}; -LARGE_INTEGER FatDecThirtyOne1979 = {.LowPart = 0xb76bc000, .HighPart = 0x01a8e6d6}; +LARGE_INTEGER Fat30Milliseconds = {{(ULONG)(-30 * 1000 * 10), -1}}; +LARGE_INTEGER Fat100Milliseconds = {{(ULONG)(-30 * 1000 * 10), -1}}; +LARGE_INTEGER FatOneDay = {{0x2a69c000, 0xc9}}; +LARGE_INTEGER FatJanOne1980 = {{0xe1d58000,0x01a8e79f}}; +LARGE_INTEGER FatDecThirtyOne1979 = {{0xb76bc000,0x01a8e6d6}}; #endif
FAT_TIME_STAMP FatTimeJanOne1980 = {{0,0,0},{1,1,0}}; @@ -86,8 +86,8 @@ FAT_TIME_STAMP FatTimeJanOne1980 = {{0,0,0},{1,1,0}}; LARGE_INTEGER FatMagic10000 = {0xe219652c, 0xd1b71758}; LARGE_INTEGER FatMagic86400000 = {0xfa67b90e, 0xc6d750eb}; #else -LARGE_INTEGER FatMagic10000 = {.LowPart = 0xe219652c, .HighPart = 0xd1b71758}; -LARGE_INTEGER FatMagic86400000 = {.LowPart = 0xfa67b90e, .HighPart = 0xc6d750eb}; +LARGE_INTEGER FatMagic10000 = {{0xe219652c, 0xd1b71758}}; +LARGE_INTEGER FatMagic86400000 = {{0xfa67b90e, 0xc6d750eb}}; #endif
#ifdef _MSC_VER diff --git a/drivers/filesystems/fastfat_new/fatinit.c b/drivers/filesystems/fastfat_new/fatinit.c index c2189ca49a7..a752fbd2841 100644 --- a/drivers/filesystems/fastfat_new/fatinit.c +++ b/drivers/filesystems/fastfat_new/fatinit.c @@ -15,6 +15,10 @@ Abstract:
#include "fatprocs.h"
+#ifdef __REACTOS__ +#define _Unreferenced_parameter_ +#endif + DRIVER_INITIALIZE DriverEntry;
NTSTATUS @@ -28,11 +32,7 @@ _Function_class_(DRIVER_UNLOAD) VOID NTAPI FatUnload( -#ifndef __REACTOS__ _In_ _Unreferenced_parameter_ PDRIVER_OBJECT DriverObject -#else - _In_ PDRIVER_OBJECT DriverObject -#endif );
NTSTATUS @@ -462,11 +462,7 @@ _Function_class_(DRIVER_UNLOAD) VOID NTAPI FatUnload( -#ifndef __REACTOS__ _In_ _Unreferenced_parameter_ PDRIVER_OBJECT DriverObject -#else - _In_ PDRIVER_OBJECT DriverObject -#endif )
/*++ diff --git a/drivers/filesystems/fastfat_new/fatstruc.h b/drivers/filesystems/fastfat_new/fatstruc.h index a9fa08f4fec..edd1f283ca4 100644 --- a/drivers/filesystems/fastfat_new/fatstruc.h +++ b/drivers/filesystems/fastfat_new/fatstruc.h @@ -19,6 +19,9 @@ Abstract:
typedef PVOID PBCB; //**** Bcb's are now part of the cache module
+#ifdef __REACTOS__ +#define __volatile volatile +#endif // // The FAT_DATA record is the top record in the Fat file system in-memory diff --git a/drivers/filesystems/fastfat_new/fileinfo.c b/drivers/filesystems/fastfat_new/fileinfo.c index 15a3d3a33e9..f2a06205ef8 100644 --- a/drivers/filesystems/fastfat_new/fileinfo.c +++ b/drivers/filesystems/fastfat_new/fileinfo.c @@ -1962,7 +1962,7 @@ Return Value: #else FAT_TIME_STAMP LastWriteTime = {{0}}; FAT_TIME_STAMP LastAccessTime = {{0}}; - FAT_DATE LastAccessDate = {.Day = 0, .Month = 0, .Year = 0}; + FAT_DATE LastAccessDate = {0, 0, 0}; #endif UCHAR Attributes;