diff --git a/reactos/include/pseh/excpt.h b/reactos/include/pseh/excpt.h new file mode 100644 index 00000000000..3dcbb36afb4 --- /dev/null +++ b/reactos/include/pseh/excpt.h @@ -0,0 +1,32 @@ +/* + Copyright (c) 2004 KJK::Hyperion + + Permission is hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to deal in + the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do + so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + +#ifndef KJK_PSEH_EXCPT_H_ +#define KJK_PSEH_EXCPT_H_ + +#define _SEH_CONTINUE_EXECUTION (-1) +#define _SEH_CONTINUE_SEARCH (0) +#define _SEH_EXECUTE_HANDLER (1) + +#endif + +/* EOF */ diff --git a/reactos/include/pseh/framebased.h b/reactos/include/pseh/framebased.h index a203a045f27..94e348c18e3 100644 --- a/reactos/include/pseh/framebased.h +++ b/reactos/include/pseh/framebased.h @@ -24,11 +24,7 @@ #define KJK_PSEH_FRAMEBASED_H_ #include - -/* Safeguards against broken SDK/CRT headers */ -#ifndef _SEH_NO_SYSTEM_HEADERS -# include -#endif +#include #ifndef offsetof # include @@ -81,7 +77,7 @@ static __declspec(noreturn) void __stdcall _SEHCompilerSpecificHandler #define _SEH_TRY_FINALLY(FINALLY_) \ _SEH_TRY_FILTER_FINALLY \ ( \ - (_SEHFilter_t)(EXCEPTION_CONTINUE_SEARCH + 1), \ + (_SEHFilter_t)(_SEH_CONTINUE_SEARCH + 1), \ (FINALLY_) \ ) @@ -93,7 +89,7 @@ static __declspec(noreturn) void __stdcall _SEHCompilerSpecificHandler #define _SEH_TRY_HANDLE_FINALLY(FINALLY_) \ _SEH_TRY_FILTER_FINALLY \ ( \ - (_SEHFilter_t)(EXCEPTION_EXECUTE_HANDLER + 1), \ + (_SEHFilter_t)(_SEH_EXECUTE_HANDLER + 1), \ (FINALLY_) \ ) diff --git a/reactos/lib/pseh/framebased.c b/reactos/lib/pseh/framebased.c index 6393bba5f28..e858b21680a 100644 --- a/reactos/lib/pseh/framebased.c +++ b/reactos/lib/pseh/framebased.c @@ -25,6 +25,7 @@ #include #include +#include #include /* Assembly helpers, see i386/framebased.asm */ @@ -78,9 +79,9 @@ int __cdecl _SEHFrameHandler switch((UINT_PTR)frame->SPF_Handlers->SH_Filter) { - case EXCEPTION_EXECUTE_HANDLER + 1: - case EXCEPTION_CONTINUE_SEARCH + 1: - case EXCEPTION_CONTINUE_EXECUTION + 1: + case _SEH_EXECUTE_HANDLER + 1: + case _SEH_CONTINUE_SEARCH + 1: + case _SEH_CONTINUE_EXECUTION + 1: { ret = (int)((UINT_PTR)frame->SPF_Handlers->SH_Filter) - 1; break; @@ -98,13 +99,13 @@ int __cdecl _SEHFrameHandler } } - /* EXCEPTION_CONTINUE_EXECUTION */ + /* _SEH_CONTINUE_EXECUTION */ if(ret < 0) return ExceptionContinueExecution; - /* EXCEPTION_EXECUTE_HANDLER */ + /* _SEH_EXECUTE_HANDLER */ else if(ret > 0) _SEHCallHandler(frame); - /* EXCEPTION_CONTINUE_SEARCH */ + /* _SEH_CONTINUE_SEARCH */ else /* fall through */; } diff --git a/reactos/tools/helper.mk b/reactos/tools/helper.mk index 71875be6d72..54aac3b16c1 100644 --- a/reactos/tools/helper.mk +++ b/reactos/tools/helper.mk @@ -1,4 +1,4 @@ -# $Id: helper.mk,v 1.68 2004/06/18 22:33:06 hyperion Exp $ +# $Id: helper.mk,v 1.69 2004/06/21 20:55:16 hyperion Exp $ # # Helper makefile for ReactOS modules # Variables this makefile accepts: @@ -583,8 +583,8 @@ endif ifeq ($(MK_MODE),kernel) MK_DEFBASE := 0x10000 MK_LIBS := $(addprefix $(DDK_PATH_LIB)/, $(TARGET_DDKLIBS) $(MK_DDKLIBS)) - MK_CFLAGS += -D_SEH_NO_NATIVE_NLG -D_SEH_NO_SYSTEM_HEADERS - MK_CPPFLAGS += -D_SEH_NO_NATIVE_NLG -D_SEH_NO_SYSTEM_HEADERS + MK_CFLAGS += -D_SEH_NO_NATIVE_NLG + MK_CPPFLAGS += -D_SEH_NO_NATIVE_NLG endif