Author: hyperion
Date: Mon Nov 24 07:05:40 2008
New Revision: 37614
URL:
http://svn.reactos.org/svn/reactos?rev=37614&view=rev
Log:
modified include/psdk/rpc.h
Implemented RPC exception handling macros with PSEH 2.0
modified base/services/rpcss/rpcss.rbuild
modified dll/win32/rpcrt4/rpcrt4.rbuild
RPC proxy stubs now depend on pseh. We should really add pseh as a link dependency
automatically in rbuild, but, eh
modified tools/rbuild/backend/mingw/modulehandler.cpp
Compile RPC proxy stubs with -fno-unit-at-a-time due to a GCC bug. See also
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17982 and
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054
Modified:
trunk/reactos/base/services/rpcss/rpcss.rbuild
trunk/reactos/dll/win32/rpcrt4/rpcrt4.rbuild
trunk/reactos/include/psdk/rpc.h
trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
Modified: trunk/reactos/base/services/rpcss/rpcss.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/rpcss/rpcss.…
==============================================================================
--- trunk/reactos/base/services/rpcss/rpcss.rbuild [iso-8859-1] (original)
+++ trunk/reactos/base/services/rpcss/rpcss.rbuild [iso-8859-1] Mon Nov 24 07:05:40 2008
@@ -9,6 +9,7 @@
<library>rpcrt4</library>
<library>kernel32</library>
<library>advapi32</library>
+ <library>pseh</library>
<file>epmp.c</file>
<file>irotp.c</file>
<file>rpcss_main.c</file>
Modified: trunk/reactos/dll/win32/rpcrt4/rpcrt4.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpcrt4.rb…
==============================================================================
--- trunk/reactos/dll/win32/rpcrt4/rpcrt4.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/rpcrt4/rpcrt4.rbuild [iso-8859-1] Mon Nov 24 07:05:40 2008
@@ -17,6 +17,7 @@
<library>iphlpapi</library>
<library>ws2_32</library>
<library>ntdll</library>
+ <library>pseh</library>
<file>cproxy.c</file>
<file>cpsf.c</file>
<file>cstub.c</file>
Modified: trunk/reactos/include/psdk/rpc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/rpc.h?rev=376…
==============================================================================
--- trunk/reactos/include/psdk/rpc.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/rpc.h [iso-8859-1] Mon Nov 24 07:05:40 2008
@@ -12,10 +12,7 @@
#endif
#ifdef __GNUC__
- #ifndef _SEH_NO_NATIVE_NLG
- /* FIXME ReactOS SEH support, we need remove this when gcc support native seh */
- #include <libs/pseh/pseh.h>
- #endif
+#include <pseh/pseh2.h>
#endif
#ifndef __RPC_H__
@@ -137,33 +134,14 @@
#define RpcExceptionCode() GetExceptionCode()
#define RpcAbnormalTermination() AbnormalTermination()
#else
- /* FIXME ReactOS SEH support, we need remove this when gcc support native seh */
-
- #ifdef _SEH_NO_NATIVE_NLG
- /* hack for _SEH_NO_NATIVE_NLG */
- #define RpcTryExcept if (1) {
- #define RpcExcept(expr) } else {
- #define RpcEndExcept }
- #define RpcTryFinally
- #define RpcFinally
- #define RpcEndFinally
- #define RpcExceptionCode() 0
- #else
- #define RpcTryExcept _SEH_TRY {
- #define RpcExcept(expr) } _SEH_HANDLE { \
- if (expr) \
- {
- #define RpcEndExcept } \
- } \
- _SEH_END;
-
- #define RpcTryFinally
- #define RpcFinally
- #define RpcEndFinally
- #define RpcExceptionCode() _SEH_GetExceptionCode()
-
- /* #define RpcAbnormalTermination() abort() */
- #endif
+ #define RpcTryExcept _SEH2_TRY
+ #define RpcExcept(expr) _SEH2_EXCEPT((expr))
+ #define RpcEndExcept _SEH2_END;
+ #define RpcTryFinally _SEH2_TRY
+ #define RpcFinally _SEH2_FINALLY
+ #define RpcEndFinally _SEH2_END;
+ #define RpcExceptionCode() _SEH2_GetExceptionCode()
+ #define RpcAbnormalTermination() (_SEH2_GetExceptionCode() != 0)
#endif
#endif
Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] Mon Nov 24
07:05:40 2008
@@ -1096,7 +1096,7 @@
"\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) -h -H
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h -s -S
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c $(source)\n"
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.o:
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h$(dependencies) |
$(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_CC)\n"
- "\t${gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -c
$<\n",
+ "\t${gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags)
-fno-unit-at-a-time -c $<\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.o",
@@ -1107,7 +1107,7 @@
"\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) -h -H
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h -c -C
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c $(source)\n"
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.o:
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h$(dependencies) |
$(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_CC)\n"
- "\t${gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -c
$<\n",
+ "\t${gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags)
-fno-unit-at-a-time -c $<\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.o",