Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c57f5d98
Commit
c57f5d98
authored
Sep 12, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Sep 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp110: Add _Throw_C_error implementation.
parent
d87d101a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
80 additions
and
17 deletions
+80
-17
msvcp110.spec
dlls/msvcp110/msvcp110.spec
+1
-1
msvcp120.spec
dlls/msvcp120/msvcp120.spec
+1
-1
msvcp120_app.spec
dlls/msvcp120_app/msvcp120_app.spec
+1
-1
msvcp140.spec
dlls/msvcp140/msvcp140.spec
+1
-1
exception.c
dlls/msvcp90/exception.c
+50
-2
misc.c
dlls/msvcp90/misc.c
+24
-10
msvcp90.h
dlls/msvcp90/msvcp90.h
+1
-0
msvcp_win.spec
dlls/msvcp_win/msvcp_win.spec
+1
-1
No files found.
dlls/msvcp110/msvcp110.spec
View file @
c57f5d98
...
...
@@ -1778,7 +1778,7 @@
@ extern ?_Sync@ios_base@std@@0_NA ios_base_Sync
@ cdecl -arch=win32 ?_Syserror_map@std@@YAPBDH@Z(long) _Syserror_map
@ cdecl -arch=win64 ?_Syserror_map@std@@YAPEBDH@Z(long) _Syserror_map
@
stub ?_Throw_C_error@std@@YAXH@Z
@
cdecl ?_Throw_C_error@std@@YAXH@Z(long) _Throw_C_error
@ stub ?_Throw_Cpp_error@std@@YAXH@Z
@ cdecl -arch=win32 ?_Throw_future_error@std@@YAXABVerror_code@1@@Z(ptr) _Throw_future_error
@ cdecl -arch=win64 ?_Throw_future_error@std@@YAXAEBVerror_code@1@@Z(ptr) _Throw_future_error
...
...
dlls/msvcp120/msvcp120.spec
View file @
c57f5d98
...
...
@@ -1739,7 +1739,7 @@
@ extern ?_Sync@ios_base@std@@0_NA ios_base_Sync
@ cdecl -arch=win32 ?_Syserror_map@std@@YAPBDH@Z(long) _Syserror_map
@ cdecl -arch=win64 ?_Syserror_map@std@@YAPEBDH@Z(long) _Syserror_map
@
stub ?_Throw_C_error@std@@YAXH@Z
@
cdecl ?_Throw_C_error@std@@YAXH@Z(long) _Throw_C_error
@ stub ?_Throw_Cpp_error@std@@YAXH@Z
@ cdecl -arch=win32 ?_Throw_future_error@std@@YAXABVerror_code@1@@Z(ptr) _Throw_future_error
@ cdecl -arch=win64 ?_Throw_future_error@std@@YAXAEBVerror_code@1@@Z(ptr) _Throw_future_error
...
...
dlls/msvcp120_app/msvcp120_app.spec
View file @
c57f5d98
...
...
@@ -1739,7 +1739,7 @@
@ extern ?_Sync@ios_base@std@@0_NA msvcp120.?_Sync@ios_base@std@@0_NA
@ cdecl -arch=win32 ?_Syserror_map@std@@YAPBDH@Z(long) msvcp120.?_Syserror_map@std@@YAPBDH@Z
@ cdecl -arch=win64 ?_Syserror_map@std@@YAPEBDH@Z(long) msvcp120.?_Syserror_map@std@@YAPEBDH@Z
@
stub
?_Throw_C_error@std@@YAXH@Z
@
cdecl ?_Throw_C_error@std@@YAXH@Z(long) msvcp120.
?_Throw_C_error@std@@YAXH@Z
@ stub ?_Throw_Cpp_error@std@@YAXH@Z
@ cdecl -arch=win32 ?_Throw_future_error@std@@YAXABVerror_code@1@@Z(ptr) msvcp120.?_Throw_future_error@std@@YAXABVerror_code@1@@Z
@ cdecl -arch=win64 ?_Throw_future_error@std@@YAXAEBVerror_code@1@@Z(ptr) msvcp120.?_Throw_future_error@std@@YAXAEBVerror_code@1@@Z
...
...
dlls/msvcp140/msvcp140.spec
View file @
c57f5d98
...
...
@@ -1623,7 +1623,7 @@
@ extern ?_Sync@ios_base@std@@0_NA ios_base_Sync
@ cdecl -arch=win32 ?_Syserror_map@std@@YAPBDH@Z(long) _Syserror_map
@ cdecl -arch=win64 ?_Syserror_map@std@@YAPEBDH@Z(long) _Syserror_map
@
stub ?_Throw_C_error@std@@YAXH@Z
@
cdecl ?_Throw_C_error@std@@YAXH@Z(long) _Throw_C_error
@ stub ?_Throw_Cpp_error@std@@YAXH@Z
@ cdecl -arch=win32 ?_Throw_future_error@std@@YAXABVerror_code@1@@Z(ptr) _Throw_future_error
@ cdecl -arch=win64 ?_Throw_future_error@std@@YAXAEBVerror_code@1@@Z(ptr) _Throw_future_error
...
...
dlls/msvcp90/exception.c
View file @
c57f5d98
...
...
@@ -16,6 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <errno.h>
#include <stdarg.h>
#include "msvcp90.h"
...
...
@@ -722,7 +723,9 @@ DEFINE_RTTI_DATA4(failure, 0, &system_error_rtti_base_descriptor,
&
_System_error_rtti_base_descriptor
,
&
runtime_error_rtti_base_descriptor
,
&
exception_rtti_base_descriptor
,
".?AVfailure@ios_base@std@@"
)
DEFINE_CXX_TYPE_INFO
(
_System_error
)
DEFINE_CXX_TYPE_INFO
(
system_error
);
DEFINE_CXX_DATA3
(
system_error
,
&
_System_error_cxx_type_info
,
&
runtime_error_cxx_type_info
,
&
exception_cxx_type_info
,
MSVCP_runtime_error_dtor
)
DEFINE_CXX_DATA4
(
failure
,
&
system_error_cxx_type_info
,
&
_System_error_cxx_type_info
,
&
runtime_error_cxx_type_info
,
&
exception_cxx_type_info
,
MSVCP_runtime_error_dtor
)
...
...
@@ -732,7 +735,12 @@ DEFINE_RTTI_DATA2(system_error, 0, &runtime_error_rtti_base_descriptor,
DEFINE_RTTI_DATA3
(
failure
,
0
,
&
system_error_rtti_base_descriptor
,
&
runtime_error_rtti_base_descriptor
,
&
exception_rtti_base_descriptor
,
".?AVfailure@ios_base@std@@"
)
#if _MSVCP_VER == 100
DEFINE_CXX_TYPE_INFO
(
system_error
);
#else
DEFINE_CXX_DATA2
(
system_error
,
&
runtime_error_cxx_type_info
,
&
exception_cxx_type_info
,
MSVCP_runtime_error_dtor
)
#endif
DEFINE_CXX_DATA3
(
failure
,
&
system_error_cxx_type_info
,
&
runtime_error_cxx_type_info
,
&
exception_cxx_type_info
,
MSVCP_runtime_error_dtor
)
#else
...
...
@@ -1033,6 +1041,44 @@ void __cdecl _Rethrow_future_exception(const exception_ptr ep)
{
exception_ptr_rethrow
(
&
ep
);
}
/* ?_Throw_C_error@std@@YAXH@Z */
void
__cdecl
_Throw_C_error
(
int
code
)
{
system_error
se
;
const
char
*
msg
;
errno_t
err
;
TRACE
(
"(%d)
\n
"
,
code
);
switch
(
code
)
{
case
1
:
case
2
:
err
=
EAGAIN
;
break
;
case
3
:
err
=
EBUSY
;
break
;
case
4
:
err
=
EINVAL
;
break
;
default:
#if _MSVCP_VER >= 140
abort
();
#else
return
;
#endif
}
msg
=
strerror
(
err
);
MSVCP_runtime_error_ctor
(
&
se
.
base
,
&
msg
);
se
.
code
.
code
=
err
;
se
.
code
.
category
=
std_generic_category
();
se
.
base
.
e
.
vtable
=
&
system_error_vtable
;
_CxxThrowException
(
&
se
,
&
system_error_cxx_type
);
}
#endif
#if _MSVCP_VER >= 140
...
...
@@ -1509,8 +1555,10 @@ void init_exception(void *base)
#if _MSVCP_VER > 110
init__System_error_cxx_type_info
(
base
);
#endif
#if _MSVCP_VER
> 9
0
#if _MSVCP_VER
== 10
0
init_system_error_cxx_type_info
(
base
);
#elif _MSVCP_VER > 100
init_system_error_cxx
(
base
);
#endif
init_failure_cxx
(
base
);
init_range_error_cxx
(
base
);
...
...
dlls/msvcp90/misc.c
View file @
c57f5d98
...
...
@@ -1110,13 +1110,6 @@ const char* __thiscall custom_category_name(const custom_category *this)
return
this
->
type
;
}
DEFINE_THISCALL_WRAPPER
(
custom_category_message
,
12
)
basic_string_char
*
__thiscall
custom_category_message
(
const
custom_category
*
this
,
basic_string_char
*
ret
,
int
err
)
{
return
MSVCP_basic_string_char_ctor_cstr
(
ret
,
strerror
(
err
));
}
/* ?system_category@std@@YAABVerror_category@1@XZ */
/* ?system_category@std@@YAAEBVerror_category@1@XZ */
const
error_category
*
__cdecl
std_system_category
(
void
)
...
...
@@ -1124,7 +1117,9 @@ const error_category* __cdecl std_system_category(void)
TRACE
(
"()
\n
"
);
return
&
system_category
.
base
;
}
#endif
#if _MSVCP_VER >= 100
static
custom_category
generic_category
;
extern
const
vtable_ptr
generic_category_vtable
;
...
...
@@ -1132,7 +1127,26 @@ extern const vtable_ptr generic_category_vtable;
static
void
generic_category_ctor
(
custom_category
*
this
)
{
this
->
base
.
vtable
=
&
generic_category_vtable
;
#if _MSVCP_VER == 100
this
->
type
=
"generic"
;
#endif
}
DEFINE_THISCALL_WRAPPER
(
generic_category_name
,
4
)
const
char
*
__thiscall
generic_category_name
(
const
custom_category
*
this
)
{
#if _MSVCP_VER == 100
return
this
->
type
;
#else
return
"generic"
;
#endif
}
DEFINE_THISCALL_WRAPPER
(
custom_category_message
,
12
)
basic_string_char
*
__thiscall
custom_category_message
(
const
custom_category
*
this
,
basic_string_char
*
ret
,
int
err
)
{
return
MSVCP_basic_string_char_ctor_cstr
(
ret
,
strerror
(
err
));
}
/* ?generic_category@std@@YAABVerror_category@1@XZ */
...
...
@@ -1716,14 +1730,14 @@ __ASM_BLOCK_BEGIN(misc_vtables)
VTABLE_ADD_FUNC
(
custom_category_default_error_condition
)
VTABLE_ADD_FUNC
(
custom_category_equivalent
)
VTABLE_ADD_FUNC
(
custom_category_equivalent_code
));
#endif
__ASM_VTABLE
(
generic_category
,
VTABLE_ADD_FUNC
(
custom_category_vector_dtor
)
VTABLE_ADD_FUNC
(
custom
_category_name
)
VTABLE_ADD_FUNC
(
generic
_category_name
)
VTABLE_ADD_FUNC
(
custom_category_message
)
VTABLE_ADD_FUNC
(
custom_category_default_error_condition
)
VTABLE_ADD_FUNC
(
custom_category_equivalent
)
VTABLE_ADD_FUNC
(
custom_category_equivalent_code
));
#endif
#if _MSVCP_VER >= 110
__ASM_VTABLE
(
_Pad
,
VTABLE_ADD_FUNC
(
_Pad__Go
));
...
...
@@ -1748,11 +1762,11 @@ void init_misc(void *base)
#if _MSVCP_VER >= 100
iostream_category_ctor
(
&
iostream_category
);
generic_category_ctor
(
&
generic_category
);
#endif
#if _MSVCP_VER == 100
system_category_ctor
(
&
system_category
);
generic_category_ctor
(
&
generic_category
);
#endif
}
...
...
dlls/msvcp90/msvcp90.h
View file @
c57f5d98
...
...
@@ -674,6 +674,7 @@ typedef struct {
}
error_category
;
const
error_category
*
__cdecl
std_iostream_category
(
void
);
const
error_category
*
__cdecl
std_generic_category
(
void
);
typedef
struct
{
...
...
dlls/msvcp_win/msvcp_win.spec
View file @
c57f5d98
...
...
@@ -1623,7 +1623,7 @@
@ extern ?_Sync@ios_base@std@@0_NA msvcp140.?_Sync@ios_base@std@@0_NA
@ cdecl -arch=win32 ?_Syserror_map@std@@YAPBDH@Z(long) msvcp140.?_Syserror_map@std@@YAPBDH@Z
@ cdecl -arch=win64 ?_Syserror_map@std@@YAPEBDH@Z(long) msvcp140.?_Syserror_map@std@@YAPEBDH@Z
@
stub
?_Throw_C_error@std@@YAXH@Z
@
cdecl ?_Throw_C_error@std@@YAXH@Z(long) msvcp140.
?_Throw_C_error@std@@YAXH@Z
@ stub ?_Throw_Cpp_error@std@@YAXH@Z
@ cdecl -arch=win32 ?_Throw_future_error@std@@YAXABVerror_code@1@@Z(ptr) msvcp140.?_Throw_future_error@std@@YAXABVerror_code@1@@Z
@ cdecl -arch=win64 ?_Throw_future_error@std@@YAXAEBVerror_code@1@@Z(ptr) msvcp140.?_Throw_future_error@std@@YAXAEBVerror_code@1@@Z
...
...
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