Fix %fs for signal handlers in the FS_sig undefined case (this patch

actually from Ulrich Weigand, I only tested it).
oldstable
Juergen Lock 1999-09-05 16:26:12 +00:00 committed by Alexandre Julliard
parent e977d6ca5c
commit 7004766ee7
1 changed files with 6 additions and 1 deletions

View File

@ -244,7 +244,12 @@ typedef struct _CONTEXT /* Note 1 */
if (!fs) fs = SYSLEVEL_EmergencyTeb; \
SET_FS(fs); } while (0)
#else
#define HANDLER_INIT() /* nothing */
#define HANDLER_INIT() \
do { int fs; GET_FS(fs); fs &= 0xffff; \
if (!IS_SELECTOR_SYSTEM(CS_sig(HANDLER_CONTEXT))) \
fs = SYSLEVEL_Win16CurrentTeb; \
if (!fs) fs = SYSLEVEL_EmergencyTeb; \
SET_FS(fs); } while (0)
#endif
#else /* __i386__ */