Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
14a81773
Commit
14a81773
authored
Mar 05, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Added __pxcptinfoptrs implementation.
parent
62e00e52
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
6 deletions
+45
-6
except.c
dlls/msvcrt/except.c
+41
-4
msvcrt.h
dlls/msvcrt/msvcrt.h
+2
-1
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-1
signal.h
include/msvcrt/signal.h
+1
-0
No files found.
dlls/msvcrt/except.c
View file @
14a81773
...
@@ -61,6 +61,14 @@ static BOOL WINAPI msvcrt_console_handler(DWORD ctrlType)
...
@@ -61,6 +61,14 @@ static BOOL WINAPI msvcrt_console_handler(DWORD ctrlType)
return
ret
;
return
ret
;
}
}
/*********************************************************************
* __pxcptinfoptrs (MSVCRT.@)
*/
void
**
CDECL
MSVCRT___pxcptinfoptrs
(
void
)
{
return
(
void
**
)
&
msvcrt_get_thread_data
()
->
xcptinfo
;
}
typedef
void
(
CDECL
*
float_handler
)(
int
,
int
);
typedef
void
(
CDECL
*
float_handler
)(
int
,
int
);
/* The exception codes are actually NTSTATUS values */
/* The exception codes are actually NTSTATUS values */
...
@@ -93,8 +101,13 @@ static LONG WINAPI msvcrt_exception_filter(struct _EXCEPTION_POINTERS *except)
...
@@ -93,8 +101,13 @@ static LONG WINAPI msvcrt_exception_filter(struct _EXCEPTION_POINTERS *except)
{
{
if
(
handler
!=
MSVCRT_SIG_IGN
)
if
(
handler
!=
MSVCRT_SIG_IGN
)
{
{
EXCEPTION_POINTERS
**
ep
=
(
EXCEPTION_POINTERS
**
)
MSVCRT___pxcptinfoptrs
(),
*
old_ep
;
old_ep
=
*
ep
;
*
ep
=
except
;
sighandlers
[
MSVCRT_SIGSEGV
]
=
MSVCRT_SIG_DFL
;
sighandlers
[
MSVCRT_SIGSEGV
]
=
MSVCRT_SIG_DFL
;
handler
(
MSVCRT_SIGSEGV
);
handler
(
MSVCRT_SIGSEGV
);
*
ep
=
old_ep
;
}
}
ret
=
EXCEPTION_CONTINUE_EXECUTION
;
ret
=
EXCEPTION_CONTINUE_EXECUTION
;
}
}
...
@@ -114,6 +127,7 @@ static LONG WINAPI msvcrt_exception_filter(struct _EXCEPTION_POINTERS *except)
...
@@ -114,6 +127,7 @@ static LONG WINAPI msvcrt_exception_filter(struct _EXCEPTION_POINTERS *except)
{
{
if
(
handler
!=
MSVCRT_SIG_IGN
)
if
(
handler
!=
MSVCRT_SIG_IGN
)
{
{
EXCEPTION_POINTERS
**
ep
=
(
EXCEPTION_POINTERS
**
)
MSVCRT___pxcptinfoptrs
(),
*
old_ep
;
unsigned
int
i
;
unsigned
int
i
;
int
float_signal
=
MSVCRT__FPE_INVALID
;
int
float_signal
=
MSVCRT__FPE_INVALID
;
...
@@ -128,7 +142,11 @@ static LONG WINAPI msvcrt_exception_filter(struct _EXCEPTION_POINTERS *except)
...
@@ -128,7 +142,11 @@ static LONG WINAPI msvcrt_exception_filter(struct _EXCEPTION_POINTERS *except)
break
;
break
;
}
}
}
}
old_ep
=
*
ep
;
*
ep
=
except
;
((
float_handler
)
handler
)(
MSVCRT_SIGFPE
,
float_signal
);
((
float_handler
)
handler
)(
MSVCRT_SIGFPE
,
float_signal
);
*
ep
=
old_ep
;
}
}
ret
=
EXCEPTION_CONTINUE_EXECUTION
;
ret
=
EXCEPTION_CONTINUE_EXECUTION
;
}
}
...
@@ -139,8 +157,13 @@ static LONG WINAPI msvcrt_exception_filter(struct _EXCEPTION_POINTERS *except)
...
@@ -139,8 +157,13 @@ static LONG WINAPI msvcrt_exception_filter(struct _EXCEPTION_POINTERS *except)
{
{
if
(
handler
!=
MSVCRT_SIG_IGN
)
if
(
handler
!=
MSVCRT_SIG_IGN
)
{
{
EXCEPTION_POINTERS
**
ep
=
(
EXCEPTION_POINTERS
**
)
MSVCRT___pxcptinfoptrs
(),
*
old_ep
;
old_ep
=
*
ep
;
*
ep
=
except
;
sighandlers
[
MSVCRT_SIGILL
]
=
MSVCRT_SIG_DFL
;
sighandlers
[
MSVCRT_SIGILL
]
=
MSVCRT_SIG_DFL
;
handler
(
MSVCRT_SIGILL
);
handler
(
MSVCRT_SIGILL
);
*
ep
=
old_ep
;
}
}
ret
=
EXCEPTION_CONTINUE_EXECUTION
;
ret
=
EXCEPTION_CONTINUE_EXECUTION
;
}
}
...
@@ -204,22 +227,36 @@ int CDECL MSVCRT_raise(int sig)
...
@@ -204,22 +227,36 @@ int CDECL MSVCRT_raise(int sig)
switch
(
sig
)
switch
(
sig
)
{
{
case
MSVCRT_SIGABRT
:
case
MSVCRT_SIGFPE
:
case
MSVCRT_SIGFPE
:
case
MSVCRT_SIGILL
:
case
MSVCRT_SIGILL
:
case
MSVCRT_SIGSEGV
:
case
MSVCRT_SIGSEGV
:
case
MSVCRT_SIGINT
:
case
MSVCRT_SIGTERM
:
case
MSVCRT_SIGBREAK
:
handler
=
sighandlers
[
sig
];
handler
=
sighandlers
[
sig
];
if
(
handler
==
MSVCRT_SIG_DFL
)
MSVCRT__exit
(
3
);
if
(
handler
==
MSVCRT_SIG_DFL
)
MSVCRT__exit
(
3
);
if
(
handler
!=
MSVCRT_SIG_IGN
)
if
(
handler
!=
MSVCRT_SIG_IGN
)
{
{
EXCEPTION_POINTERS
**
ep
=
(
EXCEPTION_POINTERS
**
)
MSVCRT___pxcptinfoptrs
(),
*
old_ep
;
sighandlers
[
sig
]
=
MSVCRT_SIG_DFL
;
sighandlers
[
sig
]
=
MSVCRT_SIG_DFL
;
old_ep
=
*
ep
;
*
ep
=
NULL
;
if
(
sig
==
MSVCRT_SIGFPE
)
if
(
sig
==
MSVCRT_SIGFPE
)
((
float_handler
)
handler
)(
sig
,
MSVCRT__FPE_EXPLICITGEN
);
((
float_handler
)
handler
)(
sig
,
MSVCRT__FPE_EXPLICITGEN
);
else
else
handler
(
sig
);
handler
(
sig
);
*
ep
=
old_ep
;
}
break
;
case
MSVCRT_SIGABRT
:
case
MSVCRT_SIGINT
:
case
MSVCRT_SIGTERM
:
case
MSVCRT_SIGBREAK
:
handler
=
sighandlers
[
sig
];
if
(
handler
==
MSVCRT_SIG_DFL
)
MSVCRT__exit
(
3
);
if
(
handler
!=
MSVCRT_SIG_IGN
)
{
sighandlers
[
sig
]
=
MSVCRT_SIG_DFL
;
handler
(
sig
);
}
}
break
;
break
;
default:
default:
...
...
dlls/msvcrt/msvcrt.h
View file @
14a81773
...
@@ -200,7 +200,8 @@ struct __thread_data {
...
@@ -200,7 +200,8 @@ struct __thread_data {
struct
MSVCRT_tm
*
time_buffer
;
/* buffer for localtime/gmtime */
struct
MSVCRT_tm
*
time_buffer
;
/* buffer for localtime/gmtime */
char
*
efcvt_buffer
;
/* buffer for ecvt/fcvt */
char
*
efcvt_buffer
;
/* buffer for ecvt/fcvt */
int
unk3
[
2
];
int
unk3
[
2
];
void
*
unk4
[
4
];
void
*
unk4
[
3
];
EXCEPTION_POINTERS
*
xcptinfo
;
int
fpecode
;
int
fpecode
;
MSVCRT_pthreadmbcinfo
mbcinfo
;
MSVCRT_pthreadmbcinfo
mbcinfo
;
MSVCRT_pthreadlocinfo
locinfo
;
MSVCRT_pthreadlocinfo
locinfo
;
...
...
dlls/msvcrt/msvcrt.spec
View file @
14a81773
...
@@ -250,7 +250,7 @@
...
@@ -250,7 +250,7 @@
@ cdecl __pctype_func() MSVCRT___pctype_func
@ cdecl __pctype_func() MSVCRT___pctype_func
@ extern __pioinfo MSVCRT___pioinfo
@ extern __pioinfo MSVCRT___pioinfo
# stub __pwctype_func()
# stub __pwctype_func()
@
stub __pxcptinfoptrs()
@
cdecl __pxcptinfoptrs() MSVCRT___pxcptinfoptrs
@ cdecl __set_app_type(long) MSVCRT___set_app_type
@ cdecl __set_app_type(long) MSVCRT___set_app_type
@ extern __setlc_active MSVCRT___setlc_active
@ extern __setlc_active MSVCRT___setlc_active
@ cdecl __setusermatherr(ptr) MSVCRT___setusermatherr
@ cdecl __setusermatherr(ptr) MSVCRT___setusermatherr
...
...
include/msvcrt/signal.h
View file @
14a81773
...
@@ -42,6 +42,7 @@ typedef void (__cdecl *__sighandler_t)(int);
...
@@ -42,6 +42,7 @@ typedef void (__cdecl *__sighandler_t)(int);
#define SIG_IGN ((__sighandler_t)1)
#define SIG_IGN ((__sighandler_t)1)
#define SIG_ERR ((__sighandler_t)-1)
#define SIG_ERR ((__sighandler_t)-1)
void
**
__cdecl
__pxcptinfoptrs
(
void
);
__sighandler_t
__cdecl
signal
(
int
sig
,
__sighandler_t
func
);
__sighandler_t
__cdecl
signal
(
int
sig
,
__sighandler_t
func
);
int
__cdecl
raise
(
int
sig
);
int
__cdecl
raise
(
int
sig
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment