diff --git a/reactos/dll/3rdparty/mesa32/mesa32.rbuild b/reactos/dll/3rdparty/mesa32/mesa32.rbuild index bef9794acd9..051c5342af9 100644 --- a/reactos/dll/3rdparty/mesa32/mesa32.rbuild +++ b/reactos/dll/3rdparty/mesa32/mesa32.rbuild @@ -1,6 +1,6 @@ - + -enable-stdcall-fixup ntdll diff --git a/reactos/dll/cpl/desk/desk.rbuild b/reactos/dll/cpl/desk/desk.rbuild index d62a85f576c..131e0da4862 100644 --- a/reactos/dll/cpl/desk/desk.rbuild +++ b/reactos/dll/cpl/desk/desk.rbuild @@ -1,6 +1,6 @@ - + . diff --git a/reactos/dll/cpl/intl/intl.rbuild b/reactos/dll/cpl/intl/intl.rbuild index be1749a01b6..800c9ec3cb9 100644 --- a/reactos/dll/cpl/intl/intl.rbuild +++ b/reactos/dll/cpl/intl/intl.rbuild @@ -1,6 +1,6 @@ - + . kernel32 diff --git a/reactos/dll/cpl/main/main.rbuild b/reactos/dll/cpl/main/main.rbuild index 3353e28eeca..563add0c1ea 100644 --- a/reactos/dll/cpl/main/main.rbuild +++ b/reactos/dll/cpl/main/main.rbuild @@ -1,6 +1,6 @@ - + . kernel32 diff --git a/reactos/dll/cpl/mmsys/mmsys.rbuild b/reactos/dll/cpl/mmsys/mmsys.rbuild index 304feb81085..a3c02371b43 100644 --- a/reactos/dll/cpl/mmsys/mmsys.rbuild +++ b/reactos/dll/cpl/mmsys/mmsys.rbuild @@ -1,6 +1,6 @@ - + . kernel32 diff --git a/reactos/dll/cpl/usrmgr/usrmgr.rbuild b/reactos/dll/cpl/usrmgr/usrmgr.rbuild index 8026fd993a2..1a612c983cf 100644 --- a/reactos/dll/cpl/usrmgr/usrmgr.rbuild +++ b/reactos/dll/cpl/usrmgr/usrmgr.rbuild @@ -1,6 +1,6 @@ - + . kernel32 diff --git a/reactos/dll/directx/ddraw/ddraw.rbuild b/reactos/dll/directx/ddraw/ddraw.rbuild index 14011ee09f8..ab7913808b3 100644 --- a/reactos/dll/directx/ddraw/ddraw.rbuild +++ b/reactos/dll/directx/ddraw/ddraw.rbuild @@ -1,6 +1,6 @@ - + . kernel32 diff --git a/reactos/dll/directx/dsound/dsound.rbuild b/reactos/dll/directx/dsound/dsound.rbuild index 6370a01090d..8701cf47d42 100644 --- a/reactos/dll/directx/dsound/dsound.rbuild +++ b/reactos/dll/directx/dsound/dsound.rbuild @@ -1,6 +1,6 @@ - + . diff --git a/reactos/dll/directx/wine/wined3d/wined3d.rbuild b/reactos/dll/directx/wine/wined3d/wined3d.rbuild index 6c0faa8d03b..6c74744b2a5 100644 --- a/reactos/dll/directx/wine/wined3d/wined3d.rbuild +++ b/reactos/dll/directx/wine/wined3d/wined3d.rbuild @@ -1,6 +1,6 @@ - + . include/reactos/wine diff --git a/reactos/dll/win32/crypt32/crypt32.rbuild b/reactos/dll/win32/crypt32/crypt32.rbuild index 1c4eaab0001..bb613bf4d37 100644 --- a/reactos/dll/win32/crypt32/crypt32.rbuild +++ b/reactos/dll/win32/crypt32/crypt32.rbuild @@ -1,4 +1,4 @@ - + . include/reactos/wine @@ -10,6 +10,7 @@ kernel32 ntdll imagehlp + pseh base64.c cert.c chain.c @@ -35,4 +36,6 @@ ctl.c message.c crypt32.rc + + -fno-unit-at-a-time diff --git a/reactos/dll/win32/dbghelp/dbghelp.rbuild b/reactos/dll/win32/dbghelp/dbghelp.rbuild index 13b71573f81..a0611d66fe8 100644 --- a/reactos/dll/win32/dbghelp/dbghelp.rbuild +++ b/reactos/dll/win32/dbghelp/dbghelp.rbuild @@ -1,7 +1,7 @@ - + . include/reactos/wine @@ -31,5 +31,6 @@ kernel32 version ntdll + pseh diff --git a/reactos/dll/win32/dnsapi/dnsapi.rbuild b/reactos/dll/win32/dnsapi/dnsapi.rbuild index ad4b273d6d7..559927c06e2 100644 --- a/reactos/dll/win32/dnsapi/dnsapi.rbuild +++ b/reactos/dll/win32/dnsapi/dnsapi.rbuild @@ -1,4 +1,4 @@ - + include src diff --git a/reactos/dll/win32/gdiplus/gdiplus.rbuild b/reactos/dll/win32/gdiplus/gdiplus.rbuild index f8890964882..ca5b7c3198a 100644 --- a/reactos/dll/win32/gdiplus/gdiplus.rbuild +++ b/reactos/dll/win32/gdiplus/gdiplus.rbuild @@ -1,7 +1,7 @@ - + . include/reactos/wine diff --git a/reactos/dll/win32/glu32/glu32.rbuild b/reactos/dll/win32/glu32/glu32.rbuild index d52231d6647..9ce9837c580 100644 --- a/reactos/dll/win32/glu32/glu32.rbuild +++ b/reactos/dll/win32/glu32/glu32.rbuild @@ -1,4 +1,4 @@ - + include libnurbs/internals diff --git a/reactos/dll/win32/icmp/icmp_main.c b/reactos/dll/win32/icmp/icmp_main.c index 3d7af0c65f3..d9f2658d35d 100644 --- a/reactos/dll/win32/icmp/icmp_main.c +++ b/reactos/dll/win32/icmp/icmp_main.c @@ -231,7 +231,7 @@ DWORD WINAPI IcmpSendEcho( /* check the request size against SO_MAX_MSG_SIZE using getsockopt */ /* Prepare the request */ - id=_getpid() & 0xFFFF; + id=GetCurrentProcessId() & 0xFFFF; seq=InterlockedIncrement(&icmp_sequence) & 0xFFFF; reqsize=ICMP_MINLEN+RequestSize; @@ -319,18 +319,18 @@ DWORD WINAPI IcmpSendEcho( res=sendto(icp->sid, reqbuf, reqsize, 0, (struct sockaddr*)&addr, sizeof(addr)); HeapFree(GetProcessHeap (), 0, reqbuf); if (res<0) { - if (errno==EMSGSIZE) + if (WSAGetLastError()==WSAEMSGSIZE) SetLastError(IP_PACKET_TOO_BIG); else { - switch (errno) { - case ENETUNREACH: + switch (WSAGetLastError()) { + case WSAENETUNREACH: SetLastError(IP_DEST_NET_UNREACHABLE); break; - case EHOSTUNREACH: + case WSAEHOSTUNREACH: SetLastError(IP_DEST_HOST_UNREACHABLE); break; default: - TRACE("unknown error: errno=%d\n",errno); + TRACE("unknown error: errno=%d\n",WSAGetLastError()); SetLastError(IP_GENERAL_FAILURE); } } diff --git a/reactos/dll/win32/iphlpapi/iphlpapi.rbuild b/reactos/dll/win32/iphlpapi/iphlpapi.rbuild index 94b3d3126f8..7e6919c9014 100644 --- a/reactos/dll/win32/iphlpapi/iphlpapi.rbuild +++ b/reactos/dll/win32/iphlpapi/iphlpapi.rbuild @@ -1,4 +1,4 @@ - + include include/reactos/wine diff --git a/reactos/dll/win32/jscript/jscript.rbuild b/reactos/dll/win32/jscript/jscript.rbuild index 880339d31fa..88aa9732a85 100644 --- a/reactos/dll/win32/jscript/jscript.rbuild +++ b/reactos/dll/win32/jscript/jscript.rbuild @@ -1,5 +1,5 @@ - + . diff --git a/reactos/dll/win32/msi/msi.rbuild b/reactos/dll/win32/msi/msi.rbuild index 08880b7adc6..c85f170f048 100644 --- a/reactos/dll/win32/msi/msi.rbuild +++ b/reactos/dll/win32/msi/msi.rbuild @@ -1,7 +1,7 @@ - + . @@ -69,6 +69,7 @@ kernel32 odbccp32 ntdll + pseh msiserver msiheader diff --git a/reactos/dll/win32/msvcrt/msvcrt.rbuild b/reactos/dll/win32/msvcrt/msvcrt.rbuild index 863904e48f0..1e058111831 100644 --- a/reactos/dll/win32/msvcrt/msvcrt.rbuild +++ b/reactos/dll/win32/msvcrt/msvcrt.rbuild @@ -20,6 +20,7 @@ wine kernel32 ntdll + pseh precomp.h dllmain.c msvcrt.rc diff --git a/reactos/dll/win32/msxml3/msxml3.rbuild b/reactos/dll/win32/msxml3/msxml3.rbuild index da71855fecb..e5553f42abf 100644 --- a/reactos/dll/win32/msxml3/msxml3.rbuild +++ b/reactos/dll/win32/msxml3/msxml3.rbuild @@ -1,5 +1,5 @@ - + . diff --git a/reactos/dll/win32/odbc32/odbc32.rbuild b/reactos/dll/win32/odbc32/odbc32.rbuild index 6a71d3dae22..54179867702 100644 --- a/reactos/dll/win32/odbc32/odbc32.rbuild +++ b/reactos/dll/win32/odbc32/odbc32.rbuild @@ -1,7 +1,7 @@ - + . include/reactos/wine diff --git a/reactos/dll/win32/ole32/ole32.rbuild b/reactos/dll/win32/ole32/ole32.rbuild index 2bcc7974f7b..c2ce4d36092 100644 --- a/reactos/dll/win32/ole32/ole32.rbuild +++ b/reactos/dll/win32/ole32/ole32.rbuild @@ -1,7 +1,7 @@ - + . @@ -61,6 +61,8 @@ dcom.idl irot.idl . + + -fno-unit-at-a-time irot.idl diff --git a/reactos/dll/win32/oleaut32/oleaut32.rbuild b/reactos/dll/win32/oleaut32/oleaut32.rbuild index 1cc9243f803..fe1a201b5c1 100644 --- a/reactos/dll/win32/oleaut32/oleaut32.rbuild +++ b/reactos/dll/win32/oleaut32/oleaut32.rbuild @@ -1,7 +1,7 @@ - + . diff --git a/reactos/dll/win32/opengl32/opengl32.rbuild b/reactos/dll/win32/opengl32/opengl32.rbuild index f201ddd4e86..7f40023262a 100644 --- a/reactos/dll/win32/opengl32/opengl32.rbuild +++ b/reactos/dll/win32/opengl32/opengl32.rbuild @@ -1,4 +1,4 @@ - + ntdll diff --git a/reactos/dll/win32/rpcrt4/rpcrt4.rbuild b/reactos/dll/win32/rpcrt4/rpcrt4.rbuild index ae4cb6a6c27..a6082924c18 100644 --- a/reactos/dll/win32/rpcrt4/rpcrt4.rbuild +++ b/reactos/dll/win32/rpcrt4/rpcrt4.rbuild @@ -1,4 +1,4 @@ - + . @@ -39,6 +39,8 @@ rpcrt4.rc epm.idl . + + -fno-unit-at-a-time epm.idl diff --git a/reactos/dll/win32/rsaenh/rsaenh.rbuild b/reactos/dll/win32/rsaenh/rsaenh.rbuild index e68a6cf87e8..d7d6b24de4f 100644 --- a/reactos/dll/win32/rsaenh/rsaenh.rbuild +++ b/reactos/dll/win32/rsaenh/rsaenh.rbuild @@ -1,7 +1,7 @@ - + . diff --git a/reactos/dll/win32/setupapi/setupapi.rbuild b/reactos/dll/win32/setupapi/setupapi.rbuild index 785e57f7ef5..ac8cbf4fd10 100644 --- a/reactos/dll/win32/setupapi/setupapi.rbuild +++ b/reactos/dll/win32/setupapi/setupapi.rbuild @@ -1,6 +1,6 @@ - + . include/reactos/wine diff --git a/reactos/dll/win32/shell32/shell32.rbuild b/reactos/dll/win32/shell32/shell32.rbuild index c9b1a32c6a2..4c0dc6b2924 100644 --- a/reactos/dll/win32/shell32/shell32.rbuild +++ b/reactos/dll/win32/shell32/shell32.rbuild @@ -1,4 +1,4 @@ - + . diff --git a/reactos/dll/win32/syssetup/syssetup.rbuild b/reactos/dll/win32/syssetup/syssetup.rbuild index 6dc1bcfb4b1..6b13019eb03 100644 --- a/reactos/dll/win32/syssetup/syssetup.rbuild +++ b/reactos/dll/win32/syssetup/syssetup.rbuild @@ -1,4 +1,4 @@ - + . pseh diff --git a/reactos/dll/win32/twain_32/twain_32.rbuild b/reactos/dll/win32/twain_32/twain_32.rbuild index 716e87a05d6..00eea414eaa 100644 --- a/reactos/dll/win32/twain_32/twain_32.rbuild +++ b/reactos/dll/win32/twain_32/twain_32.rbuild @@ -1,4 +1,4 @@ - + . diff --git a/reactos/dll/win32/winhttp/winhttp.rbuild b/reactos/dll/win32/winhttp/winhttp.rbuild index 687d7524a46..1cb28a706a8 100644 --- a/reactos/dll/win32/winhttp/winhttp.rbuild +++ b/reactos/dll/win32/winhttp/winhttp.rbuild @@ -1,7 +1,7 @@ - + . diff --git a/reactos/dll/win32/wininet/wininet.rbuild b/reactos/dll/win32/wininet/wininet.rbuild index 434373e661c..cf0064396ea 100644 --- a/reactos/dll/win32/wininet/wininet.rbuild +++ b/reactos/dll/win32/wininet/wininet.rbuild @@ -1,7 +1,7 @@ - + . diff --git a/reactos/dll/win32/winmm/winmm.rbuild b/reactos/dll/win32/winmm/winmm.rbuild index fb8023f98a6..58185cd2c57 100644 --- a/reactos/dll/win32/winmm/winmm.rbuild +++ b/reactos/dll/win32/winmm/winmm.rbuild @@ -7,7 +7,7 @@ - + . include/reactos/wine diff --git a/reactos/dll/win32/wintrust/wintrust.rbuild b/reactos/dll/win32/wintrust/wintrust.rbuild index 1cab0d0c545..0cea3a86382 100644 --- a/reactos/dll/win32/wintrust/wintrust.rbuild +++ b/reactos/dll/win32/wintrust/wintrust.rbuild @@ -1,4 +1,4 @@ - + . @@ -11,10 +11,13 @@ kernel32 imagehlp ntdll + pseh crypt.c register.c wintrust_main.c asn.c softpub.c version.rc + + -fno-unit-at-a-time diff --git a/reactos/include/reactos/wine/exception.h b/reactos/include/reactos/wine/exception.h index 9b28d69c537..af390505e71 100644 --- a/reactos/include/reactos/wine/exception.h +++ b/reactos/include/reactos/wine/exception.h @@ -1,342 +1,66 @@ -/* - * Wine exception handling - * - * Copyright (c) 1999 Alexandre Julliard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - #ifndef __WINE_WINE_EXCEPTION_H #define __WINE_WINE_EXCEPTION_H -#include -#include -#include +#include +#include +#include #ifdef __cplusplus extern "C" { #endif -/* The following definitions allow using exceptions in Wine and Winelib code - * - * They should be used like this: - * - * __TRY - * { - * do some stuff that can raise an exception - * } - * __EXCEPT(filter_func,param) - * { - * handle the exception here - * } - * __ENDTRY - * - * or - * - * __TRY - * { - * do some stuff that can raise an exception - * } - * __FINALLY(finally_func,param) - * - * The filter_func must be defined with the WINE_EXCEPTION_FILTER - * macro, and return one of the EXCEPTION_* code; it can use - * GetExceptionInformation and GetExceptionCode to retrieve the - * exception info. - * - * The finally_func must be defined with the WINE_FINALLY_FUNC macro. - * - * Warning: inside a __TRY or __EXCEPT block, 'break' or 'continue' statements - * break out of the current block. You cannot use 'return', 'goto' - * or 'longjmp' to leave a __TRY block, as this will surely crash. - * You can use them to leave a __EXCEPT block though. - * - * -- AJ - */ +struct _EXCEPTION_REGISTRATION_RECORD; +typedef struct _EXCEPTION_REGISTRATION_RECORD EXCEPTION_REGISTRATION_RECORD, *PEXCEPTION_REGISTRATION_RECORD; -typedef struct _EXCEPTION_REGISTRATION_RECORD +struct _EXCEPTION_REGISTRATION_RECORD { - struct _EXCEPTION_REGISTRATION_RECORD *Prev; + struct _EXCEPTION_REGISTRATION_RECORD * Prev; PEXCEPTION_HANDLER Handler; -} EXCEPTION_REGISTRATION_RECORD, *PEXCEPTION_REGISTRATION_RECORD; +}; -/* Define this if you want to use your compiler built-in __try/__except support. - * This is only useful when compiling to a native Windows binary, as the built-in - * compiler exceptions will most certainly not work under Winelib. - */ -#ifdef USE_COMPILER_EXCEPTIONS +#define __TRY _SEH2_TRY +#define __EXCEPT(func) _SEH2_EXCEPT(func(_SEH2_GetExceptionInformation())) +#define __EXCEPT_PAGE_FAULT _SEH2_EXCEPT(_SEH2_GetExceptionCode() == STATUS_ACCESS_VIOLATION) +#define __EXCEPT_ALL _SEH2_EXCEPT(_SEH_EXECUTE_HANDLER) +#define __ENDTRY _SEH2_END +#define __FINALLY(func) _SEH2_FINALLY { func(!_SEH2_AbnormalTermination()); } -#define __TRY __try -#define __EXCEPT(func) __except((func)(GetExceptionInformation())) -#define __FINALLY(func) __finally { (func)(!AbnormalTermination()); } -#define __ENDTRY /*nothing*/ -#define __EXCEPT_PAGE_FAULT __except(GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION) -#define __EXCEPT_ALL __except(EXCEPTION_EXECUTE_HANDLER) - -#else /* USE_COMPILER_EXCEPTIONS */ - -#ifndef __GNUC__ -#define __attribute__(x) /* nothing */ +#ifndef GetExceptionCode +#define GetExceptionCode() _SEH2_GetExceptionCode() #endif -#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__REACTOS__) -#define sigjmp_buf jmp_buf -#define sigsetjmp(buf,sigs) setjmp(buf) -#define siglongjmp(buf,val) longjmp(buf,val) +#ifndef GetExceptionInformation +#define GetExceptionInformation() _SEH2_GetExceptionInformation() #endif -#define __TRY \ - do { __WINE_FRAME __f; \ - int __first = 1; \ - for (;;) if (!__first) \ - { \ - do { - -#define __EXCEPT(func) \ - } while(0); \ - __wine_pop_frame( &__f.frame ); \ - break; \ - } else { \ - __f.frame.Handler = __wine_exception_handler; \ - __f.u.filter = (func); \ - if (sigsetjmp( __f.jmp, 0 )) { \ - const __WINE_FRAME * const __eptr __attribute__((unused)) = &__f; \ - do { - -/* convenience handler for page fault exceptions */ -#define __EXCEPT_PAGE_FAULT \ - } while(0); \ - __wine_pop_frame( &__f.frame ); \ - break; \ - } else { \ - __f.frame.Handler = __wine_exception_handler_page_fault; \ - if (sigsetjmp( __f.jmp, 0 )) { \ - const __WINE_FRAME * const __eptr __attribute__((unused)) = &__f; \ - do { - -/* convenience handler for all exception */ -#define __EXCEPT_ALL \ - } while(0); \ - __wine_pop_frame( &__f.frame ); \ - break; \ - } else { \ - __f.frame.Handler = __wine_exception_handler_all; \ - if (sigsetjmp( __f.jmp, 0 )) { \ - const __WINE_FRAME * const __eptr __attribute__((unused)) = &__f; \ - do { - -#define __ENDTRY \ - } while (0); \ - break; \ - } \ - __wine_push_frame( &__f.frame ); \ - __first = 0; \ - } \ - } while (0); - -#define __FINALLY(func) \ - } while(0); \ - __wine_pop_frame( &__f.frame ); \ - (func)(1); \ - break; \ - } else { \ - __f.frame.Handler = __wine_finally_handler; \ - __f.u.finally_func = (func); \ - __wine_push_frame( &__f.frame ); \ - __first = 0; \ - } \ - } while (0); - - -typedef LONG (CALLBACK *__WINE_FILTER)(PEXCEPTION_POINTERS); -typedef void (CALLBACK *__WINE_FINALLY)(BOOL); - -#define GetExceptionInformation() (__eptr) -#define GetExceptionCode() (__eptr->ExceptionRecord->ExceptionCode) - -#undef AbnormalTermination -#define AbnormalTermination() (!__normal) - -typedef struct __tagWINE_FRAME -{ - EXCEPTION_REGISTRATION_RECORD frame; - union - { - /* exception data */ - __WINE_FILTER filter; - /* finally data */ - __WINE_FINALLY finally_func; - } u; - sigjmp_buf jmp; - /* hack to make GetExceptionCode() work in handler */ - DWORD ExceptionCode; - const struct __tagWINE_FRAME *ExceptionRecord; -} __WINE_FRAME; - -#endif /* USE_COMPILER_EXCEPTIONS */ - -static inline EXCEPTION_REGISTRATION_RECORD *__wine_push_frame( EXCEPTION_REGISTRATION_RECORD *frame ) -{ -#if defined(__GNUC__) && defined(__i386__) - EXCEPTION_REGISTRATION_RECORD *prev; - __asm__ __volatile__(".byte 0x64\n\tmovl (0),%0" - "\n\tmovl %0,(%1)" - "\n\t.byte 0x64\n\tmovl %1,(0)" - : "=&r" (prev) : "r" (frame) : "memory" ); - return prev; -#else - NT_TIB *teb = (NT_TIB *)NtCurrentTeb(); - frame->Prev = teb->ExceptionList; - teb->ExceptionList = frame; - return frame->Prev; +#ifndef AbnormalTermination +#define AbnormalTermination() _SEH2_AbnormalTermination() #endif -} -static inline EXCEPTION_REGISTRATION_RECORD *__wine_pop_frame( EXCEPTION_REGISTRATION_RECORD *frame ) -{ -#if defined(__GNUC__) && defined(__i386__) - __asm__ __volatile__(".byte 0x64\n\tmovl %0,(0)" - : : "r" (frame->Prev) : "memory" ); - return frame->Prev; +#define EXCEPTION_WINE_STUB 0x80000100 +#define EXCEPTION_WINE_ASSERTION 0x80000101 -#else - NT_TIB *teb = (NT_TIB *)NtCurrentTeb(); - teb->ExceptionList = frame->Prev; - return frame->Prev; -#endif -} - -/* Exception handling flags - from OS/2 2.0 exception handling */ - -/* Win32 seems to use the same flags as ExceptionFlags in an EXCEPTION_RECORD */ -#define EH_NONCONTINUABLE 0x01 -#define EH_UNWINDING 0x02 -#define EH_EXIT_UNWIND 0x04 -#define EH_STACK_INVALID 0x08 -#define EH_NESTED_CALL 0x10 - -/* Wine-specific exceptions codes */ - -#define EXCEPTION_WINE_STUB 0x80000100 /* stub entry point called */ -#define EXCEPTION_WINE_ASSERTION 0x80000101 /* assertion failed */ - -/* unhandled return status from vm86 mode */ #define EXCEPTION_VM86_INTx 0x80000110 #define EXCEPTION_VM86_STI 0x80000111 #define EXCEPTION_VM86_PICRETURN 0x80000112 +static inline EXCEPTION_REGISTRATION_RECORD *__wine_push_frame( EXCEPTION_REGISTRATION_RECORD *frame ) +{ + frame->Prev = (struct _EXCEPTION_REGISTRATION_RECORD *)__readfsdword(0); + __writefsdword(0, (unsigned long)frame); + return frame->Prev; +} + +static inline EXCEPTION_REGISTRATION_RECORD *__wine_pop_frame( EXCEPTION_REGISTRATION_RECORD *frame ) +{ + __writefsdword(0, (unsigned long)frame->Prev); + return frame->Prev; +} + extern void __wine_enter_vm86( CONTEXT *context ); -#ifndef USE_COMPILER_EXCEPTIONS - -/* wrapper for RtlUnwind since it clobbers registers on Windows */ -static inline void __wine_rtl_unwind( EXCEPTION_REGISTRATION_RECORD* frame, EXCEPTION_RECORD *record ) -{ -#if defined(__GNUC__) && defined(__i386__) - int dummy1, dummy2, dummy3; - __asm__ __volatile__("pushl %%ebp\n\t" - "pushl %%ebx\n\t" - "pushl $0\n\t" - "pushl %2\n\t" - "pushl $0\n\t" - "pushl %1\n\t" - "call *%0\n\t" - "popl %%ebx\n\t" - "popl %%ebp" - : "=a" (dummy1), "=S" (dummy2), "=D" (dummy3) - : "0" (RtlUnwind), "1" (frame), "2" (record) - : "ecx", "edx", "memory" ); -#else - RtlUnwind( frame, 0, record, 0 ); -#endif -} - -static inline void DECLSPEC_NORETURN __wine_unwind_frame( EXCEPTION_RECORD *record, - EXCEPTION_REGISTRATION_RECORD *frame ) -{ - __WINE_FRAME *wine_frame = (__WINE_FRAME *)frame; - - /* hack to make GetExceptionCode() work in handler */ - wine_frame->ExceptionCode = record->ExceptionCode; - wine_frame->ExceptionRecord = wine_frame; - - __wine_rtl_unwind( frame, record ); - __wine_pop_frame( frame ); - siglongjmp( wine_frame->jmp, 1 ); -} - -static inline EXCEPTION_DISPOSITION -__wine_exception_handler( struct _EXCEPTION_RECORD *record, void *frame, - struct _CONTEXT *context, void *pdispatcher ) -{ - __WINE_FRAME *wine_frame = (__WINE_FRAME *)frame; - EXCEPTION_POINTERS ptrs; - - if (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND | EH_NESTED_CALL)) - return ExceptionContinueSearch; - - ptrs.ExceptionRecord = record; - ptrs.ContextRecord = context; - switch(wine_frame->u.filter( &ptrs )) - { - case EXCEPTION_CONTINUE_SEARCH: - return ExceptionContinueSearch; - case EXCEPTION_CONTINUE_EXECUTION: - return ExceptionContinueExecution; - case EXCEPTION_EXECUTE_HANDLER: - break; - } - __wine_unwind_frame( record, frame ); -} - -static inline EXCEPTION_DISPOSITION -__wine_exception_handler_page_fault( struct _EXCEPTION_RECORD *record, void *frame, - struct _CONTEXT *context, void *pdispatcher ) -{ - if (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND | EH_NESTED_CALL)) - return ExceptionContinueSearch; - if (record->ExceptionCode != STATUS_ACCESS_VIOLATION) - return ExceptionContinueSearch; - __wine_unwind_frame( record, frame ); -} - -static inline EXCEPTION_DISPOSITION -__wine_exception_handler_all( struct _EXCEPTION_RECORD *record, void *frame, - struct _CONTEXT *context, void *pdispatcher ) -{ - if (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND | EH_NESTED_CALL)) - return ExceptionContinueSearch; - __wine_unwind_frame( record, frame ); -} - -static inline EXCEPTION_DISPOSITION -__wine_finally_handler( struct _EXCEPTION_RECORD *record, void *frame, - struct _CONTEXT *context, void *pdispatcher ) -{ - if (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND)) - { - __WINE_FRAME *wine_frame = (__WINE_FRAME *)frame; - wine_frame->u.finally_func( FALSE ); - } - return ExceptionContinueSearch; -} - -#endif /* USE_COMPILER_EXCEPTIONS */ - #ifdef __cplusplus } #endif -#endif /* __WINE_WINE_EXCEPTION_H */ +#endif diff --git a/reactos/lib/3rdparty/libxml2/libxml2.rbuild b/reactos/lib/3rdparty/libxml2/libxml2.rbuild index 822f8b59729..e68ac79b66a 100644 --- a/reactos/lib/3rdparty/libxml2/libxml2.rbuild +++ b/reactos/lib/3rdparty/libxml2/libxml2.rbuild @@ -1,6 +1,6 @@ - + diff --git a/reactos/tools/rbuild/module.cpp b/reactos/tools/rbuild/module.cpp index 8766f8bc110..6f71b952c86 100644 --- a/reactos/tools/rbuild/module.cpp +++ b/reactos/tools/rbuild/module.cpp @@ -1185,7 +1185,7 @@ Module::GetDefaultModuleCRT () const return "static"; case Win32DLL: case Win32OCX: - return "msvcrt"; + return "ntdll"; case NativeDLL: case NativeCUI: return "ntdll";