Commit 97847eee authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Avoid referencing winecrt0 exception handlers from the Unix library.

parent 6844ff8a
......@@ -92,6 +92,8 @@ struct file_view
unsigned int protect; /* protection for all pages at allocation time and SEC_* flags */
};
#define __EXCEPT_SYSCALL __EXCEPT_HANDLER(0)
/* per-page protection flags */
#define VPROT_READ 0x01
#define VPROT_WRITE 0x02
......@@ -3142,7 +3144,7 @@ BOOL virtual_check_buffer_for_read( const void *ptr, SIZE_T size )
dummy = p[0];
dummy = p[count - 1];
}
__EXCEPT_PAGE_FAULT
__EXCEPT_SYSCALL
{
return FALSE;
}
......@@ -3175,7 +3177,7 @@ BOOL virtual_check_buffer_for_write( void *ptr, SIZE_T size )
p[0] |= 0;
p[count - 1] |= 0;
}
__EXCEPT_PAGE_FAULT
__EXCEPT_SYSCALL
{
return FALSE;
}
......@@ -3197,7 +3199,7 @@ BOOL WINAPI IsBadStringPtrA( LPCSTR str, UINT_PTR max )
volatile const char *p = str;
while (p != str + max) if (!*p++) break;
}
__EXCEPT_PAGE_FAULT
__EXCEPT_SYSCALL
{
return TRUE;
}
......@@ -3219,7 +3221,7 @@ BOOL WINAPI IsBadStringPtrW( LPCWSTR str, UINT_PTR max )
volatile const WCHAR *p = str;
while (p != str + max) if (!*p++) break;
}
__EXCEPT_PAGE_FAULT
__EXCEPT_SYSCALL
{
return TRUE;
}
......
......@@ -163,27 +163,18 @@ extern DWORD __cdecl __wine_finally_ctx_handler( EXCEPTION_RECORD *record,
const __WINE_FRAME * const __eptr __attribute__((unused)) = &__f; \
do {
/* convenience handler for page fault exceptions */
#define __EXCEPT_PAGE_FAULT \
#define __EXCEPT_HANDLER(handler) \
} while(0); \
__wine_pop_frame( &__f.frame ); \
break; \
} else { \
__f.frame.Handler = __wine_exception_handler_page_fault; \
__f.frame.Handler = (handler); \
if (__wine_setjmpex( &__f.jmp, &__f.frame )) { \
const __WINE_FRAME * const __eptr __attribute__((unused)) = &__f; \
do {
/* convenience handler for all exceptions */
#define __EXCEPT_ALL \
} while(0); \
__wine_pop_frame( &__f.frame ); \
break; \
} else { \
__f.frame.Handler = __wine_exception_handler_all; \
if (__wine_setjmpex( &__f.jmp, &__f.frame )) { \
const __WINE_FRAME * const __eptr __attribute__((unused)) = &__f; \
do {
#define __EXCEPT_PAGE_FAULT __EXCEPT_HANDLER(__wine_exception_handler_page_fault)
#define __EXCEPT_ALL __EXCEPT_HANDLER(__wine_exception_handler_all)
#define __ENDTRY \
} while (0); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment