- Fix EXT2 IFS for msvc:
authorStefan Ginsberg <stefanginsberg@gmail.com>
Fri, 21 Aug 2009 17:39:37 +0000 (17:39 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Fri, 21 Aug 2009 17:39:37 +0000 (17:39 +0000)
  - Fix SEH for MSVC
  - Disable C4003 (caused by the try_return mess)
  - Add missing NTAPI to Ext2GetCurrentTime

svn path=/trunk/; revision=42831

reactos/drivers/filesystems/ext2/ext2.rbuild
reactos/drivers/filesystems/ext2/inc/struct.h
reactos/drivers/filesystems/ext2/src/misc.c

index feddd3b..fc092a3 100644 (file)
@@ -3,6 +3,7 @@
 <module name="ext2fs" type="kernelmodedriver" installbase="system32/drivers" installname="ext2.sys">
        <bootstrap installbase="$(CDOUTPUT)" />
        <include base="ext2fs">inc</include>
 <module name="ext2fs" type="kernelmodedriver" installbase="system32/drivers" installname="ext2.sys">
        <bootstrap installbase="$(CDOUTPUT)" />
        <include base="ext2fs">inc</include>
+       <compilerflag compilerset="msc">/wd4003</compilerflag>
        <library>ntoskrnl</library>
        <library>hal</library>
        <directory name="src">
        <library>ntoskrnl</library>
        <library>hal</library>
        <directory name="src">
index 91c148e..22eeed8 100644 (file)
@@ -31,11 +31,21 @@ typedef ULONG uint32;
 
 typedef PVOID PBCB;
 
 
 typedef PVOID PBCB;
 
+//
+// This is a huge hack that will create a broken driver for GCC.
+// The driver should use PSEH2.
+//
+#ifdef _MSC_VER
+#define try __try
+#define except __except
+#define finally __finally
+#else
 #define try if (1)
 #define except(x) if (0 && (x))
 #define finally if (1)
 #define GetExceptionInformation() 0
 #define GetExceptionCode() 0
 #define try if (1)
 #define except(x) if (0 && (x))
 #define finally if (1)
 #define GetExceptionInformation() 0
 #define GetExceptionCode() 0
+#endif
 
 // we will use the LARGE_INTEGER structure as defined by NT
 
 
 // we will use the LARGE_INTEGER structure as defined by NT
 
index dbf92e0..d09998a 100644 (file)
@@ -2111,7 +2111,7 @@ LONGLONG NTAPI Ext2Align64( LONGLONG NumberToBeAligned, LONGLONG Alignment )
 }
 
 
 }
 
 
-ULONG Ext2GetCurrentTime()
+ULONG NTAPI Ext2GetCurrentTime()
 {
        LARGE_INTEGER  CurrentTime;
        ULONG Time;
 {
        LARGE_INTEGER  CurrentTime;
        ULONG Time;