Commit in reactos/include/pseh on MAIN
framebased.h+17-71.10 -> 1.11
Always use the PSEH names for NLG to avoid conflicts when _SEH_NO_NATIVE_NLG is defined but <setjmp.h> is included nevertheless. This fixes the use of PSEH in win32k. Also declared the _SEHCompilerSpecificHandler as __inline so that GCC will ignore it when it's unused. This fixes the inclusion of <pseh.h> in a PCH
Patch by KJK

reactos/include/pseh
framebased.h 1.10 -> 1.11
diff -u -r1.10 -r1.11
--- framebased.h	19 Nov 2004 23:58:33 -0000	1.10
+++ framebased.h	1 Dec 2004 19:20:53 -0000	1.11
@@ -37,29 +37,39 @@
 */
 #ifdef _SEH_NO_NATIVE_NLG
 # include <pseh/setjmp.h>
-# define longjmp _SEHLongJmp
-# define setjmp _SEHSetJmp
-# define jmp_buf _SEHJmpBuf_t
 #else
 # include <setjmp.h>
+# define _SEHLongJmp longjmp
+# define _SEHSetJmp setjmp
+# define _SEHJmpBuf_t jmp_buf
 #endif
 
 typedef struct __SEHFrame
 {
  _SEHPortableFrame_t SEH_Header;
- jmp_buf SEH_JmpBuf;
+ _SEHJmpBuf_t SEH_JmpBuf;
  void * SEH_Locals;
 }
 _SEHFrame_t;
 
-static __declspec(noreturn) void __stdcall _SEHCompilerSpecificHandler
+/*
+ Note: just define __inline to an empty symbol if your C compiler doesn't
+ support it
+*/
+#ifdef __cplusplus
+# ifndef __inline
+#  define __inline inline
+# endif
+#endif
+
+static __declspec(noreturn) __inline void __stdcall _SEHCompilerSpecificHandler
 (
  _SEHPortableFrame_t * frame
 )
 {
  _SEHFrame_t * myframe;
  myframe = (_SEHFrame_t *)(((char *)frame) - offsetof(_SEHFrame_t, SEH_Header));
- longjmp(myframe->SEH_JmpBuf, 1);
+ _SEHLongJmp(myframe->SEH_JmpBuf, 1);
 }
 
 #define _SEH_FILTER(NAME_) \
@@ -117,7 +127,7 @@
   _SEHPortableFrame = &_SEHFrame->SEH_Header;                                  \
   (void)_SEHPortableFrame;                                                     \
                                                                                \
-  if(setjmp(_SEHFrame->SEH_JmpBuf) == 0)                                       \
+  if(_SEHSetJmp(_SEHFrame->SEH_JmpBuf) == 0)                                   \
   {                                                                            \
    _SEHEnter(&_SEHFrame->SEH_Header);                                          \
                                                                                \
CVSspam 0.2.8