Commit in reactos/ntoskrnl/mm on MAIN
pool.c+10-11.32 -> 1.33
Make code portable to compilers with SEH.

reactos/ntoskrnl/mm
pool.c 1.32 -> 1.33
diff -u -r1.32 -r1.33
--- pool.c	15 Aug 2004 16:39:08 -0000	1.32
+++ pool.c	21 Aug 2004 20:05:35 -0000	1.33
@@ -1,4 +1,4 @@
-/* $Id: pool.c,v 1.32 2004/08/15 16:39:08 chorns Exp $
+/* $Id: pool.c,v 1.33 2004/08/21 20:05:35 tamlin Exp $
  * 
  * COPYRIGHT:    See COPYING in the top level directory
  * PROJECT:      ReactOS kernel
@@ -201,6 +201,7 @@
         Process = PsGetCurrentProcess();
 
         /* PsChargePoolQuota returns an exception, so this needs SEH */
+#if defined(__GNUC__)
         _SEH_FILTER(FreeAndGoOn) {
             /* Couldn't charge, so free the pool and let the caller SEH manage */
             ExFreePool(Block);
@@ -212,6 +213,14 @@
             /* Quota Exceeded and the caller had no SEH! */
             KeBugCheck(STATUS_QUOTA_EXCEEDED);
         } _SEH_END;
+#else /* assuming all other Win32 compilers understand SEH */
+        __try {
+            PsChargePoolQuota(Process, PoolType, NumberOfBytes);
+        }
+        __except (ExFreePool(Block), EXCEPTION_CONTINUE_SEARCH) {
+            KeBugCheck(STATUS_QUOTA_EXCEEDED);
+        }
+#endif
     }
 
     return Block;
CVSspam 0.2.8