- Fix EXT2 IFS for msvc:

- Fix SEH for MSVC
  - Disable C4003 (caused by the try_return mess)
  - Add missing NTAPI to Ext2GetCurrentTime

svn path=/trunk/; revision=42831
This commit is contained in:
Stefan Ginsberg 2009-08-21 17:39:37 +00:00
parent 4b9ecd6c5c
commit cd731afde1
3 changed files with 12 additions and 1 deletions

View file

@ -3,6 +3,7 @@
<module name="ext2fs" type="kernelmodedriver" installbase="system32/drivers" installname="ext2.sys"> <module name="ext2fs" type="kernelmodedriver" installbase="system32/drivers" installname="ext2.sys">
<bootstrap installbase="$(CDOUTPUT)" /> <bootstrap installbase="$(CDOUTPUT)" />
<include base="ext2fs">inc</include> <include base="ext2fs">inc</include>
<compilerflag compilerset="msc">/wd4003</compilerflag>
<library>ntoskrnl</library> <library>ntoskrnl</library>
<library>hal</library> <library>hal</library>
<directory name="src"> <directory name="src">

View 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 try if (1)
#define except(x) if (0 && (x)) #define except(x) if (0 && (x))
#define finally if (1) #define finally if (1)
#define GetExceptionInformation() 0 #define GetExceptionInformation() 0
#define GetExceptionCode() 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

View file

@ -2111,7 +2111,7 @@ LONGLONG NTAPI Ext2Align64( LONGLONG NumberToBeAligned, LONGLONG Alignment )
} }
ULONG Ext2GetCurrentTime() ULONG NTAPI Ext2GetCurrentTime()
{ {
LARGE_INTEGER CurrentTime; LARGE_INTEGER CurrentTime;
ULONG Time; ULONG Time;