diff --git a/dll/win32/crtdll/crtdll.spec b/dll/win32/crtdll/crtdll.spec index 0b8e0f74225..c8b9da5e884 100644 --- a/dll/win32/crtdll/crtdll.spec +++ b/dll/win32/crtdll/crtdll.spec @@ -1,8 +1,8 @@ # Old C runtime library. -@ cdecl ??2@YAPAXI@Z(long) MSVCRT_operator_new # void * __cdecl operator new(unsigned int) -@ cdecl ??3@YAXPAX@Z(ptr) MSVCRT_operator_delete # void __cdecl operator delete(void *) -@ cdecl ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z(ptr) MSVCRT__set_new_handler # int (__cdecl*__cdecl _set_new_handler(int (__cdecl*)(unsigned int)))(unsigned int) +@ cdecl ??2@YAPAXI@Z(long) operator_new # void * __cdecl operator new(unsigned int) +@ cdecl ??3@YAXPAX@Z(ptr) operator_delete # void __cdecl operator delete(void *) +@ cdecl ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z(ptr) _set_new_handler # int (__cdecl*__cdecl _set_new_handler(int (__cdecl*)(unsigned int)))(unsigned int) @ cdecl _CIacos() @ cdecl _CIasin() @ cdecl _CIatan() diff --git a/dll/win32/msvcrt/msvcrt.spec b/dll/win32/msvcrt/msvcrt.spec index 9e66349fc80..f2f12e95c10 100644 --- a/dll/win32/msvcrt/msvcrt.spec +++ b/dll/win32/msvcrt/msvcrt.spec @@ -3,154 +3,154 @@ @ cdecl -arch=x86_64 -version=0x502 $I10_OUTPUT() I10_OUTPUT # **************** x86 C++ functions **************** -@ cdecl -arch=i386 -norelay ??0__non_rtti_object@@QAE@ABV0@@Z(ptr) MSVCRT___non_rtti_object_copy_ctor # public: __thiscall __non_rtti_object::__non_rtti_object(class __non_rtti_object const &) -@ cdecl -arch=i386 -norelay ??0__non_rtti_object@@QAE@PBD@Z(ptr) MSVCRT___non_rtti_object_ctor # public: __thiscall __non_rtti_object::__non_rtti_object(char const *) -@ cdecl -arch=i386 -norelay ??0bad_cast@@AAE@PBQBD@Z(ptr) MSVCRT_bad_cast_ctor # private: __thiscall bad_cast::bad_cast(char const * const *) -@ cdecl -arch=i386 -norelay ??0bad_cast@@QAE@ABQBD@Z(ptr) MSVCRT_bad_cast_ctor # public: __thiscall bad_cast::bad_cast(char const * const &) -@ cdecl -arch=i386 -norelay ??0bad_cast@@QAE@ABV0@@Z(ptr) MSVCRT_bad_cast_copy_ctor # public: __thiscall bad_cast::bad_cast(class bad_cast const &) -@ cdecl -arch=i386 -norelay ??0bad_cast@@QAE@PBD@Z(ptr) MSVCRT_bad_cast_ctor_charptr # public: __thiscall bad_cast::bad_cast(char const *) -@ cdecl -arch=i386 -norelay ??0bad_typeid@@QAE@ABV0@@Z(ptr) MSVCRT_bad_typeid_copy_ctor # public: __thiscall bad_typeid::bad_typeid(class bad_typeid const &) -@ cdecl -arch=i386 -norelay ??0bad_typeid@@QAE@PBD@Z(ptr) MSVCRT_bad_typeid_ctor # public: __thiscall bad_typeid::bad_typeid(char const *) -@ cdecl -arch=i386 -norelay ??0exception@@QAE@ABQBD@Z(ptr) MSVCRT_exception_ctor # public: __thiscall exception::exception(char const * const &) -@ cdecl -arch=i386 -norelay ??0exception@@QAE@ABQBDH@Z(ptr long) MSVCRT_exception_ctor_noalloc # public: __thiscall exception::exception(char const * const &,int) -@ cdecl -arch=i386 -norelay ??0exception@@QAE@ABV0@@Z(ptr) MSVCRT_exception_copy_ctor # public: __thiscall exception::exception(class exception const &) -@ cdecl -arch=i386 -norelay ??0exception@@QAE@XZ() MSVCRT_exception_default_ctor # public: __thiscall exception::exception(void) -@ cdecl -arch=i386 -norelay ??1__non_rtti_object@@UAE@XZ() MSVCRT___non_rtti_object_dtor # public: virtual __thiscall __non_rtti_object::~__non_rtti_object(void) -@ cdecl -arch=i386 -norelay ??1bad_cast@@UAE@XZ() MSVCRT_bad_cast_dtor # public: virtual __thiscall bad_cast::~bad_cast(void) -@ cdecl -arch=i386 -norelay ??1bad_typeid@@UAE@XZ() MSVCRT_bad_typeid_dtor # public: virtual __thiscall bad_typeid::~bad_typeid(void) -@ cdecl -arch=i386 -norelay ??1exception@@UAE@XZ() MSVCRT_exception_dtor # public: virtual __thiscall exception::~exception(void) -@ cdecl -arch=i386 -norelay ??1type_info@@UAE@XZ() MSVCRT_type_info_dtor # public: virtual __thiscall type_info::~type_info(void) -@ cdecl -arch=i386 ??2@YAPAXI@Z(long) MSVCRT_operator_new # void * __cdecl operator new(unsigned int) -;@ cdecl -arch=i386 ??2@YAPAXIHPBDH@Z(long long str long) MSVCRT_operator_new_dbg # void * __cdecl operator new(unsigned int,int,char const *,int) -@ cdecl -arch=i386 ??3@YAXPAX@Z(ptr) MSVCRT_operator_delete # void __cdecl operator delete(void *) -@ cdecl -arch=i386 -norelay ??4__non_rtti_object@@QAEAAV0@ABV0@@Z(ptr) MSVCRT___non_rtti_object_opequals # public: class __non_rtti_object & __thiscall __non_rtti_object::operator=(class __non_rtti_object const &) -@ cdecl -arch=i386 -norelay ??4bad_cast@@QAEAAV0@ABV0@@Z(ptr) MSVCRT_bad_cast_opequals # public: class bad_cast & __thiscall bad_cast::operator=(class bad_cast const &) -@ cdecl -arch=i386 -norelay ??4bad_typeid@@QAEAAV0@ABV0@@Z(ptr) MSVCRT_bad_typeid_opequals # public: class bad_typeid & __thiscall bad_typeid::operator=(class bad_typeid const &) -@ cdecl -arch=i386 -norelay ??4exception@@QAEAAV0@ABV0@@Z(ptr) MSVCRT_exception_opequals # public: class exception & __thiscall exception::operator=(class exception const &) -@ cdecl -arch=i386 -norelay ??8type_info@@QBEHABV0@@Z(ptr) MSVCRT_type_info_opequals_equals # public: int __thiscall type_info::operator==(class type_info const &)const -@ cdecl -arch=i386 -norelay ??9type_info@@QBEHABV0@@Z(ptr) MSVCRT_type_info_opnot_equals # public: int __thiscall type_info::operator!=(class type_info const &)const -@ extern -arch=i386 ??_7__non_rtti_object@@6B@ MSVCRT___non_rtti_object_vtable # const __non_rtti_object::`vftable' -@ extern -arch=i386 ??_7bad_cast@@6B@ MSVCRT_bad_cast_vtable # const bad_cast::`vftable' -@ extern -arch=i386 ??_7bad_typeid@@6B@ MSVCRT_bad_typeid_vtable # const bad_typeid::`vftable' -@ extern -arch=i386 ??_7exception@@6B@ MSVCRT_exception_vtable # const exception::`vftable' -@ cdecl -arch=i386 -norelay ??_E__non_rtti_object@@UAEPAXI@Z(long) MSVCRT___non_rtti_object_vector_dtor # public: virtual void * __thiscall __non_rtti_object::`vector deleting destructor'(unsigned int) -@ cdecl -arch=i386 -norelay ??_Ebad_cast@@UAEPAXI@Z(long) MSVCRT_bad_cast_vector_dtor # public: virtual void * __thiscall bad_cast::`vector deleting destructor'(unsigned int) -@ cdecl -arch=i386 -norelay ??_Ebad_typeid@@UAEPAXI@Z(long) MSVCRT_bad_typeid_vector_dtor # public: virtual void * __thiscall bad_typeid::`vector deleting destructor'(unsigned int) -@ cdecl -arch=i386 -norelay ??_Eexception@@UAEPAXI@Z(long) MSVCRT_exception_vector_dtor # public: virtual void * __thiscall exception::`vector deleting destructor'(unsigned int) -@ cdecl -arch=i386 -norelay ??_Fbad_cast@@QAEXXZ() MSVCRT_bad_cast_default_ctor # public: void __thiscall bad_cast::`default constructor closure'(void) -@ cdecl -arch=i386 -norelay ??_Fbad_typeid@@QAEXXZ() MSVCRT_bad_typeid_default_ctor # public: void __thiscall bad_typeid::`default constructor closure'(void) -@ cdecl -arch=i386 -norelay ??_G__non_rtti_object@@UAEPAXI@Z(long) MSVCRT___non_rtti_object_scalar_dtor # public: virtual void * __thiscall __non_rtti_object::`scalar deleting destructor'(unsigned int) -@ cdecl -arch=i386 -norelay ??_Gbad_cast@@UAEPAXI@Z(long) MSVCRT_bad_cast_scalar_dtor # public: virtual void * __thiscall bad_cast::`scalar deleting destructor'(unsigned int) -@ cdecl -arch=i386 -norelay ??_Gbad_typeid@@UAEPAXI@Z(long) MSVCRT_bad_typeid_scalar_dtor # public: virtual void * __thiscall bad_typeid::`scalar deleting destructor'(unsigned int) -@ cdecl -arch=i386 -norelay ??_Gexception@@UAEPAXI@Z(long) MSVCRT_exception_scalar_dtor # public: virtual void * __thiscall exception::`scalar deleting destructor'(unsigned int) -@ cdecl -arch=i386 ??_U@YAPAXI@Z(long) MSVCRT_operator_new # void * __cdecl operator new[](unsigned int) -;@ cdecl -arch=i386 ??_U@YAPAXIHPBDH@Z(long long str long) MSVCRT_operator_new_dbg # void * __cdecl operator new[](unsigned int,int,char const *,int) -@ cdecl -arch=i386 ??_V@YAXPAX@Z(ptr) MSVCRT_operator_delete # void __cdecl operator delete[](void *) -@ cdecl -arch=i386 -norelay __uncaught_exception(ptr) MSVCRT___uncaught_exception -@ cdecl -arch=i386 -norelay ?_query_new_handler@@YAP6AHI@ZXZ() MSVCRT__query_new_handler # int (__cdecl*__cdecl _query_new_handler(void))(unsigned int) -@ cdecl -arch=i386 ?_query_new_mode@@YAHXZ() MSVCRT__query_new_mode # int __cdecl _query_new_mode(void) -@ cdecl -arch=i386 -norelay ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z(ptr) MSVCRT__set_new_handler # int (__cdecl*__cdecl _set_new_handler(int (__cdecl*)(unsigned int)))(unsigned int) -@ cdecl -arch=i386 ?_set_new_mode@@YAHH@Z(long) MSVCRT__set_new_mode # int __cdecl _set_new_mode(int) -@ cdecl -arch=i386 -norelay ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) MSVCRT__set_se_translator # void (__cdecl*__cdecl _set_se_translator(void (__cdecl*)(unsigned int,struct _EXCEPTION_POINTERS *)))(unsigned int,struct _EXCEPTION_POINTERS *) -@ cdecl -arch=i386 -norelay ?before@type_info@@QBEHABV1@@Z(ptr) MSVCRT_type_info_before # public: int __thiscall type_info::before(class type_info const &)const -@ cdecl -arch=i386 -norelay ?name@type_info@@QBEPBDXZ() MSVCRT_type_info_name # public: char const * __thiscall type_info::name(void)const -@ cdecl -arch=i386 -norelay ?raw_name@type_info@@QBEPBDXZ() MSVCRT_type_info_raw_name # public: char const * __thiscall type_info::raw_name(void)const -@ cdecl -arch=i386 ?set_new_handler@@YAP6AXXZP6AXXZ@Z(ptr) MSVCRT_set_new_handler # void (__cdecl*__cdecl set_new_handler(void (__cdecl*)(void)))(void) -@ cdecl -arch=i386 ?set_terminate@@YAP6AXXZP6AXXZ@Z(ptr) MSVCRT_set_terminate # void (__cdecl*__cdecl set_terminate(void (__cdecl*)(void)))(void) -@ cdecl -arch=i386 ?set_unexpected@@YAP6AXXZP6AXXZ@Z(ptr) MSVCRT_set_unexpected # void (__cdecl*__cdecl set_unexpected(void (__cdecl*)(void)))(void) -@ cdecl -arch=i386 ?terminate@@YAXXZ() MSVCRT_terminate # void __cdecl terminate(void) -@ cdecl -arch=i386 ?unexpected@@YAXXZ() MSVCRT_unexpected # void __cdecl unexpected(void) -@ cdecl -arch=i386 -norelay ?what@exception@@UBEPBDXZ() MSVCRT_what_exception # public: virtual char const * __thiscall exception::what(void)const +@ cdecl -arch=i386 -norelay ??0__non_rtti_object@@QAE@ABV0@@Z(ptr) __non_rtti_object_copy_ctor # public: __thiscall __non_rtti_object::__non_rtti_object(class __non_rtti_object const &) +@ cdecl -arch=i386 -norelay ??0__non_rtti_object@@QAE@PBD@Z(ptr) __non_rtti_object_ctor # public: __thiscall __non_rtti_object::__non_rtti_object(char const *) +@ cdecl -arch=i386 -norelay ??0bad_cast@@AAE@PBQBD@Z(ptr) bad_cast_ctor # private: __thiscall bad_cast::bad_cast(char const * const *) +@ cdecl -arch=i386 -norelay ??0bad_cast@@QAE@ABQBD@Z(ptr) bad_cast_ctor # public: __thiscall bad_cast::bad_cast(char const * const &) +@ cdecl -arch=i386 -norelay ??0bad_cast@@QAE@ABV0@@Z(ptr) bad_cast_copy_ctor # public: __thiscall bad_cast::bad_cast(class bad_cast const &) +@ cdecl -arch=i386 -norelay ??0bad_cast@@QAE@PBD@Z(ptr) bad_cast_ctor_charptr # public: __thiscall bad_cast::bad_cast(char const *) +@ cdecl -arch=i386 -norelay ??0bad_typeid@@QAE@ABV0@@Z(ptr) bad_typeid_copy_ctor # public: __thiscall bad_typeid::bad_typeid(class bad_typeid const &) +@ cdecl -arch=i386 -norelay ??0bad_typeid@@QAE@PBD@Z(ptr) bad_typeid_ctor # public: __thiscall bad_typeid::bad_typeid(char const *) +@ cdecl -arch=i386 -norelay ??0exception@@QAE@ABQBD@Z(ptr) exception_ctor # public: __thiscall exception::exception(char const * const &) +@ cdecl -arch=i386 -norelay ??0exception@@QAE@ABQBDH@Z(ptr long) exception_ctor_noalloc # public: __thiscall exception::exception(char const * const &,int) +@ cdecl -arch=i386 -norelay ??0exception@@QAE@ABV0@@Z(ptr) exception_copy_ctor # public: __thiscall exception::exception(class exception const &) +@ cdecl -arch=i386 -norelay ??0exception@@QAE@XZ() exception_default_ctor # public: __thiscall exception::exception(void) +@ cdecl -arch=i386 -norelay ??1__non_rtti_object@@UAE@XZ() __non_rtti_object_dtor # public: virtual __thiscall __non_rtti_object::~__non_rtti_object(void) +@ cdecl -arch=i386 -norelay ??1bad_cast@@UAE@XZ() bad_cast_dtor # public: virtual __thiscall bad_cast::~bad_cast(void) +@ cdecl -arch=i386 -norelay ??1bad_typeid@@UAE@XZ() bad_typeid_dtor # public: virtual __thiscall bad_typeid::~bad_typeid(void) +@ cdecl -arch=i386 -norelay ??1exception@@UAE@XZ() exception_dtor # public: virtual __thiscall exception::~exception(void) +@ cdecl -arch=i386 -norelay ??1type_info@@UAE@XZ() type_info_dtor # public: virtual __thiscall type_info::~type_info(void) +@ cdecl -arch=i386 ??2@YAPAXI@Z(long) operator_new # void * __cdecl operator new(unsigned int) +;@ cdecl -arch=i386 ??2@YAPAXIHPBDH@Z(long long str long) operator_new_dbg # void * __cdecl operator new(unsigned int,int,char const *,int) +@ cdecl -arch=i386 ??3@YAXPAX@Z(ptr) operator_delete # void __cdecl operator delete(void *) +@ cdecl -arch=i386 -norelay ??4__non_rtti_object@@QAEAAV0@ABV0@@Z(ptr) __non_rtti_object_opequals # public: class __non_rtti_object & __thiscall __non_rtti_object::operator=(class __non_rtti_object const &) +@ cdecl -arch=i386 -norelay ??4bad_cast@@QAEAAV0@ABV0@@Z(ptr) bad_cast_opequals # public: class bad_cast & __thiscall bad_cast::operator=(class bad_cast const &) +@ cdecl -arch=i386 -norelay ??4bad_typeid@@QAEAAV0@ABV0@@Z(ptr) bad_typeid_opequals # public: class bad_typeid & __thiscall bad_typeid::operator=(class bad_typeid const &) +@ cdecl -arch=i386 -norelay ??4exception@@QAEAAV0@ABV0@@Z(ptr) exception_opequals # public: class exception & __thiscall exception::operator=(class exception const &) +@ cdecl -arch=i386 -norelay ??8type_info@@QBEHABV0@@Z(ptr) type_info_opequals_equals # public: int __thiscall type_info::operator==(class type_info const &)const +@ cdecl -arch=i386 -norelay ??9type_info@@QBEHABV0@@Z(ptr) type_info_opnot_equals # public: int __thiscall type_info::operator!=(class type_info const &)const +@ extern -arch=i386 ??_7__non_rtti_object@@6B@ __non_rtti_object_vtable # const __non_rtti_object::`vftable' +@ extern -arch=i386 ??_7bad_cast@@6B@ bad_cast_vtable # const bad_cast::`vftable' +@ extern -arch=i386 ??_7bad_typeid@@6B@ bad_typeid_vtable # const bad_typeid::`vftable' +@ extern -arch=i386 ??_7exception@@6B@ exception_vtable # const exception::`vftable' +@ cdecl -arch=i386 -norelay ??_E__non_rtti_object@@UAEPAXI@Z(long) __non_rtti_object_vector_dtor # public: virtual void * __thiscall __non_rtti_object::`vector deleting destructor'(unsigned int) +@ cdecl -arch=i386 -norelay ??_Ebad_cast@@UAEPAXI@Z(long) bad_cast_vector_dtor # public: virtual void * __thiscall bad_cast::`vector deleting destructor'(unsigned int) +@ cdecl -arch=i386 -norelay ??_Ebad_typeid@@UAEPAXI@Z(long) bad_typeid_vector_dtor # public: virtual void * __thiscall bad_typeid::`vector deleting destructor'(unsigned int) +@ cdecl -arch=i386 -norelay ??_Eexception@@UAEPAXI@Z(long) exception_vector_dtor # public: virtual void * __thiscall exception::`vector deleting destructor'(unsigned int) +@ cdecl -arch=i386 -norelay ??_Fbad_cast@@QAEXXZ() bad_cast_default_ctor # public: void __thiscall bad_cast::`default constructor closure'(void) +@ cdecl -arch=i386 -norelay ??_Fbad_typeid@@QAEXXZ() bad_typeid_default_ctor # public: void __thiscall bad_typeid::`default constructor closure'(void) +@ cdecl -arch=i386 -norelay ??_G__non_rtti_object@@UAEPAXI@Z(long) __non_rtti_object_scalar_dtor # public: virtual void * __thiscall __non_rtti_object::`scalar deleting destructor'(unsigned int) +@ cdecl -arch=i386 -norelay ??_Gbad_cast@@UAEPAXI@Z(long) bad_cast_scalar_dtor # public: virtual void * __thiscall bad_cast::`scalar deleting destructor'(unsigned int) +@ cdecl -arch=i386 -norelay ??_Gbad_typeid@@UAEPAXI@Z(long) bad_typeid_scalar_dtor # public: virtual void * __thiscall bad_typeid::`scalar deleting destructor'(unsigned int) +@ cdecl -arch=i386 -norelay ??_Gexception@@UAEPAXI@Z(long) exception_scalar_dtor # public: virtual void * __thiscall exception::`scalar deleting destructor'(unsigned int) +@ cdecl -arch=i386 ??_U@YAPAXI@Z(long) operator_new # void * __cdecl operator new[](unsigned int) +;@ cdecl -arch=i386 ??_U@YAPAXIHPBDH@Z(long long str long) operator_new_dbg # void * __cdecl operator new[](unsigned int,int,char const *,int) +@ cdecl -arch=i386 ??_V@YAXPAX@Z(ptr) operator_delete # void __cdecl operator delete[](void *) +@ cdecl -arch=i386 -norelay __uncaught_exception(ptr) __uncaught_exception +@ cdecl -arch=i386 -norelay ?_query_new_handler@@YAP6AHI@ZXZ() _query_new_handler # int (__cdecl*__cdecl _query_new_handler(void))(unsigned int) +@ cdecl -arch=i386 ?_query_new_mode@@YAHXZ() _query_new_mode # int __cdecl _query_new_mode(void) +@ cdecl -arch=i386 -norelay ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z(ptr) _set_new_handler # int (__cdecl*__cdecl _set_new_handler(int (__cdecl*)(unsigned int)))(unsigned int) +@ cdecl -arch=i386 ?_set_new_mode@@YAHH@Z(long) _set_new_mode # int __cdecl _set_new_mode(int) +@ cdecl -arch=i386 -norelay ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) _set_se_translator # void (__cdecl*__cdecl _set_se_translator(void (__cdecl*)(unsigned int,struct _EXCEPTION_POINTERS *)))(unsigned int,struct _EXCEPTION_POINTERS *) +@ cdecl -arch=i386 -norelay ?before@type_info@@QBEHABV1@@Z(ptr) type_info_before # public: int __thiscall type_info::before(class type_info const &)const +@ cdecl -arch=i386 -norelay ?name@type_info@@QBEPBDXZ() type_info_name # public: char const * __thiscall type_info::name(void)const +@ cdecl -arch=i386 -norelay ?raw_name@type_info@@QBEPBDXZ() type_info_raw_name # public: char const * __thiscall type_info::raw_name(void)const +@ cdecl -arch=i386 ?set_new_handler@@YAP6AXXZP6AXXZ@Z(ptr) set_new_handler # void (__cdecl*__cdecl set_new_handler(void (__cdecl*)(void)))(void) +@ cdecl -arch=i386 ?set_terminate@@YAP6AXXZP6AXXZ@Z(ptr) set_terminate # void (__cdecl*__cdecl set_terminate(void (__cdecl*)(void)))(void) +@ cdecl -arch=i386 ?set_unexpected@@YAP6AXXZP6AXXZ@Z(ptr) set_unexpected # void (__cdecl*__cdecl set_unexpected(void (__cdecl*)(void)))(void) +@ cdecl -arch=i386 ?terminate@@YAXXZ() terminate # void __cdecl terminate(void) +@ cdecl -arch=i386 ?unexpected@@YAXXZ() unexpected # void __cdecl unexpected(void) +@ cdecl -arch=i386 -norelay ?what@exception@@UBEPBDXZ() exception_what # public: virtual char const * __thiscall exception::what(void)const # **************** win64 C++ functions **************** -@ cdecl -arch=win64 ??0__non_rtti_object@@QEAA@AEBV0@@Z(ptr) MSVCRT___non_rtti_object_copy_ctor # public: __cdecl __non_rtti_object::__non_rtti_object(class __non_rtti_object const & __ptr64) __ptr64 -@ cdecl -arch=win64 ??0__non_rtti_object@@QEAA@PEBD@Z(ptr) MSVCRT___non_rtti_object_ctor # public: __cdecl __non_rtti_object::__non_rtti_object(char const * __ptr64) __ptr64 -@ cdecl -arch=win64 ??0bad_cast@@AAE@PBQBD@Z(ptr) MSVCRT_bad_cast_ctor # private: __thiscall bad_cast::bad_cast(char const near * const near *) -@ cdecl -arch=win64 ??0bad_cast@@AEAA@PEBQEBD@Z(ptr) MSVCRT_bad_cast_ctor # private: __cdecl bad_cast::bad_cast(char const * __ptr64 const * __ptr64) __ptr64 -@ cdecl -arch=win64 ??0bad_cast@@QAE@ABQBD@Z(ptr) MSVCRT_bad_cast_ctor # public: __thiscall bad_cast::bad_cast(char const near * const near &) -@ cdecl -arch=win64 ??0bad_cast@@QEAA@AEBQEBD@Z(ptr) MSVCRT_bad_cast_ctor # public: __cdecl bad_cast::bad_cast(char const * __ptr64 const & __ptr64) __ptr64 -@ cdecl -arch=win64 ??0bad_cast@@QEAA@AEBV0@@Z(ptr) MSVCRT_bad_cast_copy_ctor # public: __cdecl bad_cast::bad_cast(class bad_cast const & __ptr64) __ptr64 -@ cdecl -arch=win64 ??0bad_cast@@QEAA@PEBD@Z(ptr) MSVCRT_bad_cast_ctor_charptr # public: __cdecl bad_cast::bad_cast(char const * __ptr64) __ptr64 -@ cdecl -arch=win64 ??0bad_typeid@@QEAA@AEBV0@@Z(ptr) MSVCRT_bad_typeid_copy_ctor # public: __cdecl bad_typeid::bad_typeid(class bad_typeid const & __ptr64) __ptr64 -@ cdecl -arch=win64 ??0bad_typeid@@QEAA@PEBD@Z(ptr) MSVCRT_bad_typeid_ctor # public: __cdecl bad_typeid::bad_typeid(char const * __ptr64) __ptr64 -@ cdecl -arch=win64 ??0exception@@QEAA@AEBQEBD@Z(ptr) MSVCRT_exception_ctor # public: __cdecl exception::exception(char const * __ptr64 const & __ptr64) __ptr64 -@ cdecl -arch=win64 ??0exception@@QEAA@AEBQEBDH@Z(ptr long) MSVCRT_exception_ctor_noalloc # public: __cdecl exception::exception(char const * __ptr64 const & __ptr64,int) __ptr64 -@ cdecl -arch=win64 ??0exception@@QEAA@AEBV0@@Z(ptr) MSVCRT_exception_copy_ctor # public: __cdecl exception::exception(class exception const & __ptr64) __ptr64 -@ cdecl -arch=win64 ??0exception@@QEAA@XZ() MSVCRT_exception_default_ctor # public: __cdecl exception::exception(void) __ptr64 -@ cdecl -arch=win64 ??1__non_rtti_object@@UEAA@XZ() MSVCRT___non_rtti_object_dtor # public: virtual __cdecl __non_rtti_object::~__non_rtti_object(void) __ptr64 -@ cdecl -arch=win64 ??1bad_cast@@UEAA@XZ() MSVCRT_bad_cast_dtor # public: virtual __cdecl bad_cast::~bad_cast(void) __ptr64 -@ cdecl -arch=win64 ??1bad_typeid@@UEAA@XZ() MSVCRT_bad_typeid_dtor # public: virtual __cdecl bad_typeid::~bad_typeid(void) __ptr64 -@ cdecl -arch=win64 ??1exception@@UEAA@XZ() MSVCRT_exception_dtor # public: virtual __cdecl exception::~exception(void) __ptr64 -@ cdecl -arch=win64 ??1type_info@@UEAA@XZ() MSVCRT_type_info_dtor # public: virtual __cdecl type_info::~type_info(void) __ptr64 -@ cdecl -arch=win64 ??2@YAPEAX_K@Z(double) MSVCRT_operator_new # void * __ptr64 __cdecl operator new(unsigned __int64) -@ cdecl -arch=win64 ??2@YAPEAX_KHPEBDH@Z(int64 long str long) MSVCRT_operator_new_dbg # void * __ptr64 __cdecl operator new(unsigned __int64,int,char const * __ptr64,int) -@ cdecl -arch=win64 ??3@YAXPEAX@Z(ptr) MSVCRT_operator_delete # void __cdecl operator delete(void * __ptr64) -@ cdecl -arch=win64 ??4__non_rtti_object@@QEAAAEAV0@AEBV0@@Z(ptr) MSVCRT___non_rtti_object_opequals # public: class __non_rtti_object & __ptr64 __cdecl __non_rtti_object::operator=(class __non_rtti_object const & __ptr64) __ptr64 -@ cdecl -arch=win64 ??4bad_cast@@QEAAAEAV0@AEBV0@@Z(ptr) MSVCRT_bad_cast_opequals # public: class bad_cast & __ptr64 __cdecl bad_cast::operator=(class bad_cast const & __ptr64) __ptr64 -@ cdecl -arch=win64 ??4bad_typeid@@QEAAAEAV0@AEBV0@@Z(ptr) MSVCRT_bad_typeid_opequals # public: class bad_typeid & __ptr64 __cdecl bad_typeid::operator=(class bad_typeid const & __ptr64) __ptr64 -@ cdecl -arch=win64 ??4exception@@QEAAAEAV0@AEBV0@@Z(ptr) MSVCRT_exception_opequals # public: class exception & __ptr64 __cdecl exception::operator=(class exception const & __ptr64) __ptr64 -@ cdecl -arch=win64 ??8type_info@@QEBAHAEBV0@@Z(ptr) MSVCRT_type_info_opequals_equals # public: int __cdecl type_info::operator==(class type_info const & __ptr64)const __ptr64 -@ cdecl -arch=win64 ??9type_info@@QEBAHAEBV0@@Z(ptr) MSVCRT_type_info_opnot_equals # public: int __cdecl type_info::operator!=(class type_info const & __ptr64)const __ptr64 -@ extern -arch=win64 ??_7__non_rtti_object@@6B@ MSVCRT___non_rtti_object_vtable # const __non_rtti_object::`vftable' -@ extern -arch=win64 ??_7bad_cast@@6B@ MSVCRT_bad_cast_vtable # const bad_cast::`vftable' -@ extern -arch=win64 ??_7bad_typeid@@6B@ MSVCRT_bad_typeid_vtable # const bad_typeid::`vftable' -@ extern -arch=win64 ??_7exception@@6B@ MSVCRT_exception_vtable # const exception::`vftable' -@ cdecl -arch=win64 ??_Fbad_cast@@QEAAXXZ() MSVCRT_bad_cast_default_ctor # public: void __cdecl bad_cast::`default constructor closure'(void) __ptr64 -@ cdecl -arch=win64 ??_Fbad_typeid@@QEAAXXZ() MSVCRT_bad_typeid_default_ctor # public: void __cdecl bad_typeid::`default constructor closure'(void) __ptr64 -@ cdecl -arch=win64 ??_U@YAPEAX_K@Z(long) MSVCRT_operator_new # void * __ptr64 __cdecl operator new[](unsigned __int64) -@ cdecl -arch=win64 ??_U@YAPEAX_KHPEBDH@Z(int64 long str long) MSVCRT_operator_new_dbg # void * __ptr64 __cdecl operator new[](unsigned __int64,int,char const * __ptr64,int) -@ cdecl -arch=win64 ??_V@YAXPEAX@Z(ptr) MSVCRT_operator_delete # void __cdecl operator delete[](void * __ptr64) -@ cdecl -arch=win64 __uncaught_exception(ptr) MSVCRT___uncaught_exception -@ cdecl -arch=win64 ?_query_new_handler@@YAP6AH_K@ZXZ() MSVCRT__query_new_handler # int (__cdecl*__cdecl _query_new_handler(void))(unsigned __int64) -@ cdecl -arch=win64 ?_query_new_mode@@YAHXZ() MSVCRT__query_new_mode # int __cdecl _query_new_mode(void) -@ cdecl -arch=win64 ?_set_new_handler@@YAP6AH_K@ZP6AH0@Z@Z(ptr) MSVCRT__set_new_handler # int (__cdecl*__cdecl _set_new_handler(int (__cdecl*)(unsigned __int64)))(unsigned __int64) -@ cdecl -arch=win64 ?_set_new_mode@@YAHH@Z(long) MSVCRT__set_new_mode # int __cdecl _set_new_mode(int) -@ cdecl -arch=win64 ?_set_se_translator@@YAP6AXIPEAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) MSVCRT__set_se_translator # void (__cdecl*__cdecl _set_se_translator(void (__cdecl*)(unsigned int,struct _EXCEPTION_POINTERS * __ptr64)))(unsigned int,struct _EXCEPTION_POINTERS * __ptr64) -@ cdecl -arch=win64 ?before@type_info@@QEBAHAEBV1@@Z(ptr) MSVCRT_type_info_before # public: int __cdecl type_info::before(class type_info const & __ptr64)const __ptr64 -@ cdecl -arch=win64 ?name@type_info@@QEBAPEBDXZ() MSVCRT_type_info_name # public: char const * __ptr64 __cdecl type_info::name(void)const __ptr64 -@ cdecl -arch=win64 ?raw_name@type_info@@QEBAPEBDXZ() MSVCRT_type_info_raw_name # public: char const * __ptr64 __cdecl type_info::raw_name(void)const __ptr64 -@ cdecl -arch=win64 ?set_new_handler@@YAP6AXXZP6AXXZ@Z(ptr) MSVCRT_set_new_handler # void (__cdecl*__cdecl set_new_handler(void (__cdecl*)(void)))(void) -@ cdecl -arch=win64 ?set_terminate@@YAP6AXXZP6AXXZ@Z(ptr) MSVCRT_set_terminate # void (__cdecl*__cdecl set_terminate(void (__cdecl*)(void)))(void) -@ cdecl -arch=win64 ?set_unexpected@@YAP6AXXZP6AXXZ@Z(ptr) MSVCRT_set_unexpected # void (__cdecl*__cdecl set_unexpected(void (__cdecl*)(void)))(void) -@ cdecl -arch=win64 ?terminate@@YAXXZ() MSVCRT_terminate # void __cdecl terminate(void) -@ cdecl -arch=win64 ?unexpected@@YAXXZ() MSVCRT_unexpected # void __cdecl unexpected(void) -@ cdecl -arch=win64 ?what@exception@@UEBAPEBDXZ() MSVCRT_what_exception # public: virtual char const * __ptr64 __cdecl exception::what(void)const __ptr64 +@ cdecl -arch=win64 ??0__non_rtti_object@@QEAA@AEBV0@@Z(ptr) __non_rtti_object_copy_ctor # public: __cdecl __non_rtti_object::__non_rtti_object(class __non_rtti_object const & __ptr64) __ptr64 +@ cdecl -arch=win64 ??0__non_rtti_object@@QEAA@PEBD@Z(ptr) __non_rtti_object_ctor # public: __cdecl __non_rtti_object::__non_rtti_object(char const * __ptr64) __ptr64 +@ cdecl -arch=win64 ??0bad_cast@@AAE@PBQBD@Z(ptr) bad_cast_ctor # private: __thiscall bad_cast::bad_cast(char const near * const near *) +@ cdecl -arch=win64 ??0bad_cast@@AEAA@PEBQEBD@Z(ptr) bad_cast_ctor # private: __cdecl bad_cast::bad_cast(char const * __ptr64 const * __ptr64) __ptr64 +@ cdecl -arch=win64 ??0bad_cast@@QAE@ABQBD@Z(ptr) bad_cast_ctor # public: __thiscall bad_cast::bad_cast(char const near * const near &) +@ cdecl -arch=win64 ??0bad_cast@@QEAA@AEBQEBD@Z(ptr) bad_cast_ctor # public: __cdecl bad_cast::bad_cast(char const * __ptr64 const & __ptr64) __ptr64 +@ cdecl -arch=win64 ??0bad_cast@@QEAA@AEBV0@@Z(ptr) bad_cast_copy_ctor # public: __cdecl bad_cast::bad_cast(class bad_cast const & __ptr64) __ptr64 +@ cdecl -arch=win64 ??0bad_cast@@QEAA@PEBD@Z(ptr) bad_cast_ctor_charptr # public: __cdecl bad_cast::bad_cast(char const * __ptr64) __ptr64 +@ cdecl -arch=win64 ??0bad_typeid@@QEAA@AEBV0@@Z(ptr) bad_typeid_copy_ctor # public: __cdecl bad_typeid::bad_typeid(class bad_typeid const & __ptr64) __ptr64 +@ cdecl -arch=win64 ??0bad_typeid@@QEAA@PEBD@Z(ptr) bad_typeid_ctor # public: __cdecl bad_typeid::bad_typeid(char const * __ptr64) __ptr64 +@ cdecl -arch=win64 ??0exception@@QEAA@AEBQEBD@Z(ptr) exception_ctor # public: __cdecl exception::exception(char const * __ptr64 const & __ptr64) __ptr64 +@ cdecl -arch=win64 ??0exception@@QEAA@AEBQEBDH@Z(ptr long) exception_ctor_noalloc # public: __cdecl exception::exception(char const * __ptr64 const & __ptr64,int) __ptr64 +@ cdecl -arch=win64 ??0exception@@QEAA@AEBV0@@Z(ptr) exception_copy_ctor # public: __cdecl exception::exception(class exception const & __ptr64) __ptr64 +@ cdecl -arch=win64 ??0exception@@QEAA@XZ() exception_default_ctor # public: __cdecl exception::exception(void) __ptr64 +@ cdecl -arch=win64 ??1__non_rtti_object@@UEAA@XZ() __non_rtti_object_dtor # public: virtual __cdecl __non_rtti_object::~__non_rtti_object(void) __ptr64 +@ cdecl -arch=win64 ??1bad_cast@@UEAA@XZ() bad_cast_dtor # public: virtual __cdecl bad_cast::~bad_cast(void) __ptr64 +@ cdecl -arch=win64 ??1bad_typeid@@UEAA@XZ() bad_typeid_dtor # public: virtual __cdecl bad_typeid::~bad_typeid(void) __ptr64 +@ cdecl -arch=win64 ??1exception@@UEAA@XZ() exception_dtor # public: virtual __cdecl exception::~exception(void) __ptr64 +@ cdecl -arch=win64 ??1type_info@@UEAA@XZ() type_info_dtor # public: virtual __cdecl type_info::~type_info(void) __ptr64 +@ cdecl -arch=win64 ??2@YAPEAX_K@Z(double) operator_new # void * __ptr64 __cdecl operator new(unsigned __int64) +@ cdecl -arch=win64 ??2@YAPEAX_KHPEBDH@Z(int64 long str long) operator_new_dbg # void * __ptr64 __cdecl operator new(unsigned __int64,int,char const * __ptr64,int) +@ cdecl -arch=win64 ??3@YAXPEAX@Z(ptr) operator_delete # void __cdecl operator delete(void * __ptr64) +@ cdecl -arch=win64 ??4__non_rtti_object@@QEAAAEAV0@AEBV0@@Z(ptr) __non_rtti_object_opequals # public: class __non_rtti_object & __ptr64 __cdecl __non_rtti_object::operator=(class __non_rtti_object const & __ptr64) __ptr64 +@ cdecl -arch=win64 ??4bad_cast@@QEAAAEAV0@AEBV0@@Z(ptr) bad_cast_opequals # public: class bad_cast & __ptr64 __cdecl bad_cast::operator=(class bad_cast const & __ptr64) __ptr64 +@ cdecl -arch=win64 ??4bad_typeid@@QEAAAEAV0@AEBV0@@Z(ptr) bad_typeid_opequals # public: class bad_typeid & __ptr64 __cdecl bad_typeid::operator=(class bad_typeid const & __ptr64) __ptr64 +@ cdecl -arch=win64 ??4exception@@QEAAAEAV0@AEBV0@@Z(ptr) exception_opequals # public: class exception & __ptr64 __cdecl exception::operator=(class exception const & __ptr64) __ptr64 +@ cdecl -arch=win64 ??8type_info@@QEBAHAEBV0@@Z(ptr) type_info_opequals_equals # public: int __cdecl type_info::operator==(class type_info const & __ptr64)const __ptr64 +@ cdecl -arch=win64 ??9type_info@@QEBAHAEBV0@@Z(ptr) type_info_opnot_equals # public: int __cdecl type_info::operator!=(class type_info const & __ptr64)const __ptr64 +@ extern -arch=win64 ??_7__non_rtti_object@@6B@ __non_rtti_object_vtable # const __non_rtti_object::`vftable' +@ extern -arch=win64 ??_7bad_cast@@6B@ bad_cast_vtable # const bad_cast::`vftable' +@ extern -arch=win64 ??_7bad_typeid@@6B@ bad_typeid_vtable # const bad_typeid::`vftable' +@ extern -arch=win64 ??_7exception@@6B@ exception_vtable # const exception::`vftable' +@ cdecl -arch=win64 ??_Fbad_cast@@QEAAXXZ() bad_cast_default_ctor # public: void __cdecl bad_cast::`default constructor closure'(void) __ptr64 +@ cdecl -arch=win64 ??_Fbad_typeid@@QEAAXXZ() bad_typeid_default_ctor # public: void __cdecl bad_typeid::`default constructor closure'(void) __ptr64 +@ cdecl -arch=win64 ??_U@YAPEAX_K@Z(long) operator_new # void * __ptr64 __cdecl operator new[](unsigned __int64) +@ cdecl -arch=win64 ??_U@YAPEAX_KHPEBDH@Z(int64 long str long) operator_new_dbg # void * __ptr64 __cdecl operator new[](unsigned __int64,int,char const * __ptr64,int) +@ cdecl -arch=win64 ??_V@YAXPEAX@Z(ptr) operator_delete # void __cdecl operator delete[](void * __ptr64) +@ cdecl -arch=win64 __uncaught_exception(ptr) __uncaught_exception +@ cdecl -arch=win64 ?_query_new_handler@@YAP6AH_K@ZXZ() _query_new_handler # int (__cdecl*__cdecl _query_new_handler(void))(unsigned __int64) +@ cdecl -arch=win64 ?_query_new_mode@@YAHXZ() _query_new_mode # int __cdecl _query_new_mode(void) +@ cdecl -arch=win64 ?_set_new_handler@@YAP6AH_K@ZP6AH0@Z@Z(ptr) _set_new_handler # int (__cdecl*__cdecl _set_new_handler(int (__cdecl*)(unsigned __int64)))(unsigned __int64) +@ cdecl -arch=win64 ?_set_new_mode@@YAHH@Z(long) _set_new_mode # int __cdecl _set_new_mode(int) +@ cdecl -arch=win64 ?_set_se_translator@@YAP6AXIPEAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) _set_se_translator # void (__cdecl*__cdecl _set_se_translator(void (__cdecl*)(unsigned int,struct _EXCEPTION_POINTERS * __ptr64)))(unsigned int,struct _EXCEPTION_POINTERS * __ptr64) +@ cdecl -arch=win64 ?before@type_info@@QEBAHAEBV1@@Z(ptr) type_info_before # public: int __cdecl type_info::before(class type_info const & __ptr64)const __ptr64 +@ cdecl -arch=win64 ?name@type_info@@QEBAPEBDXZ() type_info_name # public: char const * __ptr64 __cdecl type_info::name(void)const __ptr64 +@ cdecl -arch=win64 ?raw_name@type_info@@QEBAPEBDXZ() type_info_raw_name # public: char const * __ptr64 __cdecl type_info::raw_name(void)const __ptr64 +@ cdecl -arch=win64 ?set_new_handler@@YAP6AXXZP6AXXZ@Z(ptr) set_new_handler # void (__cdecl*__cdecl set_new_handler(void (__cdecl*)(void)))(void) +@ cdecl -arch=win64 ?set_terminate@@YAP6AXXZP6AXXZ@Z(ptr) set_terminate # void (__cdecl*__cdecl set_terminate(void (__cdecl*)(void)))(void) +@ cdecl -arch=win64 ?set_unexpected@@YAP6AXXZP6AXXZ@Z(ptr) set_unexpected # void (__cdecl*__cdecl set_unexpected(void (__cdecl*)(void)))(void) +@ cdecl -arch=win64 ?terminate@@YAXXZ() terminate # void __cdecl terminate(void) +@ cdecl -arch=win64 ?unexpected@@YAXXZ() unexpected # void __cdecl unexpected(void) +@ cdecl -arch=win64 ?what@exception@@UEBAPEBDXZ() exception_what # public: virtual char const * __ptr64 __cdecl exception::what(void)const __ptr64 # **************** ARM C++ functions **************** -@ cdecl -arch=arm ??0__non_rtti_object@@QAA@ABV0@@Z() MSVCRT___non_rtti_object_copy_ctor # public: __cdecl __non_rtti_object::__non_rtti_object(class __non_rtti_object const &) -@ cdecl -arch=arm ??0__non_rtti_object@@QAA@PBD@Z() MSVCRT___non_rtti_object_ctor #public: __cdecl __non_rtti_object::__non_rtti_object(char const *) -@ cdecl -arch=arm ??0bad_cast@@AAA@PBQBD@Z() MSVCRT_bad_cast_ctor # private: __cdecl bad_cast::bad_cast(char const * const *) -@ cdecl -arch=arm ??0bad_cast@@QAA@ABV0@@Z() MSVCRT_bad_cast_copy_ctor # public: __cdecl bad_cast::bad_cast(class bad_cast const &) -@ cdecl -arch=arm ??0bad_cast@@QAA@PBD@Z() MSVCRT_bad_cast_ctor # public: __cdecl bad_cast::bad_cast(char const *) -@ cdecl -arch=arm ??0bad_typeid@@QAA@ABV0@@Z() MSVCRT_bad_typeid_copy_ctor # public: __cdecl bad_typeid::bad_typeid(class bad_typeid const &) -@ cdecl -arch=arm ??0bad_typeid@@QAA@PBD@Z() MSVCRT_bad_typeid_ctor # public: __cdecl bad_typeid::bad_typeid(char const *) -@ cdecl -arch=arm ??0exception@@QAA@ABQBD@Z() MSVCRT_exception_ctor # public: __cdecl exception::exception(char const * const &) -@ cdecl -arch=arm ??0exception@@QAA@ABQBDH@Z() MSVCRT_exception_ctor_noalloc # public: __cdecl exception::exception(char const * const &,int) -@ cdecl -arch=arm ??0exception@@QAA@ABV0@@Z() MSVCRT_exception_copy_ctor # public: __cdecl exception::exception(class exception const &) -@ cdecl -arch=arm ??0exception@@QAA@XZ() MSVCRT_exception_default_ctor # public: __cdecl exception::exception(void) -@ cdecl -arch=arm ??1__non_rtti_object@@UAA@XZ() MSVCRT___non_rtti_object_dtor # public: virtual __cdecl __non_rtti_object::~__non_rtti_object(void) -@ cdecl -arch=arm ??1bad_cast@@UAA@XZ() MSVCRT_bad_cast_dtor # public: virtual __cdecl bad_cast::~bad_cast(void) -@ cdecl -arch=arm ??1bad_typeid@@UAA@XZ() MSVCRT_bad_typeid_dtor # public: virtual __cdecl bad_typeid::~bad_typeid(void) -@ cdecl -arch=arm ??1exception@@UAA@XZ() MSVCRT_exception_dtor # public: virtual __cdecl exception::~exception(void) -@ cdecl -arch=arm ??1type_info@@UAA@XZ() MSVCRT_type_info_dtor # public: virtual __cdecl type_info::~type_info(void) -@ cdecl -arch=arm ??2@YAPAXI@Z() MSVCRT_operator_new # void * __cdecl operator new(unsigned int) -@ cdecl -arch=arm ??2@YAPAXIHPBDH@Z() MSVCRT_operator_new_dbg # void * __cdecl operator new(unsigned int,int,char const *,int) -@ cdecl -arch=arm ??3@YAXPAX@Z() MSVCRT_operator_delete # void __cdecl operator delete(void *) -@ cdecl -arch=arm ??4__non_rtti_object@@QAAAAV0@ABV0@@Z() MSVCRT___non_rtti_object_opequals # public: class __non_rtti_object & __cdecl __non_rtti_object::operator=(class __non_rtti_object const &) -@ cdecl -arch=arm ??4bad_cast@@QAAAAV0@ABV0@@Z() MSVCRT_bad_cast_opequals # public: class bad_cast & __cdecl bad_cast::operator=(class bad_cast const &) -@ cdecl -arch=arm ??4bad_typeid@@QAAAAV0@ABV0@@Z() MSVCRT_bad_typeid_opequals # public: class bad_typeid & __cdecl bad_typeid::operator=(class bad_typeid const &) -@ cdecl -arch=arm ??4exception@@QAAAAV0@ABV0@@Z() MSVCRT_exception_opequals # public: class exception & __cdecl exception::operator=(class exception const &) -@ cdecl -arch=arm ??8type_info@@QBAHABV0@@Z() MSVCRT_type_info_opequals_equals # public: int __cdecl type_info::operator==(class type_info const &)const -@ cdecl -arch=arm ??9type_info@@QBAHABV0@@Z() MSVCRT_type_info_opnot_equals # public: int __cdecl type_info::operator!=(class type_info const &)const -@ extern -arch=arm ??_7__non_rtti_object@@6B@ MSVCRT___non_rtti_object_vtable # const __non_rtti_object::`vftable' -@ extern -arch=arm ??_7bad_cast@@6B@ MSVCRT_bad_cast_vtable # const bad_cast::`vftable' -@ extern -arch=arm ??_7bad_typeid@@6B@ MSVCRT_bad_typeid_vtable # const bad_typeid::`vftable' -@ extern -arch=arm ??_7exception@@6B@ MSVCRT_exception_vtable # const exception::`vftable' -@ cdecl -arch=arm ??_Fbad_cast@@QAAXXZ() MSVCRT_bad_cast_default_ctor # public: void __cdecl bad_cast::`default constructor closure'(void) -@ cdecl -arch=arm ??_Fbad_typeid@@QAAXXZ() MSVCRT_bad_typeid_default_ctor # public: void __cdecl bad_typeid::`default constructor closure'(void) -@ cdecl -arch=arm ??_U@YAPAXI@Z() MSVCRT_operator_new # void * __cdecl operator new[](unsigned int) -@ cdecl -arch=arm ??_U@YAPAXIHPBDH@Z() MSVCRT_operator_new_dbg # void * __cdecl operator new[](unsigned int,int,char const *,int) -@ cdecl -arch=arm ??_V@YAXPAX@Z() MSVCRT_operator_delete # void __cdecl operator delete[](void *) +@ cdecl -arch=arm ??0__non_rtti_object@@QAA@ABV0@@Z() __non_rtti_object_copy_ctor # public: __cdecl __non_rtti_object::__non_rtti_object(class __non_rtti_object const &) +@ cdecl -arch=arm ??0__non_rtti_object@@QAA@PBD@Z() __non_rtti_object_ctor #public: __cdecl __non_rtti_object::__non_rtti_object(char const *) +@ cdecl -arch=arm ??0bad_cast@@AAA@PBQBD@Z() bad_cast_ctor # private: __cdecl bad_cast::bad_cast(char const * const *) +@ cdecl -arch=arm ??0bad_cast@@QAA@ABV0@@Z() bad_cast_copy_ctor # public: __cdecl bad_cast::bad_cast(class bad_cast const &) +@ cdecl -arch=arm ??0bad_cast@@QAA@PBD@Z() bad_cast_ctor # public: __cdecl bad_cast::bad_cast(char const *) +@ cdecl -arch=arm ??0bad_typeid@@QAA@ABV0@@Z() bad_typeid_copy_ctor # public: __cdecl bad_typeid::bad_typeid(class bad_typeid const &) +@ cdecl -arch=arm ??0bad_typeid@@QAA@PBD@Z() bad_typeid_ctor # public: __cdecl bad_typeid::bad_typeid(char const *) +@ cdecl -arch=arm ??0exception@@QAA@ABQBD@Z() exception_ctor # public: __cdecl exception::exception(char const * const &) +@ cdecl -arch=arm ??0exception@@QAA@ABQBDH@Z() exception_ctor_noalloc # public: __cdecl exception::exception(char const * const &,int) +@ cdecl -arch=arm ??0exception@@QAA@ABV0@@Z() exception_copy_ctor # public: __cdecl exception::exception(class exception const &) +@ cdecl -arch=arm ??0exception@@QAA@XZ() exception_default_ctor # public: __cdecl exception::exception(void) +@ cdecl -arch=arm ??1__non_rtti_object@@UAA@XZ() __non_rtti_object_dtor # public: virtual __cdecl __non_rtti_object::~__non_rtti_object(void) +@ cdecl -arch=arm ??1bad_cast@@UAA@XZ() bad_cast_dtor # public: virtual __cdecl bad_cast::~bad_cast(void) +@ cdecl -arch=arm ??1bad_typeid@@UAA@XZ() bad_typeid_dtor # public: virtual __cdecl bad_typeid::~bad_typeid(void) +@ cdecl -arch=arm ??1exception@@UAA@XZ() exception_dtor # public: virtual __cdecl exception::~exception(void) +@ cdecl -arch=arm ??1type_info@@UAA@XZ() type_info_dtor # public: virtual __cdecl type_info::~type_info(void) +@ cdecl -arch=arm ??2@YAPAXI@Z() operator_new # void * __cdecl operator new(unsigned int) +@ cdecl -arch=arm ??2@YAPAXIHPBDH@Z() operator_new_dbg # void * __cdecl operator new(unsigned int,int,char const *,int) +@ cdecl -arch=arm ??3@YAXPAX@Z() operator_delete # void __cdecl operator delete(void *) +@ cdecl -arch=arm ??4__non_rtti_object@@QAAAAV0@ABV0@@Z() __non_rtti_object_opequals # public: class __non_rtti_object & __cdecl __non_rtti_object::operator=(class __non_rtti_object const &) +@ cdecl -arch=arm ??4bad_cast@@QAAAAV0@ABV0@@Z() bad_cast_opequals # public: class bad_cast & __cdecl bad_cast::operator=(class bad_cast const &) +@ cdecl -arch=arm ??4bad_typeid@@QAAAAV0@ABV0@@Z() bad_typeid_opequals # public: class bad_typeid & __cdecl bad_typeid::operator=(class bad_typeid const &) +@ cdecl -arch=arm ??4exception@@QAAAAV0@ABV0@@Z() exception_opequals # public: class exception & __cdecl exception::operator=(class exception const &) +@ cdecl -arch=arm ??8type_info@@QBAHABV0@@Z() type_info_opequals_equals # public: int __cdecl type_info::operator==(class type_info const &)const +@ cdecl -arch=arm ??9type_info@@QBAHABV0@@Z() type_info_opnot_equals # public: int __cdecl type_info::operator!=(class type_info const &)const +@ extern -arch=arm ??_7__non_rtti_object@@6B@ __non_rtti_object_vtable # const __non_rtti_object::`vftable' +@ extern -arch=arm ??_7bad_cast@@6B@ bad_cast_vtable # const bad_cast::`vftable' +@ extern -arch=arm ??_7bad_typeid@@6B@ bad_typeid_vtable # const bad_typeid::`vftable' +@ extern -arch=arm ??_7exception@@6B@ exception_vtable # const exception::`vftable' +@ cdecl -arch=arm ??_Fbad_cast@@QAAXXZ() bad_cast_default_ctor # public: void __cdecl bad_cast::`default constructor closure'(void) +@ cdecl -arch=arm ??_Fbad_typeid@@QAAXXZ() bad_typeid_default_ctor # public: void __cdecl bad_typeid::`default constructor closure'(void) +@ cdecl -arch=arm ??_U@YAPAXI@Z() operator_new # void * __cdecl operator new[](unsigned int) +@ cdecl -arch=arm ??_U@YAPAXIHPBDH@Z() operator_new_dbg # void * __cdecl operator new[](unsigned int,int,char const *,int) +@ cdecl -arch=arm ??_V@YAXPAX@Z() operator_delete # void __cdecl operator delete[](void *) ;@ cdecl -arch=arm _CallMemberFunction0() ;@ cdecl -arch=arm _CallMemberFunction1() ;@ cdecl -arch=arm _CallMemberFunction2() @@ -164,19 +164,19 @@ ;@ cdecl -arch=arm __ExceptionPtrRethrow() ;@ cdecl -arch=arm __ExceptionPtrSwap() ;@ cdecl -arch=arm __ExceptionPtrToBool() -@ cdecl -arch=arm __uncaught_exception(ptr) MSVCRT___uncaught_exception -@ cdecl -arch=arm ?_query_new_handler@@YAP6AHI@ZXZ() MSVCRT__query_new_handler # int (__cdecl*__cdecl _query_new_handler(void))(unsigned int) -@ cdecl -arch=arm ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z() MSVCRT__set_new_handler # int (__cdecl*__cdecl _set_new_handler(int (__cdecl*)(unsigned int)))(unsigned int) -@ cdecl -arch=arm ?_set_new_mode@@YAHH@Z() MSVCRT__set_new_mode # int __cdecl _set_new_mode(int) -@ cdecl -arch=arm ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z() MSVCRT__set_se_translator # void (__cdecl*__cdecl _set_se_translator(void (__cdecl*)(unsigned int,struct _EXCEPTION_POINTERS *)))(unsigned int,struct _EXCEPTION_POINTERS *) -@ cdecl -arch=arm ?before@type_info@@QBAHABV1@@Z() MSVCRT_type_info_before # public: int __cdecl type_info::before(class type_info const &)const -@ cdecl -arch=arm ?name@type_info@@QBAPBDXZ() MSVCRT_type_info_name # public: char const * __cdecl type_info::name(void)const -@ cdecl -arch=arm ?raw_name@type_info@@QBAPBDXZ() MSVCRT_type_info_raw_name # public: char const * __cdecl type_info::raw_name(void)const -@ cdecl -arch=arm ?set_terminate@@YAP6AXXZP6AXXZ@Z() MSVCRT_set_terminate # void (__cdecl*__cdecl set_terminate(void (__cdecl*)(void)))(void) -@ cdecl -arch=arm ?set_unexpected@@YAP6AXXZP6AXXZ@Z() MSVCRT_set_unexpected # void (__cdecl*__cdecl set_unexpected(void (__cdecl*)(void)))(void) -@ cdecl -arch=arm ?terminate@@YAXXZ() MSVCRT_terminate # void __cdecl terminate(void) -@ cdecl -arch=arm ?unexpected@@YAXXZ() MSVCRT_unexpected # void __cdecl unexpected(void) -@ cdecl -arch=arm ?what@exception@@UBAPBDXZ() MSVCRT_what_exception # public: virtual char const * __cdecl exception::what(void)const +@ cdecl -arch=arm __uncaught_exception(ptr) __uncaught_exception +@ cdecl -arch=arm ?_query_new_handler@@YAP6AHI@ZXZ() _query_new_handler # int (__cdecl*__cdecl _query_new_handler(void))(unsigned int) +@ cdecl -arch=arm ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z() _set_new_handler # int (__cdecl*__cdecl _set_new_handler(int (__cdecl*)(unsigned int)))(unsigned int) +@ cdecl -arch=arm ?_set_new_mode@@YAHH@Z() _set_new_mode # int __cdecl _set_new_mode(int) +@ cdecl -arch=arm ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z() _set_se_translator # void (__cdecl*__cdecl _set_se_translator(void (__cdecl*)(unsigned int,struct _EXCEPTION_POINTERS *)))(unsigned int,struct _EXCEPTION_POINTERS *) +@ cdecl -arch=arm ?before@type_info@@QBAHABV1@@Z() type_info_before # public: int __cdecl type_info::before(class type_info const &)const +@ cdecl -arch=arm ?name@type_info@@QBAPBDXZ() type_info_name # public: char const * __cdecl type_info::name(void)const +@ cdecl -arch=arm ?raw_name@type_info@@QBAPBDXZ() type_info_raw_name # public: char const * __cdecl type_info::raw_name(void)const +@ cdecl -arch=arm ?set_terminate@@YAP6AXXZP6AXXZ@Z() set_terminate # void (__cdecl*__cdecl set_terminate(void (__cdecl*)(void)))(void) +@ cdecl -arch=arm ?set_unexpected@@YAP6AXXZP6AXXZ@Z() set_unexpected # void (__cdecl*__cdecl set_unexpected(void (__cdecl*)(void)))(void) +@ cdecl -arch=arm ?terminate@@YAXXZ() terminate # void __cdecl terminate(void) +@ cdecl -arch=arm ?unexpected@@YAXXZ() unexpected # void __cdecl unexpected(void) +@ cdecl -arch=arm ?what@exception@@UBAPBDXZ() exception_what # public: virtual char const * __cdecl exception::what(void)const # **************** Common functions **************** @@ -248,9 +248,9 @@ @ cdecl -arch=i386 __CxxRegisterExceptionObject() @ cdecl -arch=i386 __CxxUnregisterExceptionObject() @ cdecl __DestructExceptionObject(ptr) -@ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid -@ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast -@ cdecl __RTtypeid(ptr) MSVCRT___RTtypeid +@ cdecl __RTCastToVoid(ptr) __RTCastToVoid +@ cdecl __RTDynamicCast(ptr long ptr ptr long) __RTDynamicCast +@ cdecl __RTtypeid(ptr) __RTtypeid @ cdecl __STRINGTOLD(ptr ptr str long) @ cdecl ___lc_codepage_func() @ cdecl ___lc_collate_cp_func() diff --git a/dll/win32/msvcrt20/msvcrt20.spec b/dll/win32/msvcrt20/msvcrt20.spec index 8ace935a4db..0e499d055a1 100644 --- a/dll/win32/msvcrt20/msvcrt20.spec +++ b/dll/win32/msvcrt20/msvcrt20.spec @@ -77,10 +77,10 @@ @ stub ??1streambuf@@UAE@XZ # @ stub ??1strstream@@UAE@XZ # @ stub ??1strstreambuf@@UAE@XZ # -@ cdecl -arch=win32 ??2@YAPAXI@Z(long) MSVCRT_operator_new -@ cdecl -arch=win64 ??2@YAPEAX_K@Z(double) MSVCRT_operator_new -@ cdecl -arch=win32 ??3@YAXPAX@Z(ptr) MSVCRT_operator_delete -@ cdecl -arch=win64 ??3@YAXPEAX@Z(ptr) MSVCRT_operator_delete +@ cdecl -arch=win32 ??2@YAPAXI@Z(long) operator_new +@ cdecl -arch=win64 ??2@YAPEAX_K@Z(double) operator_new +@ cdecl -arch=win32 ??3@YAXPAX@Z(ptr) operator_delete +@ cdecl -arch=win64 ??3@YAXPEAX@Z(ptr) operator_delete @ stub ??4Iostream_init@@QAEAAV0@ABV0@@Z # @ stub ??4filebuf@@QAEAAV0@ABV0@@Z # @ stub ??4fstream@@QAEAAV0@AAV0@@Z # @@ -226,11 +226,11 @@ @ stub ??_Gstreambuf@@UAEPAXI@Z # @ stub ??_Gstrstream@@UAEPAXI@Z # @ stub ??_Gstrstreambuf@@UAEPAXI@Z # -@ cdecl ?_query_new_handler@@YAP6AHI@ZXZ() MSVCRT__query_new_handler -@ cdecl -i386 ?_query_new_mode@@YAHXZ() MSVCRT__query_new_mode -@ cdecl ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z(ptr) MSVCRT__set_new_handler -@ cdecl ?_set_new_mode@@YAHH@Z(long) MSVCRT__set_new_mode -@ cdecl ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) MSVCRT__set_se_translator +@ cdecl ?_query_new_handler@@YAP6AHI@ZXZ() _query_new_handler +@ cdecl -i386 ?_query_new_mode@@YAHXZ() _query_new_mode +@ cdecl ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z(ptr) _set_new_handler +@ cdecl ?_set_new_mode@@YAHH@Z(long) _set_new_mode +@ cdecl ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) _set_se_translator @ stub ?adjustfield@ios@@2JB # @ stub ?allocate@streambuf@@IAEHXZ # @ stub ?attach@filebuf@@QAEPAV1@H@Z # @@ -365,8 +365,8 @@ @ stub ?seekp@ostream@@QAEAAV1@J@Z # @ stub ?seekp@ostream@@QAEAAV1@JW4seek_dir@ios@@@Z # @ stub ?seekpos@streambuf@@UAEJJH@Z # -@ cdecl ?set_terminate@@YAP6AXXZP6AXXZ@Z(ptr) MSVCRT_set_terminate -@ cdecl ?set_unexpected@@YAP6AXXZP6AXXZ@Z(ptr) MSVCRT_set_unexpected +@ cdecl ?set_terminate@@YAP6AXXZP6AXXZ@Z(ptr) set_terminate +@ cdecl ?set_unexpected@@YAP6AXXZP6AXXZ@Z(ptr) set_unexpected @ stub ?setb@streambuf@@IAEXPAD0H@Z # @ stub ?setbuf@filebuf@@UAEPAVstreambuf@@PADH@Z # @ stub ?setbuf@fstream@@QAEPAVstreambuf@@PADH@Z # @@ -409,7 +409,7 @@ @ stub ?sync_with_stdio@ios@@SAXXZ # @ stub ?tellg@istream@@QAEJXZ # @ stub ?tellp@ostream@@QAEJXZ # -@ cdecl ?terminate@@YAXXZ() MSVCRT_terminate +@ cdecl ?terminate@@YAXXZ() terminate @ stub ?text@filebuf@@2HB # @ stub ?tie@ios@@QAEPAVostream@@PAV2@@Z # @ stub ?tie@ios@@QBEPAVostream@@XZ # @@ -418,7 +418,7 @@ @ stub ?underflow@filebuf@@UAEHXZ # @ stub ?underflow@stdiobuf@@UAEHXZ # @ stub ?underflow@strstreambuf@@UAEHXZ # -@ cdecl ?unexpected@@YAXXZ() MSVCRT_unexpected +@ cdecl ?unexpected@@YAXXZ() unexpected @ stub ?unlock@ios@@QAAXXZ # @ stub ?unlock@streambuf@@QAEXXZ # @ stub ?unlockbuf@ios@@QAAXXZ # diff --git a/dll/win32/msvcrt40/msvcrt40.spec b/dll/win32/msvcrt40/msvcrt40.spec index f60e59b6098..6e005a3f85d 100644 --- a/dll/win32/msvcrt40/msvcrt40.spec +++ b/dll/win32/msvcrt40/msvcrt40.spec @@ -1,14 +1,14 @@ @ stub ??0Iostream_init@@QAE@AAVios@@H@Z @ stub ??0Iostream_init@@QAE@XZ -@ cdecl -i386 ??0__non_rtti_object@@QAE@ABV0@@Z(ptr) MSVCRT___non_rtti_object_copy_ctor -@ cdecl -i386 ??0__non_rtti_object@@QAE@PBD@Z(ptr) MSVCRT___non_rtti_object_ctor -@ cdecl -i386 ??0bad_cast@@QAE@ABQBD@Z(ptr) MSVCRT_bad_cast_ctor -@ cdecl -i386 ??0bad_cast@@QAE@ABV0@@Z(ptr) MSVCRT_bad_cast_copy_ctor -@ cdecl -i386 ??0bad_typeid@@QAE@ABV0@@Z(ptr) MSVCRT_bad_typeid_copy_ctor -@ cdecl -i386 ??0bad_typeid@@QAE@PBD@Z(ptr) MSVCRT_bad_typeid_ctor -@ cdecl -i386 ??0exception@@QAE@ABQBD@Z(ptr) MSVCRT_exception_ctor -@ cdecl -i386 ??0exception@@QAE@ABV0@@Z(ptr) MSVCRT_exception_copy_ctor -@ cdecl -i386 ??0exception@@QAE@XZ() MSVCRT_exception_default_ctor +@ cdecl -i386 ??0__non_rtti_object@@QAE@ABV0@@Z(ptr) __non_rtti_object_copy_ctor +@ cdecl -i386 ??0__non_rtti_object@@QAE@PBD@Z(ptr) __non_rtti_object_ctor +@ cdecl -i386 ??0bad_cast@@QAE@ABQBD@Z(ptr) bad_cast_ctor +@ cdecl -i386 ??0bad_cast@@QAE@ABV0@@Z(ptr) bad_cast_copy_ctor +@ cdecl -i386 ??0bad_typeid@@QAE@ABV0@@Z(ptr) bad_typeid_copy_ctor +@ cdecl -i386 ??0bad_typeid@@QAE@PBD@Z(ptr) bad_typeid_ctor +@ cdecl -i386 ??0exception@@QAE@ABQBD@Z(ptr) exception_ctor +@ cdecl -i386 ??0exception@@QAE@ABV0@@Z(ptr) exception_copy_ctor +@ cdecl -i386 ??0exception@@QAE@XZ() exception_default_ctor @ stub ??0filebuf@@QAE@ABV0@@Z @ stub ??0filebuf@@QAE@H@Z @ stub ??0filebuf@@QAE@HPADH@Z @@ -70,10 +70,10 @@ @ stub ??0strstreambuf@@QAE@PADH0@Z @ stub ??0strstreambuf@@QAE@XZ @ stub ??1Iostream_init@@QAE@XZ -@ cdecl -i386 ??1__non_rtti_object@@UAE@XZ() MSVCRT___non_rtti_object_dtor -@ cdecl -i386 ??1bad_cast@@UAE@XZ() MSVCRT_bad_cast_dtor -@ cdecl -i386 ??1bad_typeid@@UAE@XZ() MSVCRT_bad_typeid_dtor -@ cdecl -i386 ??1exception@@UAE@XZ() MSVCRT_exception_dtor +@ cdecl -i386 ??1__non_rtti_object@@UAE@XZ() __non_rtti_object_dtor +@ cdecl -i386 ??1bad_cast@@UAE@XZ() bad_cast_dtor +@ cdecl -i386 ??1bad_typeid@@UAE@XZ() bad_typeid_dtor +@ cdecl -i386 ??1exception@@UAE@XZ() exception_dtor @ stub ??1filebuf@@UAE@XZ @ stub ??1fstream@@UAE@XZ @ stub ??1ifstream@@UAE@XZ @@ -92,16 +92,16 @@ @ stub ??1streambuf@@UAE@XZ @ stub ??1strstream@@UAE@XZ @ stub ??1strstreambuf@@UAE@XZ -@ cdecl -i386 ??1type_info@@UAE@XZ() MSVCRT_type_info_dtor -@ cdecl -arch=win32 ??2@YAPAXI@Z(long) MSVCRT_operator_new -@ cdecl -arch=win64 ??2@YAPEAX_K@Z(double) MSVCRT_operator_new -@ cdecl -arch=win32 ??3@YAXPAX@Z(ptr) MSVCRT_operator_delete -@ cdecl -arch=win64 ??3@YAXPEAX@Z(ptr) MSVCRT_operator_delete +@ cdecl -i386 ??1type_info@@UAE@XZ() type_info_dtor +@ cdecl -arch=win32 ??2@YAPAXI@Z(long) operator_new +@ cdecl -arch=win64 ??2@YAPEAX_K@Z(double) operator_new +@ cdecl -arch=win32 ??3@YAXPAX@Z(ptr) operator_delete +@ cdecl -arch=win64 ??3@YAXPEAX@Z(ptr) operator_delete @ stub ??4Iostream_init@@QAEAAV0@ABV0@@Z -@ cdecl -i386 ??4__non_rtti_object@@QAEAAV0@ABV0@@Z(ptr) MSVCRT___non_rtti_object_opequals -@ cdecl -i386 ??4bad_cast@@QAEAAV0@ABV0@@Z(ptr) MSVCRT_bad_cast_opequals -@ cdecl -i386 ??4bad_typeid@@QAEAAV0@ABV0@@Z(ptr) MSVCRT_bad_typeid_opequals -@ cdecl -i386 ??4exception@@QAEAAV0@ABV0@@Z(ptr) MSVCRT_exception_opequals +@ cdecl -i386 ??4__non_rtti_object@@QAEAAV0@ABV0@@Z(ptr) __non_rtti_object_opequals +@ cdecl -i386 ??4bad_cast@@QAEAAV0@ABV0@@Z(ptr) bad_cast_opequals +@ cdecl -i386 ??4bad_typeid@@QAEAAV0@ABV0@@Z(ptr) bad_typeid_opequals +@ cdecl -i386 ??4exception@@QAEAAV0@ABV0@@Z(ptr) exception_opequals @ stub ??4filebuf@@QAEAAV0@ABV0@@Z @ stub ??4fstream@@QAEAAV0@AAV0@@Z @ stub ??4ifstream@@QAEAAV0@ABV0@@Z @@ -165,13 +165,13 @@ @ stub ??6ostream@@QAEAAV0@PBE@Z @ stub ??6ostream@@QAEAAV0@PBX@Z @ stub ??7ios@@QBEHXZ -@ cdecl -i386 ??8type_info@@QBEHABV0@@Z(ptr) MSVCRT_type_info_opequals_equals -@ cdecl -i386 ??9type_info@@QBEHABV0@@Z(ptr) MSVCRT_type_info_opnot_equals +@ cdecl -i386 ??8type_info@@QBEHABV0@@Z(ptr) type_info_opequals_equals +@ cdecl -i386 ??9type_info@@QBEHABV0@@Z(ptr) type_info_opnot_equals @ stub ??Bios@@QBEPAXXZ -@ extern -i386 ??_7__non_rtti_object@@6B@ MSVCRT___non_rtti_object_vtable -@ extern -i386 ??_7bad_cast@@6B@ MSVCRT_bad_cast_vtable -@ extern -i386 ??_7bad_typeid@@6B@ MSVCRT_bad_typeid_vtable -@ extern -i386 ??_7exception@@6B@ MSVCRT_exception_vtable +@ extern -i386 ??_7__non_rtti_object@@6B@ __non_rtti_object_vtable +@ extern -i386 ??_7bad_cast@@6B@ bad_cast_vtable +@ extern -i386 ??_7bad_typeid@@6B@ bad_typeid_vtable +@ extern -i386 ??_7exception@@6B@ exception_vtable @ stub ??_7filebuf@@6B@ @ stub ??_7fstream@@6B@ @ stub ??_7ifstream@@6B@ @@ -219,10 +219,10 @@ @ stub ??_Dstdiostream@@QAEXXZ @ stub ??_Dstrstream@@QAEXXZ @ stub ??_EIostream_init@@QAEPAXI@Z -@ cdecl -i386 ??_E__non_rtti_object@@UAEPAXI@Z(long) MSVCRT___non_rtti_object_vector_dtor -@ cdecl -i386 ??_Ebad_cast@@UAEPAXI@Z(long) MSVCRT_bad_cast_vector_dtor -@ cdecl -i386 ??_Ebad_typeid@@UAEPAXI@Z(long) MSVCRT_bad_typeid_vector_dtor -@ cdecl -i386 ??_Eexception@@UAEPAXI@Z(long) MSVCRT_exception_vector_dtor +@ cdecl -i386 ??_E__non_rtti_object@@UAEPAXI@Z(long) __non_rtti_object_vector_dtor +@ cdecl -i386 ??_Ebad_cast@@UAEPAXI@Z(long) bad_cast_vector_dtor +@ cdecl -i386 ??_Ebad_typeid@@UAEPAXI@Z(long) bad_typeid_vector_dtor +@ cdecl -i386 ??_Eexception@@UAEPAXI@Z(long) exception_vector_dtor @ stub ??_Efilebuf@@UAEPAXI@Z @ stub ??_Efstream@@UAEPAXI@Z @ stub ??_Eifstream@@UAEPAXI@Z @@ -242,10 +242,10 @@ @ stub ??_Estrstream@@UAEPAXI@Z @ stub ??_Estrstreambuf@@UAEPAXI@Z @ stub ??_GIostream_init@@QAEPAXI@Z -@ cdecl -i386 ??_G__non_rtti_object@@UAEPAXI@Z(long) MSVCRT___non_rtti_object_scalar_dtor -@ cdecl -i386 ??_Gbad_cast@@UAEPAXI@Z(long) MSVCRT_bad_cast_scalar_dtor -@ cdecl -i386 ??_Gbad_typeid@@UAEPAXI@Z(long) MSVCRT_bad_typeid_scalar_dtor -@ cdecl -i386 ??_Gexception@@UAEPAXI@Z(long) MSVCRT_exception_scalar_dtor +@ cdecl -i386 ??_G__non_rtti_object@@UAEPAXI@Z(long) __non_rtti_object_scalar_dtor +@ cdecl -i386 ??_Gbad_cast@@UAEPAXI@Z(long) bad_cast_scalar_dtor +@ cdecl -i386 ??_Gbad_typeid@@UAEPAXI@Z(long) bad_typeid_scalar_dtor +@ cdecl -i386 ??_Gexception@@UAEPAXI@Z(long) exception_scalar_dtor @ stub ??_Gfilebuf@@UAEPAXI@Z @ stub ??_Gfstream@@UAEPAXI@Z @ stub ??_Gifstream@@UAEPAXI@Z @@ -264,11 +264,11 @@ @ stub ??_Gstreambuf@@UAEPAXI@Z @ stub ??_Gstrstream@@UAEPAXI@Z @ stub ??_Gstrstreambuf@@UAEPAXI@Z -@ cdecl ?_query_new_handler@@YAP6AHI@ZXZ() MSVCRT__query_new_handler -@ cdecl -i386 ?_query_new_mode@@YAHXZ() MSVCRT__query_new_mode -@ cdecl ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z(ptr) MSVCRT__set_new_handler -@ cdecl ?_set_new_mode@@YAHH@Z(long) MSVCRT__set_new_mode -@ cdecl ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) MSVCRT__set_se_translator +@ cdecl ?_query_new_handler@@YAP6AHI@ZXZ() _query_new_handler +@ cdecl -i386 ?_query_new_mode@@YAHXZ() _query_new_mode +@ cdecl ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z(ptr) _set_new_handler +@ cdecl ?_set_new_mode@@YAHH@Z(long) _set_new_mode +@ cdecl ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) _set_se_translator @ stub ?adjustfield@ios@@2JB @ stub ?allocate@streambuf@@IAEHXZ @ stub ?attach@filebuf@@QAEPAV1@H@Z @@ -278,7 +278,7 @@ @ stub ?bad@ios@@QBEHXZ @ stub ?base@streambuf@@IBEPADXZ @ stub ?basefield@ios@@2JB -@ cdecl -i386 ?before@type_info@@QBEHABV1@@Z(ptr) MSVCRT_type_info_before +@ cdecl -i386 ?before@type_info@@QBEHABV1@@Z(ptr) type_info_before @ stub ?binary@filebuf@@2HB @ stub ?bitalloc@ios@@SAJXZ @ stub ?blen@streambuf@@IBEHXZ @@ -356,7 +356,7 @@ @ stub ?lockc@ios@@KAXXZ @ stub ?lockptr@ios@@IAEPAU_CRT_CRITICAL_SECTION@@XZ @ stub ?lockptr@streambuf@@IAEPAU_CRT_CRITICAL_SECTION@@XZ -@ cdecl -i386 ?name@type_info@@QBEPBDXZ() MSVCRT_type_info_name +@ cdecl -i386 ?name@type_info@@QBEPBDXZ() type_info_name @ stub ?oct@@YAAAVios@@AAV1@@Z @ stub ?open@filebuf@@QAEPAV1@PBDHH@Z @ stub ?open@fstream@@QAEXPBDHH@Z @@ -384,7 +384,7 @@ @ stub ?put@ostream@@QAEAAV1@E@Z @ stub ?putback@istream@@QAEAAV1@D@Z @ stub ?pword@ios@@QBEAAPAXH@Z -@ cdecl -i386 ?raw_name@type_info@@QBEPBDXZ() MSVCRT_type_info_raw_name +@ cdecl -i386 ?raw_name@type_info@@QBEPBDXZ() type_info_raw_name @ stub ?rdbuf@fstream@@QBEPAVfilebuf@@XZ @ stub ?rdbuf@ifstream@@QBEPAVfilebuf@@XZ @ stub ?rdbuf@ios@@QBEPAVstreambuf@@XZ @@ -407,9 +407,9 @@ @ stub ?seekp@ostream@@QAEAAV1@J@Z @ stub ?seekp@ostream@@QAEAAV1@JW4seek_dir@ios@@@Z @ stub ?seekpos@streambuf@@UAEJJH@Z -@ cdecl -i386 ?set_new_handler@@YAP6AXXZP6AXXZ@Z(ptr) MSVCRT_set_new_handler -@ cdecl ?set_terminate@@YAP6AXXZP6AXXZ@Z(ptr) MSVCRT_set_terminate -@ cdecl ?set_unexpected@@YAP6AXXZP6AXXZ@Z(ptr) MSVCRT_set_unexpected +@ cdecl -i386 ?set_new_handler@@YAP6AXXZP6AXXZ@Z(ptr) set_new_handler +@ cdecl ?set_terminate@@YAP6AXXZP6AXXZ@Z(ptr) set_terminate +@ cdecl ?set_unexpected@@YAP6AXXZP6AXXZ@Z(ptr) set_unexpected @ stub ?setb@streambuf@@IAEXPAD0H@Z @ stub ?setbuf@filebuf@@UAEPAVstreambuf@@PADH@Z @ stub ?setbuf@fstream@@QAEPAVstreambuf@@PADH@Z @@ -452,7 +452,7 @@ @ stub ?sync_with_stdio@ios@@SAXXZ @ stub ?tellg@istream@@QAEJXZ @ stub ?tellp@ostream@@QAEJXZ -@ cdecl ?terminate@@YAXXZ() MSVCRT_terminate +@ cdecl ?terminate@@YAXXZ() terminate @ stub ?text@filebuf@@2HB @ stub ?tie@ios@@QAEPAVostream@@PAV2@@Z @ stub ?tie@ios@@QBEPAVostream@@XZ @@ -461,13 +461,13 @@ @ stub ?underflow@filebuf@@UAEHXZ @ stub ?underflow@stdiobuf@@UAEHXZ @ stub ?underflow@strstreambuf@@UAEHXZ -@ cdecl ?unexpected@@YAXXZ() MSVCRT_unexpected +@ cdecl ?unexpected@@YAXXZ() unexpected @ stub ?unlock@ios@@QAAXXZ @ stub ?unlock@streambuf@@QAEXXZ @ stub ?unlockbuf@ios@@QAAXXZ @ stub ?unlockc@ios@@KAXXZ @ stub ?unsetf@ios@@QAEJJ@Z -@ cdecl -i386 ?what@exception@@UBEPBDXZ() MSVCRT_what_exception +@ cdecl -i386 ?what@exception@@UBEPBDXZ() exception_what @ stub ?width@ios@@QAEHH@Z @ stub ?width@ios@@QBEHXZ @ stub ?write@ostream@@QAEAAV1@PBCH@Z @@ -505,9 +505,9 @@ @ cdecl _XcptFilter(long ptr) @ cdecl -i386 __CxxFrameHandler(ptr ptr ptr ptr) @ stdcall -i386 __CxxLongjmpUnwind(ptr) -@ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid -@ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast -@ cdecl __RTtypeid(ptr) MSVCRT___RTtypeid +@ cdecl __RTCastToVoid(ptr) __RTCastToVoid +@ cdecl __RTDynamicCast(ptr long ptr ptr long) __RTDynamicCast +@ cdecl __RTtypeid(ptr) __RTtypeid @ cdecl __STRINGTOLD(ptr ptr str long) @ extern __argc @ extern __argv diff --git a/media/doc/WINESYNC.txt b/media/doc/WINESYNC.txt index dec52405662..bf5b76bfb55 100644 --- a/media/doc/WINESYNC.txt +++ b/media/doc/WINESYNC.txt @@ -305,10 +305,7 @@ lpk - msvcrt - sdk/lib/crt/conio/cputs.c # Synced to WineStaging-1.9.16 - sdk/lib/crt/except/cpp.c # Synced at 20080528 - sdk/lib/crt/except/cppexcept.c # Synced at 20071111 sdk/lib/crt/process/_cwait.c # Synced to WineStaging-1.7.37 - sdk/lib/crt/signal/xcptinfo.c # Synced to WineStaging-1.7.37 sdk/lib/crt/string/scanf.c/h # Synced to Wine-1.7.17 sdk/lib/crt/string/strtoi64.c # Synced to WineStaging-1.9.9 sdk/lib/crt/string/strtok.c # Synced to WineStaging-1.9.16 @@ -319,9 +316,18 @@ msvcrt - sdk/lib/crt/string/wctype.c # Synced to WineStaging-1.9.16 sdk/lib/crt/string/wtoi64.c # Synced to Wine-1.9.16 sdk/lib/crt/mbstring/ischira.c # Synced to Wine-1.9.16 - sdk/lib/crt/wine/heap.c # Synced at 20080529 - sdk/lib/crt/wine/undname.c # Synced to WineStaging-1.9.16 sdk/lib/crt/process/thread.c # Synced to WineStaging-1.7.55 + sdk/lib/crt/wine/cpp.c # Synced to Wine-7.0 + sdk/lib/crt/wine/cppexcept.h # Synced to Wine-7.0 + sdk/lib/crt/wine/except.c # Synced to Wine-7.0 + sdk/lib/crt/wine/except_arm.c # Synced to Wine-7.0 + sdk/lib/crt/wine/except_arm64.c # Synced to Wine-7.0 + sdk/lib/crt/wine/except_i386.c # Synced to Wine-7.0 + sdk/lib/crt/wine/except_x86_64.c # Synced to Wine-7.0 + sdk/lib/crt/wine/heap.c # Synced to Wine-7.0 + sdk/lib/crt/wine/msvcrt.h # Synced to Wine-7.0 + sdk/lib/crt/wine/mtdll.h # Synced to Wine-7.0 + sdk/lib/crt/wine/undname.c # Synced to Wine-7.0 regedit base/applications/regedit/regedit.c # Synced to Wine-7.17 diff --git a/sdk/include/reactos/wine/asm.h b/sdk/include/reactos/wine/asm.h index 14406b784eb..19a770fcf3b 100644 --- a/sdk/include/reactos/wine/asm.h +++ b/sdk/include/reactos/wine/asm.h @@ -55,6 +55,14 @@ # define __ASM_FUNC_TYPE(name) ".type " name ",@function" #endif +#if !defined(__GNUC__) && !defined(__clang__) +# define __ASM_BLOCK_BEGIN(name) void __asm_dummy_##name(void) { +# define __ASM_BLOCK_END } +#else +# define __ASM_BLOCK_BEGIN(name) +# define __ASM_BLOCK_END +#endif + /* ReactOS */ #if defined(_MSC_VER) # define __ASM_DEFINE_FUNC(name,code) diff --git a/sdk/lib/crt/crt.cmake b/sdk/lib/crt/crt.cmake index f4868b27080..1ca567d9de7 100644 --- a/sdk/lib/crt/crt.cmake +++ b/sdk/lib/crt/crt.cmake @@ -13,7 +13,6 @@ list(APPEND CRT_SOURCE ${CRT_PROCESS_SOURCE} ${CRT_SEARCH_SOURCE} signal/signal.c - signal/xcptinfo.c ${CRT_STARTUP_SOURCE} ${CRT_STDIO_SOURCE} ${CRT_STDLIB_SOURCE} diff --git a/sdk/lib/crt/except/amd64/cpp.s b/sdk/lib/crt/except/amd64/cpp.s index 03b6d3dff9d..ad869b8d609 100644 --- a/sdk/lib/crt/except/amd64/cpp.s +++ b/sdk/lib/crt/except/amd64/cpp.s @@ -7,19 +7,19 @@ MACRO(START_VTABLE, shortname, cxxname) EXTERN shortname&_rtti:PROC -EXTERN MSVCRT_&shortname&_vector_dtor:PROC +EXTERN &shortname&_vector_dtor:PROC .quad shortname&_rtti -PUBLIC MSVCRT_&shortname&_vtable -MSVCRT_&shortname&_vtable: +PUBLIC &shortname&_vtable +&shortname&_vtable: PUBLIC &cxxname &cxxname: - .quad MSVCRT_&shortname&_vector_dtor + .quad &shortname&_vector_dtor ENDM MACRO(DEFINE_EXCEPTION_VTABLE, shortname, cxxname) START_VTABLE shortname, cxxname - EXTERN MSVCRT_what_exception:ABS - .quad MSVCRT_what_exception + EXTERN exception_what:ABS + .quad exception_what ENDM START_VTABLE type_info, __dummyname_type_info @@ -34,56 +34,56 @@ EXTERN &orig:ABS ALIAS <&alias> = <&orig> ENDM -DEFINE_ALIAS ??3@YAXPEAX@Z, MSVCRT_operator_delete -DEFINE_ALIAS ??_U@YAPEAX_K@Z, MSVCRT_operator_new -DEFINE_ALIAS ??_U@YAPEAX_KHPEBDH@Z, MSVCRT_operator_new_dbg -DEFINE_ALIAS ??_V@YAXPEAX@Z, MSVCRT_operator_delete -DEFINE_ALIAS ??2@YAPEAX_K@Z, MSVCRT_operator_new -DEFINE_ALIAS ??2@YAPEAX_KHPEBDH@Z, MSVCRT_operator_new_dbg -DEFINE_ALIAS ?_query_new_handler@@YAP6AHI@ZXZ, MSVCRT__query_new_handler -DEFINE_ALIAS ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z, MSVCRT__set_new_handler -DEFINE_ALIAS ?set_new_handler@@YAP6AXXZP6AXXZ@Z, MSVCRT_set_new_handler -DEFINE_ALIAS ?_query_new_mode@@YAHXZ, MSVCRT__query_new_mode -DEFINE_ALIAS ?_set_new_mode@@YAHH@Z, MSVCRT__set_new_mode -DEFINE_ALIAS ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z, MSVCRT__set_se_translator -DEFINE_ALIAS ?set_terminate@@YAP6AXXZP6AXXZ@Z, MSVCRT_set_terminate -DEFINE_ALIAS ?set_unexpected@@YAP6AXXZP6AXXZ@Z, MSVCRT_set_unexpected -DEFINE_ALIAS ?terminate@@YAXXZ, MSVCRT_terminate -DEFINE_ALIAS ?unexpected@@YAXXZ, MSVCRT_unexpected -DEFINE_ALIAS ?what@exception@@UEBAPEBDXZ, MSVCRT_what_exception -DEFINE_ALIAS ??0exception@@QEAA@AEBQEBDH@Z, MSVCRT_exception_ctor_noalloc -DEFINE_ALIAS ??0exception@@QEAA@AEBV0@@Z, MSVCRT_exception_copy_ctor -DEFINE_ALIAS ??0exception@@QEAA@XZ, MSVCRT_exception_default_ctor -DEFINE_ALIAS ??1exception@@UEAA@XZ, MSVCRT_exception_dtor -DEFINE_ALIAS ??4exception@@QEAAAEAV0@AEBV0@@Z, MSVCRT_exception_opequals -DEFINE_ALIAS ??1type_info@@UEAA@XZ, MSVCRT_type_info_dtor -DEFINE_ALIAS ??0__non_rtti_object@@QEAA@AEBV0@@Z, MSVCRT___non_rtti_object_copy_ctor -DEFINE_ALIAS ??0__non_rtti_object@@QEAA@PEBD@Z, MSVCRT___non_rtti_object_ctor -DEFINE_ALIAS ??0bad_cast@@AAE@PBQBD@Z, MSVCRT_bad_cast_ctor -DEFINE_ALIAS ??0bad_cast@@AEAA@PEBQEBD@Z, MSVCRT_bad_cast_ctor -DEFINE_ALIAS ??0bad_cast@@QAE@ABQBD@Z, MSVCRT_bad_cast_ctor -DEFINE_ALIAS ??0bad_cast@@QEAA@AEBQEBD@Z, MSVCRT_bad_cast_ctor -DEFINE_ALIAS ??0bad_cast@@QEAA@AEBV0@@Z, MSVCRT_bad_cast_copy_ctor -DEFINE_ALIAS ??0bad_cast@@QEAA@PEBD@Z, MSVCRT_bad_cast_ctor_charptr -DEFINE_ALIAS ??0bad_typeid@@QEAA@AEBV0@@Z, MSVCRT_bad_typeid_copy_ctor -DEFINE_ALIAS ??0bad_typeid@@QEAA@PEBD@Z, MSVCRT_bad_typeid_ctor -DEFINE_ALIAS ??0exception@@QEAA@AEBQEBD@Z, MSVCRT_exception_ctor -DEFINE_ALIAS ??1__non_rtti_object@@UEAA@XZ, MSVCRT___non_rtti_object_dtor -DEFINE_ALIAS ??1bad_cast@@UEAA@XZ, MSVCRT_bad_cast_dtor -DEFINE_ALIAS ??1bad_typeid@@UEAA@XZ, MSVCRT_bad_typeid_dtor -DEFINE_ALIAS ??4bad_cast@@QEAAAEAV0@AEBV0@@Z, MSVCRT_bad_cast_opequals -DEFINE_ALIAS ??4bad_typeid@@QEAAAEAV0@AEBV0@@Z, MSVCRT_bad_typeid_opequals -DEFINE_ALIAS ??8type_info@@QEBAHAEBV0@@Z, MSVCRT_type_info_opequals_equals -DEFINE_ALIAS ??9type_info@@QEBAHAEBV0@@Z, MSVCRT_type_info_opnot_equals -DEFINE_ALIAS ??_Fbad_cast@@QEAAXXZ, MSVCRT_bad_cast_default_ctor -DEFINE_ALIAS ??_Fbad_typeid@@QEAAXXZ, MSVCRT_bad_typeid_default_ctor -DEFINE_ALIAS ?_query_new_handler@@YAP6AH_K@ZXZ, MSVCRT__query_new_handler -DEFINE_ALIAS ?_set_new_handler@@YAP6AH_K@ZP6AH0@Z@Z, MSVCRT__set_new_handler -DEFINE_ALIAS ?_set_se_translator@@YAP6AXIPEAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z, MSVCRT__set_se_translator -DEFINE_ALIAS ?before@type_info@@QEBAHAEBV1@@Z, MSVCRT_type_info_before -DEFINE_ALIAS ?name@type_info@@QEBAPEBDXZ, MSVCRT_type_info_name -DEFINE_ALIAS ?raw_name@type_info@@QEBAPEBDXZ, MSVCRT_type_info_raw_name -DEFINE_ALIAS ??4__non_rtti_object@@QEAAAEAV0@AEBV0@@Z, MSVCRT___non_rtti_object_opequals +DEFINE_ALIAS ??3@YAXPEAX@Z, operator_delete +DEFINE_ALIAS ??_U@YAPEAX_K@Z, operator_new +DEFINE_ALIAS ??_U@YAPEAX_KHPEBDH@Z, operator_new_dbg +DEFINE_ALIAS ??_V@YAXPEAX@Z, operator_delete +DEFINE_ALIAS ??2@YAPEAX_K@Z, operator_new +DEFINE_ALIAS ??2@YAPEAX_KHPEBDH@Z, operator_new_dbg +DEFINE_ALIAS ?_query_new_handler@@YAP6AHI@ZXZ, _query_new_handler +DEFINE_ALIAS ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z, _set_new_handler +DEFINE_ALIAS ?set_new_handler@@YAP6AXXZP6AXXZ@Z, set_new_handler +DEFINE_ALIAS ?_query_new_mode@@YAHXZ, _query_new_mode +DEFINE_ALIAS ?_set_new_mode@@YAHH@Z, _set_new_mode +DEFINE_ALIAS ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z, _set_se_translator +DEFINE_ALIAS ?set_terminate@@YAP6AXXZP6AXXZ@Z, set_terminate +DEFINE_ALIAS ?set_unexpected@@YAP6AXXZP6AXXZ@Z, set_unexpected +DEFINE_ALIAS ?terminate@@YAXXZ, terminate +DEFINE_ALIAS ?unexpected@@YAXXZ, unexpected +DEFINE_ALIAS ?what@exception@@UEBAPEBDXZ, exception_what +DEFINE_ALIAS ??0exception@@QEAA@AEBQEBDH@Z, exception_ctor_noalloc +DEFINE_ALIAS ??0exception@@QEAA@AEBV0@@Z, exception_copy_ctor +DEFINE_ALIAS ??0exception@@QEAA@XZ, exception_default_ctor +DEFINE_ALIAS ??1exception@@UEAA@XZ, exception_dtor +DEFINE_ALIAS ??4exception@@QEAAAEAV0@AEBV0@@Z, exception_opequals +DEFINE_ALIAS ??1type_info@@UEAA@XZ, type_info_dtor +DEFINE_ALIAS ??0__non_rtti_object@@QEAA@AEBV0@@Z, __non_rtti_object_copy_ctor +DEFINE_ALIAS ??0__non_rtti_object@@QEAA@PEBD@Z, __non_rtti_object_ctor +DEFINE_ALIAS ??0bad_cast@@AAE@PBQBD@Z, bad_cast_ctor +DEFINE_ALIAS ??0bad_cast@@AEAA@PEBQEBD@Z, bad_cast_ctor +DEFINE_ALIAS ??0bad_cast@@QAE@ABQBD@Z, bad_cast_ctor +DEFINE_ALIAS ??0bad_cast@@QEAA@AEBQEBD@Z, bad_cast_ctor +DEFINE_ALIAS ??0bad_cast@@QEAA@AEBV0@@Z, bad_cast_copy_ctor +DEFINE_ALIAS ??0bad_cast@@QEAA@PEBD@Z, bad_cast_ctor_charptr +DEFINE_ALIAS ??0bad_typeid@@QEAA@AEBV0@@Z, bad_typeid_copy_ctor +DEFINE_ALIAS ??0bad_typeid@@QEAA@PEBD@Z, bad_typeid_ctor +DEFINE_ALIAS ??0exception@@QEAA@AEBQEBD@Z, exception_ctor +DEFINE_ALIAS ??1__non_rtti_object@@UEAA@XZ, __non_rtti_object_dtor +DEFINE_ALIAS ??1bad_cast@@UEAA@XZ, bad_cast_dtor +DEFINE_ALIAS ??1bad_typeid@@UEAA@XZ, bad_typeid_dtor +DEFINE_ALIAS ??4bad_cast@@QEAAAEAV0@AEBV0@@Z, bad_cast_opequals +DEFINE_ALIAS ??4bad_typeid@@QEAAAEAV0@AEBV0@@Z, bad_typeid_opequals +DEFINE_ALIAS ??8type_info@@QEBAHAEBV0@@Z, type_info_opequals_equals +DEFINE_ALIAS ??9type_info@@QEBAHAEBV0@@Z, type_info_opnot_equals +DEFINE_ALIAS ??_Fbad_cast@@QEAAXXZ, bad_cast_default_ctor +DEFINE_ALIAS ??_Fbad_typeid@@QEAAXXZ, bad_typeid_default_ctor +DEFINE_ALIAS ?_query_new_handler@@YAP6AH_K@ZXZ, _query_new_handler +DEFINE_ALIAS ?_set_new_handler@@YAP6AH_K@ZP6AH0@Z@Z, _set_new_handler +DEFINE_ALIAS ?_set_se_translator@@YAP6AXIPEAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z, _set_se_translator +DEFINE_ALIAS ?before@type_info@@QEBAHAEBV1@@Z, type_info_before +DEFINE_ALIAS ?name@type_info@@QEBAPEBDXZ, type_info_name +DEFINE_ALIAS ?raw_name@type_info@@QEBAPEBDXZ, type_info_raw_name +DEFINE_ALIAS ??4__non_rtti_object@@QEAAAEAV0@AEBV0@@Z, __non_rtti_object_opequals END diff --git a/sdk/lib/crt/except/arm/cpp.s b/sdk/lib/crt/except/arm/cpp.s index 33014a8093d..5a45e587189 100644 --- a/sdk/lib/crt/except/arm/cpp.s +++ b/sdk/lib/crt/except/arm/cpp.s @@ -22,48 +22,48 @@ _Target SETS "|$Target|" IMPORT $_FuncName, WEAK $_Target MEND - DEFINE_ALIAS ??0__non_rtti_object@@QAA@ABV0@@Z, MSVCRT___non_rtti_object_copy_ctor - DEFINE_ALIAS ??0__non_rtti_object@@QAA@PBD@Z, MSVCRT___non_rtti_object_ctor - DEFINE_ALIAS ??0bad_cast@@AAA@PBQBD@Z, MSVCRT_bad_cast_ctor // private: __cdecl bad_cast::bad_cast(char const * const *) - DEFINE_ALIAS ??0bad_cast@@QAA@ABV0@@Z, MSVCRT_bad_cast_copy_ctor // public: __cdecl bad_cast::bad_cast(class bad_cast const &) - DEFINE_ALIAS ??0bad_cast@@QAA@PBD@Z, MSVCRT_bad_cast_ctor // public: __cdecl bad_cast::bad_cast(char const *) - DEFINE_ALIAS ??0bad_typeid@@QAA@ABV0@@Z, MSVCRT_bad_typeid_copy_ctor // public: __cdecl bad_typeid::bad_typeid(class bad_typeid const &) - DEFINE_ALIAS ??0bad_typeid@@QAA@PBD@Z, MSVCRT_bad_typeid_ctor // public: __cdecl bad_typeid::bad_typeid(char const *) - DEFINE_ALIAS ??0exception@@QAA@ABQBD@Z, MSVCRT_exception_ctor // public: __cdecl exception::exception(char const * const &) - DEFINE_ALIAS ??0exception@@QAA@ABQBDH@Z, MSVCRT_exception_ctor_noalloc // public: __cdecl exception::exception(char const * const &,int) - DEFINE_ALIAS ??0exception@@QAA@ABV0@@Z, MSVCRT_exception_copy_ctor // public: __cdecl exception::exception(class exception const &) - DEFINE_ALIAS ??0exception@@QAA@XZ, MSVCRT_exception_default_ctor // public: __cdecl exception::exception(void) - DEFINE_ALIAS ??1__non_rtti_object@@UAA@XZ, MSVCRT___non_rtti_object_dtor // public: virtual __cdecl __non_rtti_object::~__non_rtti_object(void) - DEFINE_ALIAS ??1bad_cast@@UAA@XZ, MSVCRT_bad_cast_dtor // public: virtual __cdecl bad_cast::~bad_cast(void) - DEFINE_ALIAS ??1bad_typeid@@UAA@XZ, MSVCRT_bad_typeid_dtor // public: virtual __cdecl bad_typeid::~bad_typeid(void) - DEFINE_ALIAS ??1exception@@UAA@XZ, MSVCRT_exception_dtor // public: virtual __cdecl exception::~exception(void) - DEFINE_ALIAS ??1type_info@@UAA@XZ, MSVCRT_type_info_dtor // public: virtual __cdecl type_info::~type_info(void) - DEFINE_ALIAS ??2@YAPAXI@Z, MSVCRT_operator_new // void * __cdecl operator new(unsigned int) - DEFINE_ALIAS ??2@YAPAXIHPBDH@Z, MSVCRT_operator_new_dbg // void * __cdecl operator new(unsigned int,int,char const *,int) - DEFINE_ALIAS ??3@YAXPAX@Z, MSVCRT_operator_delete // void __cdecl operator delete(void *) - DEFINE_ALIAS ??4__non_rtti_object@@QAAAAV0@ABV0@@Z, MSVCRT___non_rtti_object_opequals // public: class __non_rtti_object & __cdecl __non_rtti_object::operator=(class __non_rtti_object const &) - DEFINE_ALIAS ??4bad_cast@@QAAAAV0@ABV0@@Z, MSVCRT_bad_cast_opequals // public: class bad_cast & __cdecl bad_cast::operator=(class bad_cast const &) - DEFINE_ALIAS ??4bad_typeid@@QAAAAV0@ABV0@@Z, MSVCRT_bad_typeid_opequals // public: class bad_typeid & __cdecl bad_typeid::operator=(class bad_typeid const &) - DEFINE_ALIAS ??4exception@@QAAAAV0@ABV0@@Z, MSVCRT_exception_opequals // public: class exception & __cdecl exception::operator=(class exception const &) - DEFINE_ALIAS ??8type_info@@QBAHABV0@@Z, MSVCRT_type_info_opequals_equals // public: int __cdecl type_info::operator==(class type_info const &)const - DEFINE_ALIAS ??9type_info@@QBAHABV0@@Z, MSVCRT_type_info_opnot_equals // public: int __cdecl type_info::operator!=(class type_info const &)const - DEFINE_ALIAS ??_Fbad_cast@@QAAXXZ, MSVCRT_bad_cast_default_ctor // public: void __cdecl bad_cast::`default constructor closure'(void) - DEFINE_ALIAS ??_Fbad_typeid@@QAAXXZ, MSVCRT_bad_typeid_default_ctor // public: void __cdecl bad_typeid::`default constructor closure'(void) - DEFINE_ALIAS ??_U@YAPAXI@Z, MSVCRT_operator_new // void * __cdecl operator new[](unsigned int) - DEFINE_ALIAS ??_U@YAPAXIHPBDH@Z, MSVCRT_operator_new_dbg // void * __cdecl operator new[](unsigned int,int,char const *,int) - DEFINE_ALIAS ??_V@YAXPAX@Z, MSVCRT_operator_delete // void __cdecl operator delete[](void *) - DEFINE_ALIAS ?_query_new_handler@@YAP6AHI@ZXZ, MSVCRT__query_new_handler // int (__cdecl*__cdecl _query_new_handler(void))(unsigned int) - DEFINE_ALIAS ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z, MSVCRT__set_new_handler // int (__cdecl*__cdecl _set_new_handler(int (__cdecl*)(unsigned int)))(unsigned int) - DEFINE_ALIAS ?_set_new_mode@@YAHH@Z, MSVCRT__set_new_mode // int __cdecl _set_new_mode(int) - DEFINE_ALIAS ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z, MSVCRT__set_se_translator // void (__cdecl*__cdecl _set_se_translator(void (__cdecl*)(unsigned int,struct _EXCEPTION_POINTERS *)))(unsigned int,struct _EXCEPTION_POINTERS *) - DEFINE_ALIAS ?before@type_info@@QBAHABV1@@Z, MSVCRT_type_info_before // public: int __cdecl type_info::before(class type_info const &)const - DEFINE_ALIAS ?name@type_info@@QBAPBDXZ, MSVCRT_type_info_name // public: char const * __cdecl type_info::name(void)const - DEFINE_ALIAS ?raw_name@type_info@@QBAPBDXZ, MSVCRT_type_info_raw_name // public: char const * __cdecl type_info::raw_name(void)const - DEFINE_ALIAS ?set_terminate@@YAP6AXXZP6AXXZ@Z, MSVCRT_set_terminate // void (__cdecl*__cdecl set_terminate(void (__cdecl*)(void)))(void) - DEFINE_ALIAS ?set_unexpected@@YAP6AXXZP6AXXZ@Z, MSVCRT_set_unexpected // void (__cdecl*__cdecl set_unexpected(void (__cdecl*)(void)))(void) - DEFINE_ALIAS ?terminate@@YAXXZ, MSVCRT_terminate // void __cdecl terminate(void) - DEFINE_ALIAS ?unexpected@@YAXXZ, MSVCRT_unexpected // void __cdecl unexpected(void) - DEFINE_ALIAS ?what@exception@@UBAPBDXZ, MSVCRT_what_exception // public: virtual char const * __cdecl exception::what(void)const + DEFINE_ALIAS ??0__non_rtti_object@@QAA@ABV0@@Z, __non_rtti_object_copy_ctor + DEFINE_ALIAS ??0__non_rtti_object@@QAA@PBD@Z, __non_rtti_object_ctor + DEFINE_ALIAS ??0bad_cast@@AAA@PBQBD@Z, bad_cast_ctor // private: __cdecl bad_cast::bad_cast(char const * const *) + DEFINE_ALIAS ??0bad_cast@@QAA@ABV0@@Z, bad_cast_copy_ctor // public: __cdecl bad_cast::bad_cast(class bad_cast const &) + DEFINE_ALIAS ??0bad_cast@@QAA@PBD@Z, bad_cast_ctor // public: __cdecl bad_cast::bad_cast(char const *) + DEFINE_ALIAS ??0bad_typeid@@QAA@ABV0@@Z, bad_typeid_copy_ctor // public: __cdecl bad_typeid::bad_typeid(class bad_typeid const &) + DEFINE_ALIAS ??0bad_typeid@@QAA@PBD@Z, bad_typeid_ctor // public: __cdecl bad_typeid::bad_typeid(char const *) + DEFINE_ALIAS ??0exception@@QAA@ABQBD@Z, exception_ctor // public: __cdecl exception::exception(char const * const &) + DEFINE_ALIAS ??0exception@@QAA@ABQBDH@Z, exception_ctor_noalloc // public: __cdecl exception::exception(char const * const &,int) + DEFINE_ALIAS ??0exception@@QAA@ABV0@@Z, exception_copy_ctor // public: __cdecl exception::exception(class exception const &) + DEFINE_ALIAS ??0exception@@QAA@XZ, exception_default_ctor // public: __cdecl exception::exception(void) + DEFINE_ALIAS ??1__non_rtti_object@@UAA@XZ, __non_rtti_object_dtor // public: virtual __cdecl __non_rtti_object::~__non_rtti_object(void) + DEFINE_ALIAS ??1bad_cast@@UAA@XZ, bad_cast_dtor // public: virtual __cdecl bad_cast::~bad_cast(void) + DEFINE_ALIAS ??1bad_typeid@@UAA@XZ, bad_typeid_dtor // public: virtual __cdecl bad_typeid::~bad_typeid(void) + DEFINE_ALIAS ??1exception@@UAA@XZ, exception_dtor // public: virtual __cdecl exception::~exception(void) + DEFINE_ALIAS ??1type_info@@UAA@XZ, type_info_dtor // public: virtual __cdecl type_info::~type_info(void) + DEFINE_ALIAS ??2@YAPAXI@Z, operator_new // void * __cdecl operator new(unsigned int) + DEFINE_ALIAS ??2@YAPAXIHPBDH@Z, operator_new_dbg // void * __cdecl operator new(unsigned int,int,char const *,int) + DEFINE_ALIAS ??3@YAXPAX@Z, operator_delete // void __cdecl operator delete(void *) + DEFINE_ALIAS ??4__non_rtti_object@@QAAAAV0@ABV0@@Z, __non_rtti_object_opequals // public: class __non_rtti_object & __cdecl __non_rtti_object::operator=(class __non_rtti_object const &) + DEFINE_ALIAS ??4bad_cast@@QAAAAV0@ABV0@@Z, bad_cast_opequals // public: class bad_cast & __cdecl bad_cast::operator=(class bad_cast const &) + DEFINE_ALIAS ??4bad_typeid@@QAAAAV0@ABV0@@Z, bad_typeid_opequals // public: class bad_typeid & __cdecl bad_typeid::operator=(class bad_typeid const &) + DEFINE_ALIAS ??4exception@@QAAAAV0@ABV0@@Z, exception_opequals // public: class exception & __cdecl exception::operator=(class exception const &) + DEFINE_ALIAS ??8type_info@@QBAHABV0@@Z, type_info_opequals_equals // public: int __cdecl type_info::operator==(class type_info const &)const + DEFINE_ALIAS ??9type_info@@QBAHABV0@@Z, type_info_opnot_equals // public: int __cdecl type_info::operator!=(class type_info const &)const + DEFINE_ALIAS ??_Fbad_cast@@QAAXXZ, bad_cast_default_ctor // public: void __cdecl bad_cast::`default constructor closure'(void) + DEFINE_ALIAS ??_Fbad_typeid@@QAAXXZ, bad_typeid_default_ctor // public: void __cdecl bad_typeid::`default constructor closure'(void) + DEFINE_ALIAS ??_U@YAPAXI@Z, operator_new // void * __cdecl operator new[](unsigned int) + DEFINE_ALIAS ??_U@YAPAXIHPBDH@Z, operator_new_dbg // void * __cdecl operator new[](unsigned int,int,char const *,int) + DEFINE_ALIAS ??_V@YAXPAX@Z, operator_delete // void __cdecl operator delete[](void *) + DEFINE_ALIAS ?_query_new_handler@@YAP6AHI@ZXZ, _query_new_handler // int (__cdecl*__cdecl _query_new_handler(void))(unsigned int) + DEFINE_ALIAS ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z, _set_new_handler // int (__cdecl*__cdecl _set_new_handler(int (__cdecl*)(unsigned int)))(unsigned int) + DEFINE_ALIAS ?_set_new_mode@@YAHH@Z, _set_new_mode // int __cdecl _set_new_mode(int) + DEFINE_ALIAS ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z, _set_se_translator // void (__cdecl*__cdecl _set_se_translator(void (__cdecl*)(unsigned int,struct _EXCEPTION_POINTERS *)))(unsigned int,struct _EXCEPTION_POINTERS *) + DEFINE_ALIAS ?before@type_info@@QBAHABV1@@Z, type_info_before // public: int __cdecl type_info::before(class type_info const &)const + DEFINE_ALIAS ?name@type_info@@QBAPBDXZ, type_info_name // public: char const * __cdecl type_info::name(void)const + DEFINE_ALIAS ?raw_name@type_info@@QBAPBDXZ, type_info_raw_name // public: char const * __cdecl type_info::raw_name(void)const + DEFINE_ALIAS ?set_terminate@@YAP6AXXZP6AXXZ@Z, set_terminate // void (__cdecl*__cdecl set_terminate(void (__cdecl*)(void)))(void) + DEFINE_ALIAS ?set_unexpected@@YAP6AXXZP6AXXZ@Z, set_unexpected // void (__cdecl*__cdecl set_unexpected(void (__cdecl*)(void)))(void) + DEFINE_ALIAS ?terminate@@YAXXZ, terminate // void __cdecl terminate(void) + DEFINE_ALIAS ?unexpected@@YAXXZ, unexpected // void __cdecl unexpected(void) + DEFINE_ALIAS ?what@exception@@UBAPBDXZ, exception_what // public: virtual char const * __cdecl exception::what(void)const #undef _MSVCRT_ MACRO @@ -74,8 +74,8 @@ _Target SETS "|$Target|" LCLS CxxLabel CxxLabel SETS "|$CxxName|" RttiName SETS "|$ShortName._rtti|" -VtblName SETS "|MSVCRT_":CC:"$ShortName._vtable|" -DtorName SETS "|MSVCRT_":CC:"$ShortName._vector_dtor|" +VtblName SETS "|":CC:"$ShortName._vtable|" +DtorName SETS "|":CC:"$ShortName._vector_dtor|" EXTERN $RttiName DCD $RttiName EXPORT $VtblName @@ -89,8 +89,8 @@ $CxxLabel MACRO DEFINE_EXCEPTION_VTABLE $ShortName, $CxxName START_VTABLE $ShortName, $CxxName - EXTERN MSVCRT_what_exception - DCD MSVCRT_what_exception + EXTERN exception_what + DCD exception_what MEND START_VTABLE type_info, __dummyname_type_info @@ -101,13 +101,13 @@ $CxxLabel GBLS FuncName - //EXTERN MSVCRT_operator_delete + //EXTERN operator_delete //__ExportName ??3@YAXPAX@Z - //b MSVCRT_operator_delete + //b operator_delete - //EXTERN MSVCRT_operator_new + //EXTERN operator_new //__ExportName ??_U@YAPAXI@Z - //b MSVCRT_operator_new + //b operator_new END /* EOF */ diff --git a/sdk/lib/crt/except/i386/cpp.s b/sdk/lib/crt/except/i386/cpp.s index 7985dc1d9fe..99e2748edd6 100644 --- a/sdk/lib/crt/except/i386/cpp.s +++ b/sdk/lib/crt/except/i386/cpp.s @@ -17,61 +17,61 @@ MACRO(DEFINE_THISCALL_ALIAS, cxxname, target) #endif ENDM -DEFINE_THISCALL_ALIAS ??0exception@@QAE@ABQBD@Z, _MSVCRT_exception_ctor -DEFINE_THISCALL_ALIAS ??0exception@@QAE@ABQBDH@Z, _MSVCRT_exception_ctor_noalloc -DEFINE_THISCALL_ALIAS ??0exception@@QAE@ABV0@@Z, _MSVCRT_exception_copy_ctor -DEFINE_THISCALL_ALIAS ??0exception@@QAE@XZ, _MSVCRT_exception_default_ctor -DEFINE_THISCALL_ALIAS ??1exception@@UAE@XZ, _MSVCRT_exception_dtor -DEFINE_THISCALL_ALIAS ??4exception@@QAEAAV0@ABV0@@Z, _MSVCRT_exception_opequals -DEFINE_THISCALL_ALIAS ??_Eexception@@UAEPAXI@Z, _MSVCRT_exception_vector_dtor -DEFINE_THISCALL_ALIAS ??_Gexception@@UAEPAXI@Z, _MSVCRT_exception_scalar_dtor -DEFINE_THISCALL_ALIAS ?what@exception@@UBEPBDXZ, _MSVCRT_what_exception -DEFINE_THISCALL_ALIAS ??0bad_typeid@@QAE@ABV0@@Z, _MSVCRT_bad_typeid_copy_ctor -DEFINE_THISCALL_ALIAS ??0bad_typeid@@QAE@PBD@Z, _MSVCRT_bad_typeid_ctor -DEFINE_THISCALL_ALIAS ??_Fbad_typeid@@QAEXXZ, _MSVCRT_bad_typeid_default_ctor -DEFINE_THISCALL_ALIAS ??1bad_typeid@@UAE@XZ, _MSVCRT_bad_typeid_dtor -DEFINE_THISCALL_ALIAS ??4bad_typeid@@QAEAAV0@ABV0@@Z, _MSVCRT_bad_typeid_opequals -DEFINE_THISCALL_ALIAS ??_Ebad_typeid@@UAEPAXI@Z, _MSVCRT_bad_typeid_vector_dtor -DEFINE_THISCALL_ALIAS ??_Gbad_typeid@@UAEPAXI@Z, _MSVCRT_bad_typeid_scalar_dtor -DEFINE_THISCALL_ALIAS ??0__non_rtti_object@@QAE@ABV0@@Z, _MSVCRT___non_rtti_object_copy_ctor -DEFINE_THISCALL_ALIAS ??0__non_rtti_object@@QAE@PBD@Z, _MSVCRT___non_rtti_object_ctor -DEFINE_THISCALL_ALIAS ??1__non_rtti_object@@UAE@XZ, _MSVCRT___non_rtti_object_dtor -DEFINE_THISCALL_ALIAS ??4__non_rtti_object@@QAEAAV0@ABV0@@Z, _MSVCRT___non_rtti_object_opequals -DEFINE_THISCALL_ALIAS ??_E__non_rtti_object@@UAEPAXI@Z, _MSVCRT___non_rtti_object_vector_dtor -DEFINE_THISCALL_ALIAS ??_G__non_rtti_object@@UAEPAXI@Z, _MSVCRT___non_rtti_object_scalar_dtor -DEFINE_THISCALL_ALIAS ??0bad_cast@@AAE@PBQBD@Z, _MSVCRT_bad_cast_ctor -DEFINE_THISCALL_ALIAS ??0bad_cast@@QAE@ABQBD@Z, _MSVCRT_bad_cast_ctor -DEFINE_THISCALL_ALIAS ??0bad_cast@@QAE@ABV0@@Z, _MSVCRT_bad_cast_copy_ctor -DEFINE_THISCALL_ALIAS ??0bad_cast@@QAE@PBD@Z, _MSVCRT_bad_cast_ctor_charptr -DEFINE_THISCALL_ALIAS ??_Fbad_cast@@QAEXXZ, _MSVCRT_bad_cast_default_ctor -DEFINE_THISCALL_ALIAS ??1bad_cast@@UAE@XZ, _MSVCRT_bad_cast_dtor -DEFINE_THISCALL_ALIAS ??4bad_cast@@QAEAAV0@ABV0@@Z, _MSVCRT_bad_cast_opequals -DEFINE_THISCALL_ALIAS ??_Ebad_cast@@UAEPAXI@Z, _MSVCRT_bad_cast_vector_dtor -DEFINE_THISCALL_ALIAS ??_Gbad_cast@@UAEPAXI@Z, _MSVCRT_bad_cast_scalar_dtor -DEFINE_THISCALL_ALIAS ??8type_info@@QBEHABV0@@Z, _MSVCRT_type_info_opequals_equals -DEFINE_THISCALL_ALIAS ??9type_info@@QBEHABV0@@Z, _MSVCRT_type_info_opnot_equals -DEFINE_THISCALL_ALIAS ?before@type_info@@QBEHABV1@@Z, _MSVCRT_type_info_before -DEFINE_THISCALL_ALIAS ??1type_info@@UAE@XZ, _MSVCRT_type_info_dtor -DEFINE_THISCALL_ALIAS ?name@type_info@@QBEPBDXZ, _MSVCRT_type_info_name -DEFINE_THISCALL_ALIAS ?raw_name@type_info@@QBEPBDXZ, _MSVCRT_type_info_raw_name +DEFINE_THISCALL_ALIAS ??0exception@@QAE@ABQBD@Z, _exception_ctor +DEFINE_THISCALL_ALIAS ??0exception@@QAE@ABQBDH@Z, _exception_ctor_noalloc +DEFINE_THISCALL_ALIAS ??0exception@@QAE@ABV0@@Z, _exception_copy_ctor +DEFINE_THISCALL_ALIAS ??0exception@@QAE@XZ, _exception_default_ctor +DEFINE_THISCALL_ALIAS ??1exception@@UAE@XZ, _exception_dtor +DEFINE_THISCALL_ALIAS ??4exception@@QAEAAV0@ABV0@@Z, _exception_opequals +DEFINE_THISCALL_ALIAS ??_Eexception@@UAEPAXI@Z, _exception_vector_dtor +DEFINE_THISCALL_ALIAS ??_Gexception@@UAEPAXI@Z, _exception_scalar_dtor +DEFINE_THISCALL_ALIAS ?what@exception@@UBEPBDXZ, _exception_what +DEFINE_THISCALL_ALIAS ??0bad_typeid@@QAE@ABV0@@Z, _bad_typeid_copy_ctor +DEFINE_THISCALL_ALIAS ??0bad_typeid@@QAE@PBD@Z, _bad_typeid_ctor +DEFINE_THISCALL_ALIAS ??_Fbad_typeid@@QAEXXZ, _bad_typeid_default_ctor +DEFINE_THISCALL_ALIAS ??1bad_typeid@@UAE@XZ, _bad_typeid_dtor +DEFINE_THISCALL_ALIAS ??4bad_typeid@@QAEAAV0@ABV0@@Z, _bad_typeid_opequals +DEFINE_THISCALL_ALIAS ??_Ebad_typeid@@UAEPAXI@Z, _bad_typeid_vector_dtor +DEFINE_THISCALL_ALIAS ??_Gbad_typeid@@UAEPAXI@Z, _bad_typeid_scalar_dtor +DEFINE_THISCALL_ALIAS ??0__non_rtti_object@@QAE@ABV0@@Z, ___non_rtti_object_copy_ctor +DEFINE_THISCALL_ALIAS ??0__non_rtti_object@@QAE@PBD@Z, ___non_rtti_object_ctor +DEFINE_THISCALL_ALIAS ??1__non_rtti_object@@UAE@XZ, ___non_rtti_object_dtor +DEFINE_THISCALL_ALIAS ??4__non_rtti_object@@QAEAAV0@ABV0@@Z, ___non_rtti_object_opequals +DEFINE_THISCALL_ALIAS ??_E__non_rtti_object@@UAEPAXI@Z, ___non_rtti_object_vector_dtor +DEFINE_THISCALL_ALIAS ??_G__non_rtti_object@@UAEPAXI@Z, ___non_rtti_object_scalar_dtor +DEFINE_THISCALL_ALIAS ??0bad_cast@@AAE@PBQBD@Z, _bad_cast_ctor +DEFINE_THISCALL_ALIAS ??0bad_cast@@QAE@ABQBD@Z, _bad_cast_ctor +DEFINE_THISCALL_ALIAS ??0bad_cast@@QAE@ABV0@@Z, _bad_cast_copy_ctor +DEFINE_THISCALL_ALIAS ??0bad_cast@@QAE@PBD@Z, _bad_cast_ctor_charptr +DEFINE_THISCALL_ALIAS ??_Fbad_cast@@QAEXXZ, _bad_cast_default_ctor +DEFINE_THISCALL_ALIAS ??1bad_cast@@UAE@XZ, _bad_cast_dtor +DEFINE_THISCALL_ALIAS ??4bad_cast@@QAEAAV0@ABV0@@Z, _bad_cast_opequals +DEFINE_THISCALL_ALIAS ??_Ebad_cast@@UAEPAXI@Z, _bad_cast_vector_dtor +DEFINE_THISCALL_ALIAS ??_Gbad_cast@@UAEPAXI@Z, _bad_cast_scalar_dtor +DEFINE_THISCALL_ALIAS ??8type_info@@QBEHABV0@@Z, _type_info_opequals_equals +DEFINE_THISCALL_ALIAS ??9type_info@@QBEHABV0@@Z, _type_info_opnot_equals +DEFINE_THISCALL_ALIAS ?before@type_info@@QBEHABV1@@Z, _type_info_before +DEFINE_THISCALL_ALIAS ??1type_info@@UAE@XZ, _type_info_dtor +DEFINE_THISCALL_ALIAS ?name@type_info@@QBEPBDXZ, _type_info_name +DEFINE_THISCALL_ALIAS ?raw_name@type_info@@QBEPBDXZ, _type_info_raw_name #undef _MSVCRT_ MACRO(START_VTABLE, shortname, cxxname) EXTERN _&shortname&_rtti:PROC -EXTERN ___thiscall_MSVCRT_&shortname&_vector_dtor:PROC +EXTERN ___thiscall_&shortname&_vector_dtor:PROC .long _&shortname&_rtti -PUBLIC _MSVCRT_&shortname&_vtable -_MSVCRT_&shortname&_vtable: +PUBLIC _&shortname&_vtable +_&shortname&_vtable: PUBLIC &cxxname &cxxname: - .long ___thiscall_MSVCRT_&shortname&_vector_dtor + .long ___thiscall_&shortname&_vector_dtor ENDM MACRO(DEFINE_EXCEPTION_VTABLE, shortname, cxxname) START_VTABLE shortname, cxxname - EXTERN ___thiscall_MSVCRT_what_exception:PROC - .long ___thiscall_MSVCRT_what_exception + EXTERN ___thiscall_exception_what:PROC + .long ___thiscall_exception_what ENDM START_VTABLE type_info, __dummyname_type_info @@ -80,15 +80,15 @@ DEFINE_EXCEPTION_VTABLE bad_typeid, ??_7bad_typeid@@6B@ DEFINE_EXCEPTION_VTABLE bad_cast, ??_7bad_cast@@6B@ DEFINE_EXCEPTION_VTABLE __non_rtti_object, ??_7__non_rtti_object@@6B@ -EXTERN _MSVCRT_operator_delete:PROC +EXTERN _operator_delete:PROC PUBLIC ??3@YAXPAX@Z ??3@YAXPAX@Z: - jmp _MSVCRT_operator_delete + jmp _operator_delete -EXTERN _MSVCRT_operator_new:PROC +EXTERN _operator_new:PROC PUBLIC ??_U@YAPAXI@Z ??_U@YAPAXI@Z: - jmp _MSVCRT_operator_new + jmp _operator_new MACRO(DEFINE_ALIAS, alias, orig, type) @@ -96,18 +96,18 @@ EXTERN &orig:&type ALIAS <&alias> = <&orig> ENDM -DEFINE_ALIAS ??_V@YAXPAX@Z, _MSVCRT_operator_delete, PROC -DEFINE_ALIAS ??2@YAPAXI@Z, _MSVCRT_operator_new, PROC -DEFINE_ALIAS ?_query_new_handler@@YAP6AHI@ZXZ, _MSVCRT__query_new_handler, PROC -DEFINE_ALIAS ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z, _MSVCRT__set_new_handler, PROC -DEFINE_ALIAS ?set_new_handler@@YAP6AXXZP6AXXZ@Z, _MSVCRT_set_new_handler, PROC -DEFINE_ALIAS ?_query_new_mode@@YAHXZ, _MSVCRT__query_new_mode, PROC -DEFINE_ALIAS ?_set_new_mode@@YAHH@Z, _MSVCRT__set_new_mode, PROC -DEFINE_ALIAS ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z, _MSVCRT__set_se_translator, PROC -DEFINE_ALIAS ?set_terminate@@YAP6AXXZP6AXXZ@Z, _MSVCRT_set_terminate, PROC -DEFINE_ALIAS ?set_unexpected@@YAP6AXXZP6AXXZ@Z, _MSVCRT_set_unexpected, PROC -DEFINE_ALIAS ?terminate@@YAXXZ, _MSVCRT_terminate, PROC -DEFINE_ALIAS ?unexpected@@YAXXZ, _MSVCRT_unexpected, PROC +DEFINE_ALIAS ??_V@YAXPAX@Z, _operator_delete, PROC +DEFINE_ALIAS ??2@YAPAXI@Z, _operator_new, PROC +DEFINE_ALIAS ?_query_new_handler@@YAP6AHI@ZXZ, __query_new_handler, PROC +DEFINE_ALIAS ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z, __set_new_handler, PROC +DEFINE_ALIAS ?set_new_handler@@YAP6AXXZP6AXXZ@Z, _set_new_handler, PROC +DEFINE_ALIAS ?_query_new_mode@@YAHXZ, __query_new_mode, PROC +DEFINE_ALIAS ?_set_new_mode@@YAHH@Z, __set_new_mode, PROC +DEFINE_ALIAS ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z, __set_se_translator, PROC +DEFINE_ALIAS ?set_terminate@@YAP6AXXZP6AXXZ@Z, _set_terminate, PROC +DEFINE_ALIAS ?set_unexpected@@YAP6AXXZP6AXXZ@Z, _set_unexpected, PROC +DEFINE_ALIAS ?terminate@@YAXXZ, _terminate, PROC +DEFINE_ALIAS ?unexpected@@YAXXZ, _unexpected, PROC // void call_copy_ctor( void *func, void *this, void *src, int has_vbase ); diff --git a/sdk/lib/crt/include/internal/wine_msc.h b/sdk/lib/crt/include/internal/wine_msc.h index ebe023b48d0..eb0447c93ac 100644 --- a/sdk/lib/crt/include/internal/wine_msc.h +++ b/sdk/lib/crt/include/internal/wine_msc.h @@ -1,41 +1,41 @@ exception * __thiscall MSVCRT_exception_ctor(exception * _this, const char ** name); -exception * __thiscall MSVCRT_exception_ctor_noalloc(exception * _this, char ** name, int noalloc); -exception * __thiscall MSVCRT_exception_copy_ctor(exception * _this, const exception * rhs); -exception * __thiscall MSVCRT_exception_default_ctor(exception * _this); -void __thiscall MSVCRT_exception_dtor(exception * _this); -exception * __thiscall MSVCRT_exception_opequals(exception * _this, const exception * rhs); -void * __thiscall MSVCRT_exception_vector_dtor(exception * _this, unsigned int flags); -void * __thiscall MSVCRT_exception_scalar_dtor(exception * _this, unsigned int flags); -const char * __thiscall MSVCRT_what_exception(exception * _this); -bad_typeid * __thiscall MSVCRT_bad_typeid_copy_ctor(bad_typeid * _this, const bad_typeid * rhs); -bad_typeid * __thiscall MSVCRT_bad_typeid_ctor(bad_typeid * _this, const char * name); -bad_typeid * __thiscall MSVCRT_bad_typeid_default_ctor(bad_typeid * _this); -void __thiscall MSVCRT_bad_typeid_dtor(bad_typeid * _this); -bad_typeid * __thiscall MSVCRT_bad_typeid_opequals(bad_typeid * _this, const bad_typeid * rhs); -void * __thiscall MSVCRT_bad_typeid_vector_dtor(bad_typeid * _this, unsigned int flags); -void * __thiscall MSVCRT_bad_typeid_scalar_dtor(bad_typeid * _this, unsigned int flags); -__non_rtti_object * __thiscall MSVCRT___non_rtti_object_copy_ctor(__non_rtti_object * _this, const __non_rtti_object * rhs); -__non_rtti_object * __thiscall MSVCRT___non_rtti_object_ctor(__non_rtti_object * _this, const char * name); -void __thiscall MSVCRT___non_rtti_object_dtor(__non_rtti_object * _this); -__non_rtti_object * __thiscall MSVCRT___non_rtti_object_opequals(__non_rtti_object * _this, const __non_rtti_object *rhs); -void * __thiscall MSVCRT___non_rtti_object_vector_dtor(__non_rtti_object * _this, unsigned int flags); -void * __thiscall MSVCRT___non_rtti_object_scalar_dtor(__non_rtti_object * _this, unsigned int flags); -bad_cast * __thiscall MSVCRT_bad_cast_ctor(bad_cast * _this, const char ** name); -bad_cast * __thiscall MSVCRT_bad_cast_copy_ctor(bad_cast * _this, const bad_cast * rhs); -bad_cast * __thiscall MSVCRT_bad_cast_ctor_charptr(bad_cast * _this, const char * name); -bad_cast * __thiscall MSVCRT_bad_cast_default_ctor(bad_cast * _this); -void __thiscall MSVCRT_bad_cast_dtor(bad_cast * _this); -bad_cast * __thiscall MSVCRT_bad_cast_opequals(bad_cast * _this, const bad_cast * rhs); -void * __thiscall MSVCRT_bad_cast_vector_dtor(bad_cast * _this, unsigned int flags); -void * __thiscall MSVCRT_bad_cast_scalar_dtor(bad_cast * _this, unsigned int flags); -int __thiscall MSVCRT_type_info_opequals_equals(type_info * _this, const type_info * rhs); -int __thiscall MSVCRT_type_info_opnot_equals(type_info * _this, const type_info * rhs); -int __thiscall MSVCRT_type_info_before(type_info * _this, const type_info * rhs); -void __thiscall MSVCRT_type_info_dtor(type_info * _this); -const char * __thiscall MSVCRT_type_info_name(type_info * _this); -const char * __thiscall MSVCRT_type_info_raw_name(type_info * _this); -void * __thiscall MSVCRT_type_info_vector_dtor(type_info * _this, unsigned int flags); +exception * __thiscall exception_ctor_noalloc(exception * _this, char ** name, int noalloc); +exception * __thiscall exception_copy_ctor(exception * _this, const exception * rhs); +exception * __thiscall exception_default_ctor(exception * _this); +void __thiscall exception_dtor(exception * _this); +exception * __thiscall exception_opequals(exception * _this, const exception * rhs); +void * __thiscall exception_vector_dtor(exception * _this, unsigned int flags); +void * __thiscall exception_scalar_dtor(exception * _this, unsigned int flags); +const char * __thiscall exception_what(exception * _this); +bad_typeid * __thiscall bad_typeid_copy_ctor(bad_typeid * _this, const bad_typeid * rhs); +bad_typeid * __thiscall bad_typeid_ctor(bad_typeid * _this, const char * name); +bad_typeid * __thiscall bad_typeid_default_ctor(bad_typeid * _this); +void __thiscall bad_typeid_dtor(bad_typeid * _this); +bad_typeid * __thiscall bad_typeid_opequals(bad_typeid * _this, const bad_typeid * rhs); +void * __thiscall bad_typeid_vector_dtor(bad_typeid * _this, unsigned int flags); +void * __thiscall bad_typeid_scalar_dtor(bad_typeid * _this, unsigned int flags); +__non_rtti_object * __thiscall __non_rtti_object_copy_ctor(__non_rtti_object * _this, const __non_rtti_object * rhs); +__non_rtti_object * __thiscall __non_rtti_object_ctor(__non_rtti_object * _this, const char * name); +void __thiscall __non_rtti_object_dtor(__non_rtti_object * _this); +__non_rtti_object * __thiscall __non_rtti_object_opequals(__non_rtti_object * _this, const __non_rtti_object *rhs); +void * __thiscall __non_rtti_object_vector_dtor(__non_rtti_object * _this, unsigned int flags); +void * __thiscall __non_rtti_object_scalar_dtor(__non_rtti_object * _this, unsigned int flags); +bad_cast * __thiscall bad_cast_ctor(bad_cast * _this, const char ** name); +bad_cast * __thiscall bad_cast_copy_ctor(bad_cast * _this, const bad_cast * rhs); +bad_cast * __thiscall bad_cast_ctor_charptr(bad_cast * _this, const char * name); +bad_cast * __thiscall bad_cast_default_ctor(bad_cast * _this); +void __thiscall bad_cast_dtor(bad_cast * _this); +bad_cast * __thiscall bad_cast_opequals(bad_cast * _this, const bad_cast * rhs); +void * __thiscall bad_cast_vector_dtor(bad_cast * _this, unsigned int flags); +void * __thiscall bad_cast_scalar_dtor(bad_cast * _this, unsigned int flags); +int __thiscall type_info_opequals_equals(type_info * _this, const type_info * rhs); +int __thiscall type_info_opnot_equals(type_info * _this, const type_info * rhs); +int __thiscall type_info_before(type_info * _this, const type_info * rhs); +void __thiscall type_info_dtor(type_info * _this); +const char * __thiscall type_info_name(type_info * _this); +const char * __thiscall type_info_raw_name(type_info * _this); +void * __thiscall type_info_vector_dtor(type_info * _this, unsigned int flags); #if _MSVCR_VER >= 80 bad_alloc* __thiscall MSVCRT_bad_alloc_copy_ctor(bad_alloc* _this, const bad_alloc* rhs); bad_alloc* __thiscall MSVCRT_bad_alloc_copy_ctor(bad_alloc* _this, const bad_alloc* rhs); diff --git a/sdk/lib/crt/signal/xcptinfo.c b/sdk/lib/crt/signal/xcptinfo.c deleted file mode 100644 index a476d9c41ce..00000000000 --- a/sdk/lib/crt/signal/xcptinfo.c +++ /dev/null @@ -1,9 +0,0 @@ -#include - -/* - * @implemented - */ -void** __pxcptinfoptrs(void) -{ - return (void**)&msvcrt_get_thread_data()->xcptinfo; -} diff --git a/sdk/lib/crt/wine/cpp.c b/sdk/lib/crt/wine/cpp.c index b5636b1fb1a..a256569584b 100644 --- a/sdk/lib/crt/wine/cpp.c +++ b/sdk/lib/crt/wine/cpp.c @@ -19,22 +19,22 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - #include +#include #include "windef.h" #include "winternl.h" #include "wine/exception.h" #include "wine/debug.h" #include "msvcrt.h" -#include "cppexcept.h" #include "mtdll.h" #include "cxx.h" WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); +CREATE_TYPE_INFO_VTABLE +CREATE_EXCEPTION_OBJECT(exception) + struct __type_info_node { void *memPtr; @@ -45,11 +45,10 @@ typedef exception bad_cast; typedef exception bad_typeid; typedef exception __non_rtti_object; -extern const vtable_ptr MSVCRT_exception_vtable; -extern const vtable_ptr MSVCRT_bad_typeid_vtable; -extern const vtable_ptr MSVCRT_bad_cast_vtable; -extern const vtable_ptr MSVCRT___non_rtti_object_vtable; -extern const vtable_ptr MSVCRT_type_info_vtable; +extern const vtable_ptr bad_typeid_vtable; +extern const vtable_ptr bad_cast_vtable; +extern const vtable_ptr __non_rtti_object_vtable; +extern const vtable_ptr type_info_vtable; /* get the vtable pointer for a C++ object */ static inline const vtable_ptr *get_vtable( void *obj ) @@ -120,24 +119,6 @@ static void dump_obj_locator( const rtti_object_locator *ptr ) } #endif -/* Internal common ctor for exception */ -static void EXCEPTION_ctor(exception *_this, const char** name) -{ - _this->vtable = &MSVCRT_exception_vtable; - if (*name) - { - unsigned int name_len = strlen(*name) + 1; - _this->name = MSVCRT_malloc(name_len); - memcpy(_this->name, *name, name_len); - _this->do_free = TRUE; - } - else - { - _this->name = NULL; - _this->do_free = FALSE; - } -} - #ifdef __REACTOS__ #include #endif /* __REACTOS__ */ @@ -145,191 +126,119 @@ static void EXCEPTION_ctor(exception *_this, const char** name) /****************************************************************** * ??0exception@@QAE@ABQBD@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_exception_ctor,8) -exception * __thiscall MSVCRT_exception_ctor(exception * _this, const char ** name) +DEFINE_THISCALL_WRAPPER(exception_ctor,8) +exception * __thiscall exception_ctor(exception * _this, const char ** name) { TRACE("(%p,%s)\n", _this, *name); - EXCEPTION_ctor(_this, name); - return _this; + return __exception_ctor(_this, *name, &exception_vtable); } /****************************************************************** * ??0exception@@QAE@ABQBDH@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_exception_ctor_noalloc,12) -exception * __thiscall MSVCRT_exception_ctor_noalloc(exception * _this, char ** name, int noalloc) +DEFINE_THISCALL_WRAPPER(exception_ctor_noalloc,12) +exception * __thiscall exception_ctor_noalloc(exception * _this, char ** name, int noalloc) { TRACE("(%p,%s)\n", _this, *name); - _this->vtable = &MSVCRT_exception_vtable; + _this->vtable = &exception_vtable; _this->name = *name; _this->do_free = FALSE; return _this; } -/****************************************************************** - * ??0exception@@QAE@ABV0@@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER(MSVCRT_exception_copy_ctor,8) -exception * __thiscall MSVCRT_exception_copy_ctor(exception * _this, const exception * rhs) -{ - TRACE("(%p,%p)\n", _this, rhs); - - if (!rhs->do_free) - { - _this->vtable = &MSVCRT_exception_vtable; - _this->name = rhs->name; - _this->do_free = FALSE; - } - else - EXCEPTION_ctor(_this, (const char**)&rhs->name); - TRACE("name = %s\n", _this->name); - return _this; -} - /****************************************************************** * ??0exception@@QAE@XZ (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_exception_default_ctor,4) -exception * __thiscall MSVCRT_exception_default_ctor(exception * _this) -{ - static const char* empty = NULL; - - TRACE("(%p)\n", _this); - EXCEPTION_ctor(_this, &empty); - return _this; -} - -/****************************************************************** - * ??1exception@@UAE@XZ (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER(MSVCRT_exception_dtor,4) -void __thiscall MSVCRT_exception_dtor(exception * _this) +DEFINE_THISCALL_WRAPPER(exception_default_ctor,4) +exception * __thiscall exception_default_ctor(exception * _this) { TRACE("(%p)\n", _this); - _this->vtable = &MSVCRT_exception_vtable; - if (_this->do_free) MSVCRT_free(_this->name); + return __exception_ctor(_this, NULL, &exception_vtable); } /****************************************************************** * ??4exception@@QAEAAV0@ABV0@@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_exception_opequals,8) -exception * __thiscall MSVCRT_exception_opequals(exception * _this, const exception * rhs) +DEFINE_THISCALL_WRAPPER(exception_opequals,8) +exception * __thiscall exception_opequals(exception * _this, const exception * rhs) { TRACE("(%p %p)\n", _this, rhs); if (_this != rhs) { - MSVCRT_exception_dtor(_this); - MSVCRT_exception_copy_ctor(_this, rhs); + exception_dtor(_this); + exception_copy_ctor(_this, rhs); } TRACE("name = %s\n", _this->name); return _this; } -/****************************************************************** - * ??_Eexception@@UAEPAXI@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER(MSVCRT_exception_vector_dtor,8) -void * __thiscall MSVCRT_exception_vector_dtor(exception * _this, unsigned int flags) -{ - TRACE("(%p %x)\n", _this, flags); - if (flags & 2) - { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)_this - 1; - - for (i = *ptr - 1; i >= 0; i--) MSVCRT_exception_dtor(_this + i); - MSVCRT_operator_delete(ptr); - } - else - { - MSVCRT_exception_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); - } - return _this; -} - /****************************************************************** * ??_Gexception@@UAEPAXI@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_exception_scalar_dtor,8) -void * __thiscall MSVCRT_exception_scalar_dtor(exception * _this, unsigned int flags) +DEFINE_THISCALL_WRAPPER(exception_scalar_dtor,8) +void * __thiscall exception_scalar_dtor(exception * _this, unsigned int flags) { TRACE("(%p %x)\n", _this, flags); - MSVCRT_exception_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); + exception_dtor(_this); + if (flags & 1) operator_delete(_this); return _this; } -/****************************************************************** - * ?what@exception@@UBEPBDXZ (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER(MSVCRT_what_exception,4) -const char * __thiscall MSVCRT_what_exception(exception * _this) -{ - TRACE("(%p) returning %s\n", _this, _this->name); - return _this->name ? _this->name : "Unknown exception"; -} - /****************************************************************** * ??0bad_typeid@@QAE@ABV0@@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_typeid_copy_ctor,8) -bad_typeid * __thiscall MSVCRT_bad_typeid_copy_ctor(bad_typeid * _this, const bad_typeid * rhs) +DEFINE_THISCALL_WRAPPER(bad_typeid_copy_ctor,8) +bad_typeid * __thiscall bad_typeid_copy_ctor(bad_typeid * _this, const bad_typeid * rhs) { TRACE("(%p %p)\n", _this, rhs); - MSVCRT_exception_copy_ctor(_this, rhs); - _this->vtable = &MSVCRT_bad_typeid_vtable; - return _this; + return __exception_copy_ctor(_this, rhs, &bad_typeid_vtable); } /****************************************************************** * ??0bad_typeid@@QAE@PBD@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_typeid_ctor,8) -bad_typeid * __thiscall MSVCRT_bad_typeid_ctor(bad_typeid * _this, const char * name) +DEFINE_THISCALL_WRAPPER(bad_typeid_ctor,8) +bad_typeid * __thiscall bad_typeid_ctor(bad_typeid * _this, const char * name) { TRACE("(%p %s)\n", _this, name); - EXCEPTION_ctor(_this, &name); - _this->vtable = &MSVCRT_bad_typeid_vtable; - return _this; + return __exception_ctor(_this, name, &bad_typeid_vtable); } /****************************************************************** * ??_Fbad_typeid@@QAEXXZ (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_typeid_default_ctor,4) -bad_typeid * __thiscall MSVCRT_bad_typeid_default_ctor(bad_typeid * _this) +DEFINE_THISCALL_WRAPPER(bad_typeid_default_ctor,4) +bad_typeid * __thiscall bad_typeid_default_ctor(bad_typeid * _this) { - return MSVCRT_bad_typeid_ctor( _this, "bad typeid" ); + return bad_typeid_ctor( _this, "bad typeid" ); } /****************************************************************** * ??1bad_typeid@@UAE@XZ (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_typeid_dtor,4) -void __thiscall MSVCRT_bad_typeid_dtor(bad_typeid * _this) +DEFINE_THISCALL_WRAPPER(bad_typeid_dtor,4) +void __thiscall bad_typeid_dtor(bad_typeid * _this) { TRACE("(%p)\n", _this); - MSVCRT_exception_dtor(_this); + exception_dtor(_this); } /****************************************************************** * ??4bad_typeid@@QAEAAV0@ABV0@@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_typeid_opequals,8) -bad_typeid * __thiscall MSVCRT_bad_typeid_opequals(bad_typeid * _this, const bad_typeid * rhs) +DEFINE_THISCALL_WRAPPER(bad_typeid_opequals,8) +bad_typeid * __thiscall bad_typeid_opequals(bad_typeid * _this, const bad_typeid * rhs) { TRACE("(%p %p)\n", _this, rhs); - MSVCRT_exception_opequals(_this, rhs); + exception_opequals(_this, rhs); return _this; } /****************************************************************** * ??_Ebad_typeid@@UAEPAXI@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_typeid_vector_dtor,8) -void * __thiscall MSVCRT_bad_typeid_vector_dtor(bad_typeid * _this, unsigned int flags) +DEFINE_THISCALL_WRAPPER(bad_typeid_vector_dtor,8) +void * __thiscall bad_typeid_vector_dtor(bad_typeid * _this, unsigned int flags) { TRACE("(%p %x)\n", _this, flags); if (flags & 2) @@ -337,13 +246,13 @@ void * __thiscall MSVCRT_bad_typeid_vector_dtor(bad_typeid * _this, unsigned int /* we have an array, with the number of elements stored before the first object */ INT_PTR i, *ptr = (INT_PTR *)_this - 1; - for (i = *ptr - 1; i >= 0; i--) MSVCRT_bad_typeid_dtor(_this + i); - MSVCRT_operator_delete(ptr); + for (i = *ptr - 1; i >= 0; i--) bad_typeid_dtor(_this + i); + operator_delete(ptr); } else { - MSVCRT_bad_typeid_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); + bad_typeid_dtor(_this); + if (flags & 1) operator_delete(_this); } return _this; } @@ -351,68 +260,64 @@ void * __thiscall MSVCRT_bad_typeid_vector_dtor(bad_typeid * _this, unsigned int /****************************************************************** * ??_Gbad_typeid@@UAEPAXI@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_typeid_scalar_dtor,8) -void * __thiscall MSVCRT_bad_typeid_scalar_dtor(bad_typeid * _this, unsigned int flags) +DEFINE_THISCALL_WRAPPER(bad_typeid_scalar_dtor,8) +void * __thiscall bad_typeid_scalar_dtor(bad_typeid * _this, unsigned int flags) { TRACE("(%p %x)\n", _this, flags); - MSVCRT_bad_typeid_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); + bad_typeid_dtor(_this); + if (flags & 1) operator_delete(_this); return _this; } /****************************************************************** * ??0__non_rtti_object@@QAE@ABV0@@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT___non_rtti_object_copy_ctor,8) -__non_rtti_object * __thiscall MSVCRT___non_rtti_object_copy_ctor(__non_rtti_object * _this, +DEFINE_THISCALL_WRAPPER(__non_rtti_object_copy_ctor,8) +__non_rtti_object * __thiscall __non_rtti_object_copy_ctor(__non_rtti_object * _this, const __non_rtti_object * rhs) { - TRACE("(%p %p)\n", _this, rhs); - MSVCRT_bad_typeid_copy_ctor(_this, rhs); - _this->vtable = &MSVCRT___non_rtti_object_vtable; - return _this; + TRACE("(%p %p)\n", _this, rhs); + return __exception_copy_ctor(_this, rhs, &__non_rtti_object_vtable); } /****************************************************************** * ??0__non_rtti_object@@QAE@PBD@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT___non_rtti_object_ctor,8) -__non_rtti_object * __thiscall MSVCRT___non_rtti_object_ctor(__non_rtti_object * _this, +DEFINE_THISCALL_WRAPPER(__non_rtti_object_ctor,8) +__non_rtti_object * __thiscall __non_rtti_object_ctor(__non_rtti_object * _this, const char * name) { TRACE("(%p %s)\n", _this, name); - EXCEPTION_ctor(_this, &name); - _this->vtable = &MSVCRT___non_rtti_object_vtable; - return _this; + return __exception_ctor(_this, name, &__non_rtti_object_vtable); } /****************************************************************** * ??1__non_rtti_object@@UAE@XZ (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT___non_rtti_object_dtor,4) -void __thiscall MSVCRT___non_rtti_object_dtor(__non_rtti_object * _this) +DEFINE_THISCALL_WRAPPER(__non_rtti_object_dtor,4) +void __thiscall __non_rtti_object_dtor(__non_rtti_object * _this) { TRACE("(%p)\n", _this); - MSVCRT_bad_typeid_dtor(_this); + bad_typeid_dtor(_this); } /****************************************************************** * ??4__non_rtti_object@@QAEAAV0@ABV0@@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT___non_rtti_object_opequals,8) -__non_rtti_object * __thiscall MSVCRT___non_rtti_object_opequals(__non_rtti_object * _this, +DEFINE_THISCALL_WRAPPER(__non_rtti_object_opequals,8) +__non_rtti_object * __thiscall __non_rtti_object_opequals(__non_rtti_object * _this, const __non_rtti_object *rhs) { TRACE("(%p %p)\n", _this, rhs); - MSVCRT_bad_typeid_opequals(_this, rhs); + bad_typeid_opequals(_this, rhs); return _this; } /****************************************************************** * ??_E__non_rtti_object@@UAEPAXI@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT___non_rtti_object_vector_dtor,8) -void * __thiscall MSVCRT___non_rtti_object_vector_dtor(__non_rtti_object * _this, unsigned int flags) +DEFINE_THISCALL_WRAPPER(__non_rtti_object_vector_dtor,8) +void * __thiscall __non_rtti_object_vector_dtor(__non_rtti_object * _this, unsigned int flags) { TRACE("(%p %x)\n", _this, flags); if (flags & 2) @@ -420,13 +325,13 @@ void * __thiscall MSVCRT___non_rtti_object_vector_dtor(__non_rtti_object * _this /* we have an array, with the number of elements stored before the first object */ INT_PTR i, *ptr = (INT_PTR *)_this - 1; - for (i = *ptr - 1; i >= 0; i--) MSVCRT___non_rtti_object_dtor(_this + i); - MSVCRT_operator_delete(ptr); + for (i = *ptr - 1; i >= 0; i--) __non_rtti_object_dtor(_this + i); + operator_delete(ptr); } else { - MSVCRT___non_rtti_object_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); + __non_rtti_object_dtor(_this); + if (flags & 1) operator_delete(_this); } return _this; } @@ -434,12 +339,12 @@ void * __thiscall MSVCRT___non_rtti_object_vector_dtor(__non_rtti_object * _this /****************************************************************** * ??_G__non_rtti_object@@UAEPAXI@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT___non_rtti_object_scalar_dtor,8) -void * __thiscall MSVCRT___non_rtti_object_scalar_dtor(__non_rtti_object * _this, unsigned int flags) +DEFINE_THISCALL_WRAPPER(__non_rtti_object_scalar_dtor,8) +void * __thiscall __non_rtti_object_scalar_dtor(__non_rtti_object * _this, unsigned int flags) { TRACE("(%p %x)\n", _this, flags); - MSVCRT___non_rtti_object_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); + __non_rtti_object_dtor(_this); + if (flags & 1) operator_delete(_this); return _this; } @@ -447,74 +352,68 @@ void * __thiscall MSVCRT___non_rtti_object_scalar_dtor(__non_rtti_object * _this * ??0bad_cast@@AAE@PBQBD@Z (MSVCRT.@) * ??0bad_cast@@QAE@ABQBD@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_cast_ctor,8) -bad_cast * __thiscall MSVCRT_bad_cast_ctor(bad_cast * _this, const char ** name) +DEFINE_THISCALL_WRAPPER(bad_cast_ctor,8) +bad_cast * __thiscall bad_cast_ctor(bad_cast * _this, const char ** name) { TRACE("(%p %s)\n", _this, *name); - EXCEPTION_ctor(_this, name); - _this->vtable = &MSVCRT_bad_cast_vtable; - return _this; + return __exception_ctor(_this, *name, &bad_cast_vtable); } /****************************************************************** * ??0bad_cast@@QAE@ABV0@@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_cast_copy_ctor,8) -bad_cast * __thiscall MSVCRT_bad_cast_copy_ctor(bad_cast * _this, const bad_cast * rhs) +DEFINE_THISCALL_WRAPPER(bad_cast_copy_ctor,8) +bad_cast * __thiscall bad_cast_copy_ctor(bad_cast * _this, const bad_cast * rhs) { TRACE("(%p %p)\n", _this, rhs); - MSVCRT_exception_copy_ctor(_this, rhs); - _this->vtable = &MSVCRT_bad_cast_vtable; - return _this; + return __exception_copy_ctor(_this, rhs, &bad_cast_vtable); } /****************************************************************** * ??0bad_cast@@QAE@PBD@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_cast_ctor_charptr,8) -bad_cast * __thiscall MSVCRT_bad_cast_ctor_charptr(bad_cast * _this, const char * name) +DEFINE_THISCALL_WRAPPER(bad_cast_ctor_charptr,8) +bad_cast * __thiscall bad_cast_ctor_charptr(bad_cast * _this, const char * name) { TRACE("(%p %s)\n", _this, name); - EXCEPTION_ctor(_this, &name); - _this->vtable = &MSVCRT_bad_cast_vtable; - return _this; + return __exception_ctor(_this, name, &bad_cast_vtable); } /****************************************************************** * ??_Fbad_cast@@QAEXXZ (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_cast_default_ctor,4) -bad_cast * __thiscall MSVCRT_bad_cast_default_ctor(bad_cast * _this) +DEFINE_THISCALL_WRAPPER(bad_cast_default_ctor,4) +bad_cast * __thiscall bad_cast_default_ctor(bad_cast * _this) { - return MSVCRT_bad_cast_ctor_charptr( _this, "bad cast" ); + return bad_cast_ctor_charptr( _this, "bad cast" ); } /****************************************************************** * ??1bad_cast@@UAE@XZ (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_cast_dtor,4) -void __thiscall MSVCRT_bad_cast_dtor(bad_cast * _this) +DEFINE_THISCALL_WRAPPER(bad_cast_dtor,4) +void __thiscall bad_cast_dtor(bad_cast * _this) { TRACE("(%p)\n", _this); - MSVCRT_exception_dtor(_this); + exception_dtor(_this); } /****************************************************************** * ??4bad_cast@@QAEAAV0@ABV0@@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_cast_opequals,8) -bad_cast * __thiscall MSVCRT_bad_cast_opequals(bad_cast * _this, const bad_cast * rhs) +DEFINE_THISCALL_WRAPPER(bad_cast_opequals,8) +bad_cast * __thiscall bad_cast_opequals(bad_cast * _this, const bad_cast * rhs) { TRACE("(%p %p)\n", _this, rhs); - MSVCRT_exception_opequals(_this, rhs); + exception_opequals(_this, rhs); return _this; } /****************************************************************** * ??_Ebad_cast@@UAEPAXI@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_cast_vector_dtor,8) -void * __thiscall MSVCRT_bad_cast_vector_dtor(bad_cast * _this, unsigned int flags) +DEFINE_THISCALL_WRAPPER(bad_cast_vector_dtor,8) +void * __thiscall bad_cast_vector_dtor(bad_cast * _this, unsigned int flags) { TRACE("(%p %x)\n", _this, flags); if (flags & 2) @@ -522,13 +421,13 @@ void * __thiscall MSVCRT_bad_cast_vector_dtor(bad_cast * _this, unsigned int fla /* we have an array, with the number of elements stored before the first object */ INT_PTR i, *ptr = (INT_PTR *)_this - 1; - for (i = *ptr - 1; i >= 0; i--) MSVCRT_bad_cast_dtor(_this + i); - MSVCRT_operator_delete(ptr); + for (i = *ptr - 1; i >= 0; i--) bad_cast_dtor(_this + i); + operator_delete(ptr); } else { - MSVCRT_bad_cast_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); + bad_cast_dtor(_this); + if (flags & 1) operator_delete(_this); } return _this; } @@ -536,20 +435,20 @@ void * __thiscall MSVCRT_bad_cast_vector_dtor(bad_cast * _this, unsigned int fla /****************************************************************** * ??_Gbad_cast@@UAEPAXI@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_cast_scalar_dtor,8) -void * __thiscall MSVCRT_bad_cast_scalar_dtor(bad_cast * _this, unsigned int flags) +DEFINE_THISCALL_WRAPPER(bad_cast_scalar_dtor,8) +void * __thiscall bad_cast_scalar_dtor(bad_cast * _this, unsigned int flags) { TRACE("(%p %x)\n", _this, flags); - MSVCRT_bad_cast_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); + bad_cast_dtor(_this); + if (flags & 1) operator_delete(_this); return _this; } /****************************************************************** * ??8type_info@@QBEHABV0@@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_type_info_opequals_equals,8) -int __thiscall MSVCRT_type_info_opequals_equals(type_info * _this, const type_info * rhs) +DEFINE_THISCALL_WRAPPER(type_info_opequals_equals,8) +int __thiscall type_info_opequals_equals(type_info * _this, const type_info * rhs) { int ret = !strcmp(_this->mangled + 1, rhs->mangled + 1); TRACE("(%p %p) returning %d\n", _this, rhs, ret); @@ -559,8 +458,8 @@ int __thiscall MSVCRT_type_info_opequals_equals(type_info * _this, const type_in /****************************************************************** * ??9type_info@@QBEHABV0@@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_type_info_opnot_equals,8) -int __thiscall MSVCRT_type_info_opnot_equals(type_info * _this, const type_info * rhs) +DEFINE_THISCALL_WRAPPER(type_info_opnot_equals,8) +int __thiscall type_info_opnot_equals(type_info * _this, const type_info * rhs) { int ret = !!strcmp(_this->mangled + 1, rhs->mangled + 1); TRACE("(%p %p) returning %d\n", _this, rhs, ret); @@ -570,8 +469,8 @@ int __thiscall MSVCRT_type_info_opnot_equals(type_info * _this, const type_info /****************************************************************** * ?before@type_info@@QBEHABV1@@Z (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_type_info_before,8) -int __thiscall MSVCRT_type_info_before(type_info * _this, const type_info * rhs) +DEFINE_THISCALL_WRAPPER(type_info_before,8) +int __thiscall type_info_before(type_info * _this, const type_info * rhs) { int ret = strcmp(_this->mangled + 1, rhs->mangled + 1) < 0; TRACE("(%p %p) returning %d\n", _this, rhs, ret); @@ -581,18 +480,18 @@ int __thiscall MSVCRT_type_info_before(type_info * _this, const type_info * rhs) /****************************************************************** * ??1type_info@@UAE@XZ (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_type_info_dtor,4) -void __thiscall MSVCRT_type_info_dtor(type_info * _this) +DEFINE_THISCALL_WRAPPER(type_info_dtor,4) +void __thiscall type_info_dtor(type_info * _this) { TRACE("(%p)\n", _this); - MSVCRT_free(_this->name); + free(_this->name); } /****************************************************************** * ?name@type_info@@QBEPBDXZ (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_type_info_name,4) -const char * __thiscall MSVCRT_type_info_name(type_info * _this) +DEFINE_THISCALL_WRAPPER(type_info_name,4) +const char * __thiscall type_info_name(type_info * _this) { if (!_this->name) { @@ -602,7 +501,7 @@ const char * __thiscall MSVCRT_type_info_name(type_info * _this) * Is this '.' really part of the mangled name, or has it some other meaning ? */ char* name = __unDName(0, _this->mangled + 1, 0, - MSVCRT_malloc, MSVCRT_free, UNDNAME_NO_ARGUMENTS | UNDNAME_32_BIT_DECODE); + malloc, free, UNDNAME_NO_ARGUMENTS | UNDNAME_32_BIT_DECODE); if (name) { unsigned int len = strlen(name); @@ -614,7 +513,7 @@ const char * __thiscall MSVCRT_type_info_name(type_info * _this) if (InterlockedCompareExchangePointer((void**)&_this->name, name, NULL)) { /* Another thread set this member since we checked above - use it */ - MSVCRT_free(name); + free(name); } } } @@ -625,475 +524,76 @@ const char * __thiscall MSVCRT_type_info_name(type_info * _this) /****************************************************************** * ?raw_name@type_info@@QBEPBDXZ (MSVCRT.@) */ -DEFINE_THISCALL_WRAPPER(MSVCRT_type_info_raw_name,4) -const char * __thiscall MSVCRT_type_info_raw_name(type_info * _this) +DEFINE_THISCALL_WRAPPER(type_info_raw_name,4) +const char * __thiscall type_info_raw_name(type_info * _this) { TRACE("(%p) returning %s\n", _this, _this->mangled); return _this->mangled; } -/* Unexported */ -DEFINE_THISCALL_WRAPPER(MSVCRT_type_info_vector_dtor,8) -void * __thiscall MSVCRT_type_info_vector_dtor(type_info * _this, unsigned int flags) -{ - TRACE("(%p %x)\n", _this, flags); - if (flags & 2) - { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)_this - 1; - - for (i = *ptr - 1; i >= 0; i--) MSVCRT_type_info_dtor(_this + i); - MSVCRT_operator_delete(ptr); - } - else - { - MSVCRT_type_info_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); - } - return _this; -} - #if _MSVCR_VER >= 80 typedef exception bad_alloc; -extern const vtable_ptr MSVCRT_bad_alloc_vtable; - -static void bad_alloc_ctor(bad_alloc *this, const char **name) -{ - MSVCRT_exception_ctor(this, name); - this->vtable = &MSVCRT_bad_alloc_vtable; -} +extern const vtable_ptr bad_alloc_vtable; /* bad_alloc class implementation */ -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_alloc_copy_ctor,8) -bad_alloc * __thiscall MSVCRT_bad_alloc_copy_ctor(bad_alloc * _this, const bad_alloc * rhs) +DEFINE_THISCALL_WRAPPER(bad_alloc_copy_ctor,8) +bad_alloc * __thiscall bad_alloc_copy_ctor(bad_alloc * _this, const bad_alloc * rhs) { TRACE("(%p %p)\n", _this, rhs); - MSVCRT_exception_copy_ctor(_this, rhs); - _this->vtable = &MSVCRT_bad_alloc_vtable; - return _this; + return __exception_copy_ctor(_this, rhs, &bad_alloc_vtable); } -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_alloc_dtor,4) -void __thiscall MSVCRT_bad_alloc_dtor(bad_alloc * _this) +DEFINE_THISCALL_WRAPPER(bad_alloc_dtor,4) +void __thiscall bad_alloc_dtor(bad_alloc * _this) { TRACE("(%p)\n", _this); - MSVCRT_exception_dtor(_this); + exception_dtor(_this); } #endif /* _MSVCR_VER >= 80 */ -#if _MSVCR_VER >= 100 +__ASM_BLOCK_BEGIN(vtables) -typedef struct { - exception e; - HRESULT hr; -} scheduler_resource_allocation_error; -extern const vtable_ptr MSVCRT_scheduler_resource_allocation_error_vtable; - -/* ??0scheduler_resource_allocation_error@Concurrency@@QAE@PBDJ@Z */ -/* ??0scheduler_resource_allocation_error@Concurrency@@QEAA@PEBDJ@Z */ -DEFINE_THISCALL_WRAPPER(scheduler_resource_allocation_error_ctor_name, 12) -scheduler_resource_allocation_error* __thiscall scheduler_resource_allocation_error_ctor_name( - scheduler_resource_allocation_error *this, const char *name, HRESULT hr) -{ - TRACE("(%p %s %x)\n", this, wine_dbgstr_a(name), hr); - MSVCRT_exception_ctor(&this->e, &name); - this->e.vtable = &MSVCRT_scheduler_resource_allocation_error_vtable; - this->hr = hr; - return this; -} - -/* ??0scheduler_resource_allocation_error@Concurrency@@QAE@J@Z */ -/* ??0scheduler_resource_allocation_error@Concurrency@@QEAA@J@Z */ -DEFINE_THISCALL_WRAPPER(scheduler_resource_allocation_error_ctor, 8) -scheduler_resource_allocation_error* __thiscall scheduler_resource_allocation_error_ctor( - scheduler_resource_allocation_error *this, HRESULT hr) -{ - return scheduler_resource_allocation_error_ctor_name(this, NULL, hr); -} - -DEFINE_THISCALL_WRAPPER(MSVCRT_scheduler_resource_allocation_error_copy_ctor,8) -scheduler_resource_allocation_error* __thiscall MSVCRT_scheduler_resource_allocation_error_copy_ctor( - scheduler_resource_allocation_error *this, - const scheduler_resource_allocation_error *rhs) -{ - TRACE("(%p,%p)\n", this, rhs); - - if (!rhs->e.do_free) - memcpy(this, rhs, sizeof(*this)); - else - scheduler_resource_allocation_error_ctor_name(this, rhs->e.name, rhs->hr); - return this; -} - -/* ?get_error_code@scheduler_resource_allocation_error@Concurrency@@QBEJXZ */ -/* ?get_error_code@scheduler_resource_allocation_error@Concurrency@@QEBAJXZ */ -DEFINE_THISCALL_WRAPPER(scheduler_resource_allocation_error_get_error_code, 4) -HRESULT __thiscall scheduler_resource_allocation_error_get_error_code( - const scheduler_resource_allocation_error *this) -{ - TRACE("(%p)\n", this); - return this->hr; -} - -DEFINE_THISCALL_WRAPPER(MSVCRT_scheduler_resource_allocation_error_dtor,4) -void __thiscall MSVCRT_scheduler_resource_allocation_error_dtor( - scheduler_resource_allocation_error * this) -{ - TRACE("(%p)\n", this); - MSVCRT_exception_dtor(&this->e); -} - -typedef exception improper_lock; -extern const vtable_ptr MSVCRT_improper_lock_vtable; - -/* ??0improper_lock@Concurrency@@QAE@PBD@Z */ -/* ??0improper_lock@Concurrency@@QEAA@PEBD@Z */ -DEFINE_THISCALL_WRAPPER(improper_lock_ctor_str, 8) -improper_lock* __thiscall improper_lock_ctor_str(improper_lock *this, const char *str) -{ - TRACE("(%p %p)\n", this, str); - MSVCRT_exception_ctor(this, &str); - this->vtable = &MSVCRT_improper_lock_vtable; - return this; -} - -/* ??0improper_lock@Concurrency@@QAE@XZ */ -/* ??0improper_lock@Concurrency@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(improper_lock_ctor, 4) -improper_lock* __thiscall improper_lock_ctor(improper_lock *this) -{ - return improper_lock_ctor_str(this, NULL); -} - -DEFINE_THISCALL_WRAPPER(MSVCRT_improper_lock_copy_ctor,8) -improper_lock * __thiscall MSVCRT_improper_lock_copy_ctor(improper_lock * _this, const improper_lock * rhs) -{ - TRACE("(%p %p)\n", _this, rhs); - MSVCRT_exception_copy_ctor(_this, rhs); - _this->vtable = &MSVCRT_improper_lock_vtable; - return _this; -} - -DEFINE_THISCALL_WRAPPER(MSVCRT_improper_lock_dtor,4) -void __thiscall MSVCRT_improper_lock_dtor(improper_lock * _this) -{ - TRACE("(%p)\n", _this); - MSVCRT_exception_dtor(_this); -} - -typedef exception invalid_scheduler_policy_key; -extern const vtable_ptr MSVCRT_invalid_scheduler_policy_key_vtable; - -/* ??0invalid_scheduler_policy_key@Concurrency@@QAE@PBD@Z */ -/* ??0invalid_scheduler_policy_key@Concurrency@@QEAA@PEBD@Z */ -DEFINE_THISCALL_WRAPPER(invalid_scheduler_policy_key_ctor_str, 8) -invalid_scheduler_policy_key* __thiscall invalid_scheduler_policy_key_ctor_str( - invalid_scheduler_policy_key *this, const char *str) -{ - TRACE("(%p %p)\n", this, str); - MSVCRT_exception_ctor(this, &str); - this->vtable = &MSVCRT_invalid_scheduler_policy_key_vtable; - return this; -} - -/* ??0invalid_scheduler_policy_key@Concurrency@@QAE@XZ */ -/* ??0invalid_scheduler_policy_key@Concurrency@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(invalid_scheduler_policy_key_ctor, 4) -invalid_scheduler_policy_key* __thiscall invalid_scheduler_policy_key_ctor( - invalid_scheduler_policy_key *this) -{ - return invalid_scheduler_policy_key_ctor_str(this, NULL); -} - -DEFINE_THISCALL_WRAPPER(MSVCRT_invalid_scheduler_policy_key_copy_ctor,8) -invalid_scheduler_policy_key * __thiscall MSVCRT_invalid_scheduler_policy_key_copy_ctor( - invalid_scheduler_policy_key * _this, const invalid_scheduler_policy_key * rhs) -{ - TRACE("(%p %p)\n", _this, rhs); - MSVCRT_exception_copy_ctor(_this, rhs); - _this->vtable = &MSVCRT_invalid_scheduler_policy_key_vtable; - return _this; -} - -DEFINE_THISCALL_WRAPPER(MSVCRT_invalid_scheduler_policy_key_dtor,4) -void __thiscall MSVCRT_invalid_scheduler_policy_key_dtor( - invalid_scheduler_policy_key * _this) -{ - TRACE("(%p)\n", _this); - MSVCRT_exception_dtor(_this); -} - -typedef exception invalid_scheduler_policy_value; -extern const vtable_ptr MSVCRT_invalid_scheduler_policy_value_vtable; - -/* ??0invalid_scheduler_policy_value@Concurrency@@QAE@PBD@Z */ -/* ??0invalid_scheduler_policy_value@Concurrency@@QEAA@PEBD@Z */ -DEFINE_THISCALL_WRAPPER(invalid_scheduler_policy_value_ctor_str, 8) -invalid_scheduler_policy_value* __thiscall invalid_scheduler_policy_value_ctor_str( - invalid_scheduler_policy_value *this, const char *str) -{ - TRACE("(%p %p)\n", this, str); - MSVCRT_exception_ctor(this, &str); - this->vtable = &MSVCRT_invalid_scheduler_policy_value_vtable; - return this; -} - -/* ??0invalid_scheduler_policy_value@Concurrency@@QAE@XZ */ -/* ??0invalid_scheduler_policy_value@Concurrency@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(invalid_scheduler_policy_value_ctor, 4) -invalid_scheduler_policy_value* __thiscall invalid_scheduler_policy_value_ctor( - invalid_scheduler_policy_value *this) -{ - return invalid_scheduler_policy_value_ctor_str(this, NULL); -} - -DEFINE_THISCALL_WRAPPER(MSVCRT_invalid_scheduler_policy_value_copy_ctor,8) -invalid_scheduler_policy_value * __thiscall MSVCRT_invalid_scheduler_policy_value_copy_ctor( - invalid_scheduler_policy_value * _this, const invalid_scheduler_policy_value * rhs) -{ - TRACE("(%p %p)\n", _this, rhs); - MSVCRT_exception_copy_ctor(_this, rhs); - _this->vtable = &MSVCRT_invalid_scheduler_policy_value_vtable; - return _this; -} - -DEFINE_THISCALL_WRAPPER(MSVCRT_invalid_scheduler_policy_value_dtor,4) -void __thiscall MSVCRT_invalid_scheduler_policy_value_dtor( - invalid_scheduler_policy_value * _this) -{ - TRACE("(%p)\n", _this); - MSVCRT_exception_dtor(_this); -} - -typedef exception invalid_scheduler_policy_thread_specification; -extern const vtable_ptr MSVCRT_invalid_scheduler_policy_thread_specification_vtable; - -/* ??0invalid_scheduler_policy_thread_specification@Concurrency@@QAE@PBD@Z */ -/* ??0invalid_scheduler_policy_thread_specification@Concurrency@@QEAA@PEBD@Z */ -DEFINE_THISCALL_WRAPPER(invalid_scheduler_policy_thread_specification_ctor_str, 8) -invalid_scheduler_policy_thread_specification* __thiscall invalid_scheduler_policy_thread_specification_ctor_str( - invalid_scheduler_policy_thread_specification *this, const char *str) -{ - TRACE("(%p %p)\n", this, str); - MSVCRT_exception_ctor(this, &str); - this->vtable = &MSVCRT_invalid_scheduler_policy_thread_specification_vtable; - return this; -} - -/* ??0invalid_scheduler_policy_thread_specification@Concurrency@@QAE@XZ */ -/* ??0invalid_scheduler_policy_thread_specification@Concurrency@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(invalid_scheduler_policy_thread_specification_ctor, 4) -invalid_scheduler_policy_thread_specification* __thiscall invalid_scheduler_policy_thread_specification_ctor( - invalid_scheduler_policy_thread_specification *this) -{ - return invalid_scheduler_policy_thread_specification_ctor_str(this, NULL); -} - -DEFINE_THISCALL_WRAPPER(MSVCRT_invalid_scheduler_policy_thread_specification_copy_ctor,8) -invalid_scheduler_policy_thread_specification * __thiscall MSVCRT_invalid_scheduler_policy_thread_specification_copy_ctor( - invalid_scheduler_policy_thread_specification * _this, const invalid_scheduler_policy_thread_specification * rhs) -{ - TRACE("(%p %p)\n", _this, rhs); - MSVCRT_exception_copy_ctor(_this, rhs); - _this->vtable = &MSVCRT_invalid_scheduler_policy_thread_specification_vtable; - return _this; -} - -DEFINE_THISCALL_WRAPPER(MSVCRT_invalid_scheduler_policy_thread_specification_dtor,4) -void __thiscall MSVCRT_invalid_scheduler_policy_thread_specification_dtor( - invalid_scheduler_policy_thread_specification * _this) -{ - TRACE("(%p)\n", _this); - MSVCRT_exception_dtor(_this); -} - -typedef exception improper_scheduler_attach; -extern const vtable_ptr MSVCRT_improper_scheduler_attach_vtable; - -/* ??0improper_scheduler_attach@Concurrency@@QAE@PBD@Z */ -/* ??0improper_scheduler_attach@Concurrency@@QEAA@PEBD@Z */ -DEFINE_THISCALL_WRAPPER(improper_scheduler_attach_ctor_str, 8) -improper_scheduler_attach* __thiscall improper_scheduler_attach_ctor_str( - improper_scheduler_attach *this, const char *str) -{ - TRACE("(%p %p)\n", this, str); - MSVCRT_exception_ctor(this, &str); - this->vtable = &MSVCRT_improper_scheduler_attach_vtable; - return this; -} - -/* ??0improper_scheduler_attach@Concurrency@@QAE@XZ */ -/* ??0improper_scheduler_attach@Concurrency@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(improper_scheduler_attach_ctor, 4) -improper_scheduler_attach* __thiscall improper_scheduler_attach_ctor( - improper_scheduler_attach *this) -{ - return improper_scheduler_attach_ctor_str(this, NULL); -} - -DEFINE_THISCALL_WRAPPER(MSVCRT_improper_scheduler_attach_copy_ctor,8) -improper_scheduler_attach * __thiscall MSVCRT_improper_scheduler_attach_copy_ctor( - improper_scheduler_attach * _this, const improper_scheduler_attach * rhs) -{ - TRACE("(%p %p)\n", _this, rhs); - MSVCRT_exception_copy_ctor(_this, rhs); - _this->vtable = &MSVCRT_improper_scheduler_attach_vtable; - return _this; -} - -DEFINE_THISCALL_WRAPPER(MSVCRT_improper_scheduler_attach_dtor,4) -void __thiscall MSVCRT_improper_scheduler_attach_dtor( - improper_scheduler_attach * _this) -{ - TRACE("(%p)\n", _this); - MSVCRT_exception_dtor(_this); -} - -typedef exception improper_scheduler_detach; -extern const vtable_ptr MSVCRT_improper_scheduler_detach_vtable; - -/* ??0improper_scheduler_detach@Concurrency@@QAE@PBD@Z */ -/* ??0improper_scheduler_detach@Concurrency@@QEAA@PEBD@Z */ -DEFINE_THISCALL_WRAPPER(improper_scheduler_detach_ctor_str, 8) -improper_scheduler_detach* __thiscall improper_scheduler_detach_ctor_str( - improper_scheduler_detach *this, const char *str) -{ - TRACE("(%p %p)\n", this, str); - MSVCRT_exception_ctor(this, &str); - this->vtable = &MSVCRT_improper_scheduler_detach_vtable; - return this; -} - -/* ??0improper_scheduler_detach@Concurrency@@QAE@XZ */ -/* ??0improper_scheduler_detach@Concurrency@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(improper_scheduler_detach_ctor, 4) -improper_scheduler_detach* __thiscall improper_scheduler_detach_ctor( - improper_scheduler_detach *this) -{ - return improper_scheduler_detach_ctor_str(this, NULL); -} - -DEFINE_THISCALL_WRAPPER(MSVCRT_improper_scheduler_detach_copy_ctor,8) -improper_scheduler_detach * __thiscall MSVCRT_improper_scheduler_detach_copy_ctor( - improper_scheduler_detach * _this, const improper_scheduler_detach * rhs) -{ - TRACE("(%p %p)\n", _this, rhs); - MSVCRT_exception_copy_ctor(_this, rhs); - _this->vtable = &MSVCRT_improper_scheduler_detach_vtable; - return _this; -} - -DEFINE_THISCALL_WRAPPER(MSVCRT_improper_scheduler_detach_dtor,4) -void __thiscall MSVCRT_improper_scheduler_detach_dtor( - improper_scheduler_detach * _this) -{ - TRACE("(%p)\n", _this); - MSVCRT_exception_dtor(_this); -} - -#endif /* _MSVCR_VER >= 100 */ - -#ifndef __GNUC__ -void __asm_dummy_vtables(void) { -#endif - -__ASM_VTABLE(type_info, - VTABLE_ADD_FUNC(MSVCRT_type_info_vector_dtor)); -__ASM_VTABLE(exception, - VTABLE_ADD_FUNC(MSVCRT_exception_vector_dtor) - VTABLE_ADD_FUNC(MSVCRT_what_exception)); #if _MSVCR_VER >= 80 __ASM_VTABLE(exception_old, - VTABLE_ADD_FUNC(MSVCRT_exception_vector_dtor) - VTABLE_ADD_FUNC(MSVCRT_what_exception)); + VTABLE_ADD_FUNC(exception_vector_dtor) + VTABLE_ADD_FUNC(exception_what)); __ASM_VTABLE(bad_alloc, - VTABLE_ADD_FUNC(MSVCRT_exception_vector_dtor) - VTABLE_ADD_FUNC(MSVCRT_what_exception)); + VTABLE_ADD_FUNC(exception_vector_dtor) + VTABLE_ADD_FUNC(exception_what)); #endif __ASM_VTABLE(bad_typeid, - VTABLE_ADD_FUNC(MSVCRT_bad_typeid_vector_dtor) - VTABLE_ADD_FUNC(MSVCRT_what_exception)); + VTABLE_ADD_FUNC(bad_typeid_vector_dtor) + VTABLE_ADD_FUNC(exception_what)); __ASM_VTABLE(bad_cast, - VTABLE_ADD_FUNC(MSVCRT_bad_cast_vector_dtor) - VTABLE_ADD_FUNC(MSVCRT_what_exception)); + VTABLE_ADD_FUNC(bad_cast_vector_dtor) + VTABLE_ADD_FUNC(exception_what)); __ASM_VTABLE(__non_rtti_object, - VTABLE_ADD_FUNC(MSVCRT___non_rtti_object_vector_dtor) - VTABLE_ADD_FUNC(MSVCRT_what_exception)); -#if _MSVCR_VER >= 100 -__ASM_VTABLE(scheduler_resource_allocation_error, - VTABLE_ADD_FUNC(MSVCRT_exception_vector_dtor) - VTABLE_ADD_FUNC(MSVCRT_what_exception)); -__ASM_VTABLE(improper_lock, - VTABLE_ADD_FUNC(MSVCRT_exception_vector_dtor) - VTABLE_ADD_FUNC(MSVCRT_what_exception)); -__ASM_VTABLE(invalid_scheduler_policy_key, - VTABLE_ADD_FUNC(MSVCRT_exception_vector_dtor) - VTABLE_ADD_FUNC(MSVCRT_what_exception)); -__ASM_VTABLE(invalid_scheduler_policy_value, - VTABLE_ADD_FUNC(MSVCRT_exception_vector_dtor) - VTABLE_ADD_FUNC(MSVCRT_what_exception)); -__ASM_VTABLE(invalid_scheduler_policy_thread_specification, - VTABLE_ADD_FUNC(MSVCRT_exception_vector_dtor) - VTABLE_ADD_FUNC(MSVCRT_what_exception)); -__ASM_VTABLE(improper_scheduler_attach, - VTABLE_ADD_FUNC(MSVCRT_exception_vector_dtor) - VTABLE_ADD_FUNC(MSVCRT_what_exception)); -__ASM_VTABLE(improper_scheduler_detach, - VTABLE_ADD_FUNC(MSVCRT_exception_vector_dtor) - VTABLE_ADD_FUNC(MSVCRT_what_exception)); -#endif + VTABLE_ADD_FUNC(__non_rtti_object_vector_dtor) + VTABLE_ADD_FUNC(exception_what)); -#ifndef __GNUC__ -} -#endif +__ASM_BLOCK_END -DEFINE_RTTI_DATA0( type_info, 0, ".?AVtype_info@@" ) #if _MSVCR_VER >= 80 -DEFINE_RTTI_DATA0( exception, 0, ".?AVexception@std@@" ) DEFINE_RTTI_DATA0( exception_old, 0, ".?AVexception@@" ) DEFINE_RTTI_DATA1( bad_typeid, 0, &exception_rtti_base_descriptor, ".?AVbad_typeid@std@@" ) DEFINE_RTTI_DATA1( bad_cast, 0, &exception_rtti_base_descriptor, ".?AVbad_cast@std@@" ) DEFINE_RTTI_DATA2( __non_rtti_object, 0, &bad_typeid_rtti_base_descriptor, &exception_rtti_base_descriptor, ".?AV__non_rtti_object@std@@" ) DEFINE_RTTI_DATA1( bad_alloc, 0, &exception_rtti_base_descriptor, ".?AVbad_alloc@std@@" ) #else -DEFINE_RTTI_DATA0( exception, 0, ".?AVexception@@" ) DEFINE_RTTI_DATA1( bad_typeid, 0, &exception_rtti_base_descriptor, ".?AVbad_typeid@@" ) DEFINE_RTTI_DATA1( bad_cast, 0, &exception_rtti_base_descriptor, ".?AVbad_cast@@" ) DEFINE_RTTI_DATA2( __non_rtti_object, 0, &bad_typeid_rtti_base_descriptor, &exception_rtti_base_descriptor, ".?AV__non_rtti_object@@" ) #endif -#if _MSVCR_VER >= 100 -DEFINE_RTTI_DATA1(scheduler_resource_allocation_error, 0, &exception_rtti_base_descriptor, - ".?AVscheduler_resource_allocation_error@Concurrency@@") -DEFINE_RTTI_DATA1(improper_lock, 0, &exception_rtti_base_descriptor, ".?AVimproper_lock@Concurrency@@" ) -DEFINE_RTTI_DATA1(invalid_scheduler_policy_key, 0, &exception_rtti_base_descriptor, - ".?AVinvalid_scheduler_policy_key@Concurrency@@" ) -DEFINE_RTTI_DATA1(invalid_scheduler_policy_value, 0, &exception_rtti_base_descriptor, - ".?AVinvalid_scheduler_policy_value@Concurrency@@" ) -DEFINE_RTTI_DATA1(invalid_scheduler_policy_thread_specification, 0, &exception_rtti_base_descriptor, - ".?AVinvalid_scheduler_policy_thread_specification@Concurrency@@" ) -DEFINE_RTTI_DATA1(improper_scheduler_attach, 0, &exception_rtti_base_descriptor, - ".?AVimproper_scheduler_attach@Concurrency@@" ) -DEFINE_RTTI_DATA1(improper_scheduler_detach, 0, &exception_rtti_base_descriptor, - ".?AVimproper_scheduler_detach@Concurrency@@" ) -#endif -DEFINE_EXCEPTION_TYPE_INFO( exception, 0, NULL, NULL ) -DEFINE_EXCEPTION_TYPE_INFO( bad_typeid, 1, &exception_cxx_type_info, NULL ) -DEFINE_EXCEPTION_TYPE_INFO( bad_cast, 1, &exception_cxx_type_info, NULL ) -DEFINE_EXCEPTION_TYPE_INFO( __non_rtti_object, 2, &bad_typeid_cxx_type_info, &exception_cxx_type_info ) +DEFINE_CXX_EXCEPTION0( exception, exception_dtor ) +DEFINE_CXX_DATA1( bad_typeid, &exception_cxx_type_info, bad_typeid_dtor ) +DEFINE_CXX_DATA1( bad_cast, &exception_cxx_type_info, bad_cast_dtor ) +DEFINE_CXX_DATA2( __non_rtti_object, &bad_typeid_cxx_type_info, + &exception_cxx_type_info, __non_rtti_object_dtor ) #if _MSVCR_VER >= 80 -DEFINE_EXCEPTION_TYPE_INFO( bad_alloc, 1, &exception_cxx_type_info, NULL ) -#endif -#if _MSVCR_VER >= 100 -DEFINE_EXCEPTION_TYPE_INFO(scheduler_resource_allocation_error, 1, &exception_cxx_type_info, NULL) -DEFINE_EXCEPTION_TYPE_INFO(improper_lock, 1, &exception_cxx_type_info, NULL) -DEFINE_EXCEPTION_TYPE_INFO(invalid_scheduler_policy_key, 1, &exception_cxx_type_info, NULL) -DEFINE_EXCEPTION_TYPE_INFO(invalid_scheduler_policy_value, 1, &exception_cxx_type_info, NULL) -DEFINE_EXCEPTION_TYPE_INFO(invalid_scheduler_policy_thread_specification, 1, &exception_cxx_type_info, NULL) -DEFINE_EXCEPTION_TYPE_INFO(improper_scheduler_attach, 1, &exception_cxx_type_info, NULL) -DEFINE_EXCEPTION_TYPE_INFO(improper_scheduler_detach, 1, &exception_cxx_type_info, NULL) +DEFINE_CXX_DATA1( bad_alloc, &exception_cxx_type_info, bad_alloc_dtor ) #endif void msvcrt_init_exception(void *base) @@ -1108,15 +608,6 @@ void msvcrt_init_exception(void *base) init_bad_typeid_rtti(base); init_bad_cast_rtti(base); init___non_rtti_object_rtti(base); -#if _MSVCR_VER >= 100 - init_scheduler_resource_allocation_error_rtti(base); - init_improper_lock_rtti(base); - init_invalid_scheduler_policy_key_rtti(base); - init_invalid_scheduler_policy_value_rtti(base); - init_invalid_scheduler_policy_thread_specification_rtti(base); - init_improper_scheduler_attach_rtti(base); - init_improper_scheduler_detach_rtti(base); -#endif init_exception_cxx(base); init_bad_typeid_cxx(base); @@ -1125,65 +616,15 @@ void msvcrt_init_exception(void *base) #if _MSVCR_VER >= 80 init_bad_alloc_cxx(base); #endif -#if _MSVCR_VER >= 100 - init_scheduler_resource_allocation_error_cxx(base); - init_improper_lock_cxx(base); - init_invalid_scheduler_policy_key_cxx(base); - init_invalid_scheduler_policy_value_cxx(base); - init_invalid_scheduler_policy_thread_specification_cxx(base); - init_improper_scheduler_attach_cxx(base); - init_improper_scheduler_detach_cxx(base); -#endif #endif } #if _MSVCR_VER >= 80 -void throw_exception(exception_type et, HRESULT hr, const char *str) +void throw_bad_alloc(void) { - switch(et) { - case EXCEPTION_BAD_ALLOC: { - bad_alloc e; - bad_alloc_ctor(&e, &str); - _CxxThrowException(&e, &bad_alloc_exception_type); - } -#if _MSVCR_VER >= 100 - case EXCEPTION_SCHEDULER_RESOURCE_ALLOCATION_ERROR: { - scheduler_resource_allocation_error e; - scheduler_resource_allocation_error_ctor_name(&e, str, hr); - _CxxThrowException(&e.e, &scheduler_resource_allocation_error_exception_type); - } - case EXCEPTION_IMPROPER_LOCK: { - improper_lock e; - improper_lock_ctor_str(&e, str); - _CxxThrowException(&e, &improper_lock_exception_type); - } - case EXCEPTION_INVALID_SCHEDULER_POLICY_KEY: { - invalid_scheduler_policy_key e; - invalid_scheduler_policy_key_ctor_str(&e, str); - _CxxThrowException(&e, &invalid_scheduler_policy_key_exception_type); - } - case EXCEPTION_INVALID_SCHEDULER_POLICY_VALUE: { - invalid_scheduler_policy_value e; - invalid_scheduler_policy_value_ctor_str(&e, str); - _CxxThrowException(&e, &invalid_scheduler_policy_value_exception_type); - } - case EXCEPTION_INVALID_SCHEDULER_POLICY_THREAD_SPECIFICATION: { - invalid_scheduler_policy_thread_specification e; - invalid_scheduler_policy_thread_specification_ctor_str(&e, str); - _CxxThrowException(&e, &invalid_scheduler_policy_thread_specification_exception_type); - } - case EXCEPTION_IMPROPER_SCHEDULER_ATTACH: { - improper_scheduler_attach e; - improper_scheduler_attach_ctor_str(&e, str); - _CxxThrowException(&e, &improper_scheduler_attach_exception_type); - } - case EXCEPTION_IMPROPER_SCHEDULER_DETACH: { - improper_scheduler_detach e; - improper_scheduler_detach_ctor_str(&e, str); - _CxxThrowException(&e, &improper_scheduler_detach_exception_type); - } -#endif - } + bad_alloc e; + __exception_ctor(&e, "bad allocation", &bad_alloc_vtable); + _CxxThrowException(&e, &bad_alloc_exception_type); } #endif @@ -1198,10 +639,10 @@ void throw_exception(exception_type et, HRESULT hr, const char *str) * RETURNS * The previously installed handler function, if any. */ -MSVCRT_terminate_function CDECL MSVCRT_set_terminate(MSVCRT_terminate_function func) +terminate_function CDECL set_terminate(terminate_function func) { thread_data_t *data = msvcrt_get_thread_data(); - MSVCRT_terminate_function previous = data->terminate_handler; + terminate_function previous = data->terminate_handler; TRACE("(%p) returning %p\n",func,previous); data->terminate_handler = func; return previous; @@ -1210,7 +651,7 @@ MSVCRT_terminate_function CDECL MSVCRT_set_terminate(MSVCRT_terminate_function f /****************************************************************** * _get_terminate (MSVCRT.@) */ -MSVCRT_terminate_function CDECL MSVCRT__get_terminate(void) +terminate_function CDECL _get_terminate(void) { thread_data_t *data = msvcrt_get_thread_data(); TRACE("returning %p\n", data->terminate_handler); @@ -1228,10 +669,10 @@ MSVCRT_terminate_function CDECL MSVCRT__get_terminate(void) * RETURNS * The previously installed handler function, if any. */ -MSVCRT_unexpected_function CDECL MSVCRT_set_unexpected(MSVCRT_unexpected_function func) +unexpected_function CDECL set_unexpected(unexpected_function func) { thread_data_t *data = msvcrt_get_thread_data(); - MSVCRT_unexpected_function previous = data->unexpected_handler; + unexpected_function previous = data->unexpected_handler; TRACE("(%p) returning %p\n",func,previous); data->unexpected_handler = func; return previous; @@ -1240,7 +681,7 @@ MSVCRT_unexpected_function CDECL MSVCRT_set_unexpected(MSVCRT_unexpected_functio /****************************************************************** * _get_unexpected (MSVCRT.@) */ -MSVCRT_unexpected_function CDECL MSVCRT__get_unexpected(void) +unexpected_function CDECL _get_unexpected(void) { thread_data_t *data = msvcrt_get_thread_data(); TRACE("returning %p\n", data->unexpected_handler); @@ -1250,10 +691,10 @@ MSVCRT_unexpected_function CDECL MSVCRT__get_unexpected(void) /****************************************************************** * ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z (MSVCRT.@) */ -MSVCRT__se_translator_function CDECL MSVCRT__set_se_translator(MSVCRT__se_translator_function func) +_se_translator_function CDECL _set_se_translator(_se_translator_function func) { thread_data_t *data = msvcrt_get_thread_data(); - MSVCRT__se_translator_function previous = data->se_translator; + _se_translator_function previous = data->se_translator; TRACE("(%p) returning %p\n",func,previous); data->se_translator = func; return previous; @@ -1272,21 +713,21 @@ MSVCRT__se_translator_function CDECL MSVCRT__set_se_translator(MSVCRT__se_transl * handler installed by calling set_terminate(), or (by default) abort() * is called. */ -void CDECL MSVCRT_terminate(void) +void CDECL terminate(void) { thread_data_t *data = msvcrt_get_thread_data(); if (data->terminate_handler) data->terminate_handler(); - MSVCRT_abort(); + abort(); } /****************************************************************** * ?unexpected@@YAXXZ (MSVCRT.@) */ -void CDECL MSVCRT_unexpected(void) +void CDECL unexpected(void) { thread_data_t *data = msvcrt_get_thread_data(); if (data->unexpected_handler) data->unexpected_handler(); - MSVCRT_terminate(); + terminate(); } @@ -1309,16 +750,15 @@ void CDECL MSVCRT_unexpected(void) * of using one of the C++ dynamic cast statements. */ #ifndef __x86_64__ -const type_info* CDECL MSVCRT___RTtypeid(void *cppobj) +const type_info* CDECL __RTtypeid(void *cppobj) { const type_info *ret; if (!cppobj) { bad_typeid e; - MSVCRT_bad_typeid_ctor( &e, "Attempted a typeid of NULL pointer!" ); + bad_typeid_ctor( &e, "Attempted a typeid of NULL pointer!" ); _CxxThrowException( &e, &bad_typeid_exception_type ); - return NULL; } __TRY @@ -1329,9 +769,8 @@ const type_info* CDECL MSVCRT___RTtypeid(void *cppobj) __EXCEPT_PAGE_FAULT { __non_rtti_object e; - MSVCRT___non_rtti_object_ctor( &e, "Bad read pointer - no RTTI data!" ); + __non_rtti_object_ctor( &e, "Bad read pointer - no RTTI data!" ); _CxxThrowException( &e, &__non_rtti_object_exception_type ); - return NULL; } __ENDTRY return ret; @@ -1339,16 +778,15 @@ const type_info* CDECL MSVCRT___RTtypeid(void *cppobj) #else -const type_info* CDECL MSVCRT___RTtypeid(void *cppobj) +const type_info* CDECL __RTtypeid(void *cppobj) { const type_info *ret; if (!cppobj) { bad_typeid e; - MSVCRT_bad_typeid_ctor( &e, "Attempted a typeid of NULL pointer!" ); + bad_typeid_ctor( &e, "Attempted a typeid of NULL pointer!" ); _CxxThrowException( &e, &bad_typeid_exception_type ); - return NULL; } __TRY @@ -1366,9 +804,8 @@ const type_info* CDECL MSVCRT___RTtypeid(void *cppobj) __EXCEPT_PAGE_FAULT { __non_rtti_object e; - MSVCRT___non_rtti_object_ctor( &e, "Bad read pointer - no RTTI data!" ); + __non_rtti_object_ctor( &e, "Bad read pointer - no RTTI data!" ); _CxxThrowException( &e, &__non_rtti_object_exception_type ); - return NULL; } __ENDTRY return ret; @@ -1398,7 +835,7 @@ const type_info* CDECL MSVCRT___RTtypeid(void *cppobj) * of using one of the C++ dynamic cast statements. */ #ifndef __x86_64__ -void* CDECL MSVCRT___RTDynamicCast(void *cppobj, int unknown, +void* CDECL __RTDynamicCast(void *cppobj, int unknown, type_info *src, type_info *dst, int do_throw) { @@ -1446,16 +883,15 @@ void* CDECL MSVCRT___RTDynamicCast(void *cppobj, int unknown, { const char *msg = "Bad dynamic_cast!"; bad_cast e; - MSVCRT_bad_cast_ctor( &e, &msg ); + bad_cast_ctor( &e, &msg ); _CxxThrowException( &e, &bad_cast_exception_type ); } } __EXCEPT_PAGE_FAULT { __non_rtti_object e; - MSVCRT___non_rtti_object_ctor( &e, "Access violation - no RTTI data!" ); + __non_rtti_object_ctor( &e, "Access violation - no RTTI data!" ); _CxxThrowException( &e, &__non_rtti_object_exception_type ); - return NULL; } __ENDTRY return ret; @@ -1463,7 +899,7 @@ void* CDECL MSVCRT___RTDynamicCast(void *cppobj, int unknown, #else -void* CDECL MSVCRT___RTDynamicCast(void *cppobj, int unknown, +void* CDECL __RTDynamicCast(void *cppobj, int unknown, type_info *src, type_info *dst, int do_throw) { @@ -1509,16 +945,15 @@ void* CDECL MSVCRT___RTDynamicCast(void *cppobj, int unknown, { const char *msg = "Bad dynamic_cast!"; bad_cast e; - MSVCRT_bad_cast_ctor( &e, &msg ); + bad_cast_ctor( &e, &msg ); _CxxThrowException( &e, &bad_cast_exception_type ); } } __EXCEPT_PAGE_FAULT { __non_rtti_object e; - MSVCRT___non_rtti_object_ctor( &e, "Access violation - no RTTI data!" ); + __non_rtti_object_ctor( &e, "Access violation - no RTTI data!" ); _CxxThrowException( &e, &__non_rtti_object_exception_type ); - return NULL; } __ENDTRY return ret; @@ -1542,7 +977,7 @@ void* CDECL MSVCRT___RTDynamicCast(void *cppobj, int unknown, * This function is usually called by compiler generated code as a result * of using one of the C++ dynamic cast statements. */ -void* CDECL MSVCRT___RTCastToVoid(void *cppobj) +void* CDECL __RTCastToVoid(void *cppobj) { void *ret; @@ -1556,9 +991,8 @@ void* CDECL MSVCRT___RTCastToVoid(void *cppobj) __EXCEPT_PAGE_FAULT { __non_rtti_object e; - MSVCRT___non_rtti_object_ctor( &e, "Access violation - no RTTI data!" ); + __non_rtti_object_ctor( &e, "Access violation - no RTTI data!" ); _CxxThrowException( &e, &__non_rtti_object_exception_type ); - return NULL; } __ENDTRY return ret; @@ -1569,7 +1003,7 @@ void* CDECL MSVCRT___RTCastToVoid(void *cppobj) * _CxxThrowException (MSVCRT.@) */ #ifndef __x86_64__ -void WINAPI _CxxThrowException( exception *object, const cxx_exception_type *type ) +void WINAPI _CxxThrowException( void *object, const cxx_exception_type *type ) { ULONG_PTR args[3]; @@ -1579,7 +1013,7 @@ void WINAPI _CxxThrowException( exception *object, const cxx_exception_type *typ RaiseException( CXX_EXCEPTION, EH_NONCONTINUABLE, 3, args ); } #else -void WINAPI _CxxThrowException( exception *object, const cxx_exception_type *type ) +void WINAPI _CxxThrowException( void *object, const cxx_exception_type *type ) { ULONG_PTR args[4]; @@ -1632,7 +1066,7 @@ int __cdecl _is_exception_typeof(const type_info *ti, EXCEPTION_POINTERS *ep) __ENDTRY if(ret == -1) - MSVCRT_terminate(); + terminate(); return ret; } #else @@ -1673,7 +1107,7 @@ int __cdecl _is_exception_typeof(const type_info *ti, EXCEPTION_POINTERS *ep) __ENDTRY if(ret == -1) - MSVCRT_terminate(); + terminate(); return ret; } #endif @@ -1695,7 +1129,7 @@ const char * __thiscall type_info_name_internal_method(type_info * _this, struct static int once; if (node && !once++) FIXME("type_info_node parameter ignored\n"); - return MSVCRT_type_info_name(_this); + return type_info_name(_this); } #endif /* _MSVCR_VER >= 80 */ @@ -1721,7 +1155,7 @@ void __cdecl __ExceptionPtrCreate(exception_ptr *ep) ep->ref = NULL; } -#if defined(__i386__) && !defined(__MINGW32__) +#ifdef __ASM_USE_THISCALL_WRAPPER extern void call_dtor(const cxx_exception_type *type, void *func, void *object); __ASM_GLOBAL_FUNC( call_dtor, @@ -1812,7 +1246,7 @@ void __cdecl __ExceptionPtrRethrow(const exception_ptr *ep) static const char *exception_msg = "bad exception"; exception e; - MSVCRT_exception_ctor(&e, &exception_msg); + exception_ctor(&e, &exception_msg); _CxxThrowException(&e, &exception_exception_type); return; } @@ -1942,7 +1376,7 @@ void __cdecl __ExceptionPtrCurrentException(exception_ptr *ep) * ?__ExceptionPtrToBool@@YA_NPBX@Z * ?__ExceptionPtrToBool@@YA_NPEBX@Z */ -MSVCRT_bool __cdecl __ExceptionPtrToBool(exception_ptr *ep) +bool __cdecl __ExceptionPtrToBool(exception_ptr *ep) { return !!ep->rec; } @@ -2031,7 +1465,7 @@ void __cdecl __ExceptionPtrCopyException(exception_ptr *ep, } #endif -MSVCRT_bool __cdecl __ExceptionPtrCompare(const exception_ptr *ep1, const exception_ptr *ep2) +bool __cdecl __ExceptionPtrCompare(const exception_ptr *ep1, const exception_ptr *ep2) { return ep1->rec == ep2->rec; } @@ -2059,27 +1493,27 @@ typedef struct char name[1]; } type_info_entry; -static void* CDECL type_info_entry_malloc(MSVCRT_size_t size) +static void* CDECL type_info_entry_malloc(size_t size) { - type_info_entry *ret = MSVCRT_malloc(FIELD_OFFSET(type_info_entry, name) + size); + type_info_entry *ret = malloc(FIELD_OFFSET(type_info_entry, name) + size); return ret->name; } static void CDECL type_info_entry_free(void *ptr) { ptr = (char*)ptr - FIELD_OFFSET(type_info_entry, name); - MSVCRT_free(ptr); + free(ptr); } /****************************************************************** * __std_type_info_compare (UCRTBASE.@) */ -int CDECL MSVCRT_type_info_compare(const type_info140 *l, const type_info140 *r) +int CDECL __std_type_info_compare(const type_info140 *l, const type_info140 *r) { int ret; if (l == r) ret = 0; - else ret = MSVCRT_strcmp(l->mangled + 1, r->mangled + 1); + else ret = strcmp(l->mangled + 1, r->mangled + 1); TRACE("(%p %p) returning %d\n", l, r, ret); return ret; } @@ -2087,7 +1521,7 @@ int CDECL MSVCRT_type_info_compare(const type_info140 *l, const type_info140 *r) /****************************************************************** * __std_type_info_name (UCRTBASE.@) */ -const char* CDECL MSVCRT_type_info_name_list(type_info140 *ti, SLIST_HEADER *header) +const char* CDECL __std_type_info_name(type_info140 *ti, SLIST_HEADER *header) { if (!ti->name) { @@ -2118,7 +1552,7 @@ const char* CDECL MSVCRT_type_info_name_list(type_info140 *ti, SLIST_HEADER *hea /****************************************************************** * __std_type_info_destroy_list (UCRTBASE.@) */ -void CDECL MSVCRT_type_info_destroy_list(SLIST_HEADER *header) +void CDECL __std_type_info_destroy_list(SLIST_HEADER *header) { SLIST_ENTRY *cur, *next; @@ -2127,16 +1561,16 @@ void CDECL MSVCRT_type_info_destroy_list(SLIST_HEADER *header) for(cur = InterlockedFlushSList(header); cur; cur = next) { next = cur->Next; - MSVCRT_free(cur); + free(cur); } } /****************************************************************** * __std_type_info_hash (UCRTBASE.@) */ -MSVCRT_size_t CDECL MSVCRT_type_info_hash(const type_info140 *ti) +size_t CDECL __std_type_info_hash(const type_info140 *ti) { - MSVCRT_size_t hash, fnv_prime; + size_t hash, fnv_prime; const char *p; #ifdef _WIN64 @@ -2162,26 +1596,3 @@ MSVCRT_size_t CDECL MSVCRT_type_info_hash(const type_info140 *ti) } #endif /* _MSVCR_VER >= 140 */ - -#if _MSVCR_VER >= 100 - -enum ConcRT_EventType -{ - CONCRT_EVENT_GENERIC, - CONCRT_EVENT_START, - CONCRT_EVENT_END, - CONCRT_EVENT_BLOCK, - CONCRT_EVENT_UNBLOCK, - CONCRT_EVENT_YIELD, - CONCRT_EVENT_ATTACH, - CONCRT_EVENT_DETACH -}; - -/* ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z */ -/* ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z */ -void __cdecl Concurrency__Trace_ppl_function(const GUID *guid, unsigned char level, enum ConcRT_EventType type) -{ - FIXME("(%s %u %i) stub\n", debugstr_guid(guid), level, type); -} - -#endif /* _MSVCR_VER >= 100 */ diff --git a/sdk/lib/crt/wine/cppexcept.h b/sdk/lib/crt/wine/cppexcept.h index 69fb3c5eed9..26abc4aed24 100644 --- a/sdk/lib/crt/wine/cppexcept.h +++ b/sdk/lib/crt/wine/cppexcept.h @@ -29,6 +29,7 @@ #define CXX_EXCEPTION 0xe06d7363 #define FUNC_DESCR_SYNCHRONOUS 1 /* synchronous exceptions only (built with /EHs and /EHsc) */ +#define FUNC_DESCR_NOEXCEPT 4 /* noexcept function */ typedef void (*vtable_ptr)(void); @@ -124,7 +125,7 @@ typedef struct } cxx_exception_type; #endif -void WINAPI _CxxThrowException(exception*,const cxx_exception_type*); +void WINAPI _CxxThrowException(void*,const cxx_exception_type*); int CDECL _XcptFilter(NTSTATUS, PEXCEPTION_POINTERS); static inline const char *dbgstr_type_info( const type_info *info ) @@ -155,36 +156,35 @@ static inline void *get_this_pointer( const this_ptr_offsets *off, void *object } #ifndef __x86_64__ -#define DEFINE_EXCEPTION_TYPE_INFO(type, base_no, cl1, cl2) \ -\ +#define DEFINE_CXX_TYPE_INFO(type) \ static const cxx_type_info type ## _cxx_type_info = { \ 0, \ & type ##_type_info, \ { 0, -1, 0 }, \ sizeof(type), \ - (cxx_copy_ctor)THISCALL(MSVCRT_ ## type ##_copy_ctor) \ -}; \ -\ -static const cxx_type_info_table type ## _type_info_table = { \ + (cxx_copy_ctor)THISCALL(type ##_copy_ctor) \ +}; + +#define DEFINE_CXX_EXCEPTION(type, base_no, cl1, cl2, dtor) \ +static const cxx_type_info_table type ## _cxx_type_table = { \ base_no+1, \ { \ & type ## _cxx_type_info, \ cl1, \ - cl2 \ + cl2, \ } \ }; \ \ static const cxx_exception_type type ## _exception_type = { \ 0, \ - (cxx_copy_ctor)THISCALL(MSVCRT_ ## type ## _dtor), \ + (cxx_copy_ctor)THISCALL(dtor), \ NULL, \ - & type ## _type_info_table \ + & type ## _cxx_type_table \ }; #else -#define DEFINE_EXCEPTION_TYPE_INFO(type, base_no, cl1, cl2) \ -\ +#define DEFINE_CXX_TYPE_INFO(type) \ static cxx_type_info type ## _cxx_type_info = { \ 0, \ 0xdeadbeef, \ @@ -193,12 +193,19 @@ static cxx_type_info type ## _cxx_type_info = { \ 0xdeadbeef \ }; \ \ -static cxx_type_info_table type ## _type_info_table = { \ +static void init_ ## type ## _cxx_type_info(char *base) \ +{ \ + type ## _cxx_type_info.type_info = (char *)&type ## _type_info - base; \ + type ## _cxx_type_info.copy_ctor = (char *)type ## _copy_ctor - base; \ +} + +#define DEFINE_CXX_EXCEPTION(type, base_no, cl1, cl2, dtor) \ +static cxx_type_info_table type ## _cxx_type_table = { \ base_no+1, \ { \ 0xdeadbeef, \ 0xdeadbeef, \ - 0xdeadbeef \ + 0xdeadbeef, \ } \ }; \ \ @@ -211,14 +218,116 @@ static cxx_exception_type type ##_exception_type = { \ \ static void init_ ## type ## _cxx(char *base) \ { \ - type ## _cxx_type_info.type_info = (char *)&type ## _type_info - base; \ - type ## _cxx_type_info.copy_ctor = (char *)MSVCRT_ ## type ## _copy_ctor - base; \ - type ## _type_info_table.info[0] = (char *)&type ## _cxx_type_info - base; \ - type ## _type_info_table.info[1] = (char *)cl1 - base; \ - type ## _type_info_table.info[2] = (char *)cl2 - base; \ - type ## _exception_type.destructor = (char *)MSVCRT_ ## type ## _dtor - base; \ - type ## _exception_type.type_info_table = (char *)&type ## _type_info_table - base; \ + init_ ## type ## _cxx_type_info(base); \ + type ## _cxx_type_table.info[0] = (char *)&type ## _cxx_type_info - base; \ + type ## _cxx_type_table.info[1] = (char *)cl1 - base; \ + type ## _cxx_type_table.info[2] = (char *)cl2 - base; \ + type ## _exception_type.destructor = (char *)dtor - base; \ + type ## _exception_type.type_info_table = (char *)&type ## _cxx_type_table - base; \ } + #endif +#define DEFINE_CXX_DATA(type, base_no, cl1, cl2, dtor) \ +DEFINE_CXX_TYPE_INFO(type) \ +DEFINE_CXX_EXCEPTION(type, base_no, cl1, cl2, dtor) + +#define DEFINE_CXX_EXCEPTION0(name, dtor) \ + DEFINE_CXX_EXCEPTION(name, 0, NULL, NULL, dtor) + +#define DEFINE_CXX_DATA0(name, dtor) \ + DEFINE_CXX_DATA(name, 0, NULL, NULL, dtor) +#define DEFINE_CXX_DATA1(name, cl1, dtor) \ + DEFINE_CXX_DATA(name, 1, cl1, NULL, dtor) +#define DEFINE_CXX_DATA2(name, cl1, cl2, dtor) \ + DEFINE_CXX_DATA(name, 2, cl1, cl2, dtor) + +#if _MSVCR_VER >= 80 +#define EXCEPTION_MANGLED_NAME ".?AVexception@std@@" +#else +#define EXCEPTION_MANGLED_NAME ".?AVexception@@" +#endif + +#define CREATE_EXCEPTION_OBJECT(exception_name) \ +static exception* __exception_ctor(exception *this, const char *str, const vtable_ptr *vtbl) \ +{ \ + if (str) \ + { \ + unsigned int len = strlen(str) + 1; \ + this->name = malloc(len); \ + memcpy(this->name, str, len); \ + this->do_free = TRUE; \ + } \ + else \ + { \ + this->name = NULL; \ + this->do_free = FALSE; \ + } \ + this->vtable = vtbl; \ + return this; \ +} \ +\ +static exception* __exception_copy_ctor(exception *this, const exception *rhs, const vtable_ptr *vtbl) \ +{ \ + if (rhs->do_free) \ + { \ + __exception_ctor(this, rhs->name, vtbl); \ + } \ + else \ + { \ + *this = *rhs; \ + this->vtable = vtbl; \ + } \ + return this; \ +} \ +extern const vtable_ptr exception_name ## _vtable; \ +exception* __thiscall exception_name ## _copy_ctor(exception *this, const exception *rhs); \ +DEFINE_THISCALL_WRAPPER(exception_name ## _copy_ctor,8) \ +exception* __thiscall exception_name ## _copy_ctor(exception *this, const exception *rhs) \ +{ \ + return __exception_copy_ctor(this, rhs, & exception_name ## _vtable); \ +} \ +\ +void __thiscall exception_name ## _dtor(exception *this); \ +DEFINE_THISCALL_WRAPPER(exception_name ## _dtor,4) \ +void __thiscall exception_name ## _dtor(exception *this) \ +{ \ + if (this->do_free) free(this->name); \ +} \ +\ +void* __thiscall exception_name ## _vector_dtor(exception *this, unsigned int flags); \ +DEFINE_THISCALL_WRAPPER(exception_name ## _vector_dtor,8) \ +void* __thiscall exception_name ## _vector_dtor(exception *this, unsigned int flags) \ +{ \ + if (flags & 2) \ + { \ + INT_PTR i, *ptr = (INT_PTR *)this - 1; \ +\ + for (i = *ptr - 1; i >= 0; i--) exception_name ## _dtor(this + i); \ + operator_delete(ptr); \ + } \ + else \ + { \ + exception_name ## _dtor(this); \ + if (flags & 1) operator_delete(this); \ + } \ + return this; \ +} \ +\ +const char* __thiscall exception_name ## _what(exception *this); \ +DEFINE_THISCALL_WRAPPER(exception_name ## _what,4) \ +const char* __thiscall exception_name ## _what(exception *this) \ +{ \ + return this->name ? this->name : "Unknown exception"; \ +} \ +\ +__ASM_BLOCK_BEGIN(exception_name ## _vtables) \ +__ASM_VTABLE(exception_name, \ + VTABLE_ADD_FUNC(exception_name ## _vector_dtor) \ + VTABLE_ADD_FUNC(exception_name ## _what)); \ +__ASM_BLOCK_END \ +\ +DEFINE_RTTI_DATA0(exception_name, 0, EXCEPTION_MANGLED_NAME) \ +DEFINE_CXX_TYPE_INFO(exception_name) + #endif /* __MSVCRT_CPPEXCEPT_H */ diff --git a/sdk/lib/crt/wine/cxx.h b/sdk/lib/crt/wine/cxx.h index 58afc75bd15..d1bfb7cc381 100644 --- a/sdk/lib/crt/wine/cxx.h +++ b/sdk/lib/crt/wine/cxx.h @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "wine/asm.h" +#include "cppexcept.h" #ifdef _MSC_VER #define __ASM_VTABLE(name,funcs) @@ -29,8 +29,8 @@ __asm__(".data\n" \ "\t.balign 8\n" \ "\t.quad " __ASM_NAME(#name "_rtti") "\n" \ - "\t.globl " __ASM_NAME("MSVCRT_" #name "_vtable") "\n" \ - __ASM_NAME("MSVCRT_" #name "_vtable") ":\n" \ + "\t.globl " __ASM_NAME(#name "_vtable") "\n" \ + __ASM_NAME(#name "_vtable") ":\n" \ funcs "\n\t.text") #else @@ -41,8 +41,8 @@ __asm__(".data\n" \ "\t.balign 4\n" \ "\t.long " __ASM_NAME(#name "_rtti") "\n" \ - "\t.globl " __ASM_NAME("MSVCRT_" #name "_vtable") "\n" \ - __ASM_NAME("MSVCRT_" #name "_vtable") ":\n" \ + "\t.globl " __ASM_NAME(#name "_vtable") "\n" \ + __ASM_NAME(#name "_vtable") ":\n" \ funcs "\n\t.text") #endif /* _WIN64 */ @@ -50,9 +50,9 @@ #ifndef __x86_64__ -#define DEFINE_RTTI_DATA(name, off, base_classes_no, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ +#define DEFINE_RTTI_BASE(name, base_classes_no, mangled_name) \ static type_info name ## _type_info = { \ - &MSVCRT_type_info_vtable, \ + &type_info_vtable, \ NULL, \ mangled_name \ }; \ @@ -62,7 +62,10 @@ static const rtti_base_descriptor name ## _rtti_base_descriptor = { \ base_classes_no, \ { 0, -1, 0}, \ 64 \ -}; \ +}; + +#define DEFINE_RTTI_DATA(name, off, base_classes_no, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ + DEFINE_RTTI_BASE(name, base_classes_no, mangled_name) \ \ static const rtti_base_array name ## _rtti_base_array = { \ { \ @@ -96,9 +99,9 @@ const rtti_object_locator name ## _rtti = { \ #else -#define DEFINE_RTTI_DATA(name, off, base_classes_no, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ +#define __DEFINE_RTTI_BASE(name, base_classes_no, mangled_name) \ static type_info name ## _type_info = { \ - &MSVCRT_type_info_vtable, \ + &type_info_vtable, \ NULL, \ mangled_name \ }; \ @@ -108,7 +111,18 @@ static rtti_base_descriptor name ## _rtti_base_descriptor = { \ base_classes_no, \ { 0, -1, 0}, \ 64 \ -}; \ +}; + +#define DEFINE_RTTI_BASE(name, base_classes_no, mangled_name) \ + __DEFINE_RTTI_BASE(name, base_classes_no, mangled_name) \ + \ + static void init_ ## name ## _rtti(char *base) \ + { \ + name ## _rtti_base_descriptor.type_descriptor = (char*)&name ## _type_info - base; \ + } + +#define DEFINE_RTTI_DATA(name, off, base_classes_no, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ + __DEFINE_RTTI_BASE(name, base_classes_no, mangled_name) \ \ static rtti_base_array name ## _rtti_base_array = { \ { \ @@ -244,7 +258,7 @@ typedef struct #endif -#if defined(__i386__) && !defined(__MINGW32__) +#ifdef __ASM_USE_THISCALL_WRAPPER #define CALL_VTBL_FUNC(this, off, ret, type, args) ((ret (WINAPI*)type)&vtbl_wrapper_##off)args @@ -268,4 +282,37 @@ extern void *vtbl_wrapper_48; #endif -exception* __thiscall MSVCRT_exception_ctor(exception*, const char**); +exception* __thiscall exception_ctor(exception*, const char**); + +extern const vtable_ptr type_info_vtable; + +#ifdef __REACTOS__ +void * __thiscall type_info_vector_dtor(type_info * _this, unsigned int flags); +#endif + +#define CREATE_TYPE_INFO_VTABLE \ +DEFINE_THISCALL_WRAPPER(type_info_vector_dtor,8) \ +void * __thiscall type_info_vector_dtor(type_info * _this, unsigned int flags) \ +{ \ + if (flags & 2) \ + { \ + /* we have an array, with the number of elements stored before the first object */ \ + INT_PTR i, *ptr = (INT_PTR *)_this - 1; \ +\ + for (i = *ptr - 1; i >= 0; i--) free(_this[i].name); \ + free(ptr); \ + } \ + else \ + { \ + free(_this->name); \ + if (flags & 1) free(_this); \ + } \ + return _this; \ +} \ +\ +DEFINE_RTTI_DATA0( type_info, 0, ".?AVtype_info@@" ) \ +\ +__ASM_BLOCK_BEGIN(type_info_vtables) \ + __ASM_VTABLE(type_info, \ + VTABLE_ADD_FUNC(type_info_vector_dtor)); \ +__ASM_BLOCK_END diff --git a/sdk/lib/crt/wine/except.c b/sdk/lib/crt/wine/except.c index 147ed5e9ef0..4679560dae5 100644 --- a/sdk/lib/crt/wine/except.c +++ b/sdk/lib/crt/wine/except.c @@ -21,17 +21,19 @@ * FIXME: Incomplete support for nested exceptions/try block cleanup. */ -#include "config.h" -#include "wine/port.h" - +#include +#include #include +#include #include "ntstatus.h" #define WIN32_NO_STATUS #include "windef.h" #include "winbase.h" #include "winternl.h" +#ifdef __REACTOS__ // FIXME: Clean up wine headers! #include "wine/exception.h" +#endif // __REACTOS__ #include "msvcrt.h" #include "excpt.h" #include "wincon.h" @@ -45,7 +47,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(seh); static MSVCRT_security_error_handler security_error_handler; #endif -static MSVCRT___sighandler_t sighandlers[MSVCRT_NSIG] = { MSVCRT_SIG_DFL }; +static __sighandler_t sighandlers[NSIG] = { SIG_DFL }; static BOOL WINAPI msvcrt_console_handler(DWORD ctrlType) { @@ -54,10 +56,10 @@ static BOOL WINAPI msvcrt_console_handler(DWORD ctrlType) switch (ctrlType) { case CTRL_C_EVENT: - if (sighandlers[MSVCRT_SIGINT]) + if (sighandlers[SIGINT]) { - if (sighandlers[MSVCRT_SIGINT] != MSVCRT_SIG_IGN) - sighandlers[MSVCRT_SIGINT](MSVCRT_SIGINT); + if (sighandlers[SIGINT] != SIG_IGN) + sighandlers[SIGINT](SIGINT); ret = TRUE; } break; @@ -68,7 +70,7 @@ static BOOL WINAPI msvcrt_console_handler(DWORD ctrlType) /********************************************************************* * __pxcptinfoptrs (MSVCRT.@) */ -void** CDECL MSVCRT___pxcptinfoptrs(void) +void** CDECL __pxcptinfoptrs(void) { return (void**)&msvcrt_get_thread_data()->xcptinfo; } @@ -81,19 +83,19 @@ static const struct NTSTATUS status; int signal; } float_exception_map[] = { - { EXCEPTION_FLT_DENORMAL_OPERAND, MSVCRT__FPE_DENORMAL }, - { EXCEPTION_FLT_DIVIDE_BY_ZERO, MSVCRT__FPE_ZERODIVIDE }, - { EXCEPTION_FLT_INEXACT_RESULT, MSVCRT__FPE_INEXACT }, - { EXCEPTION_FLT_INVALID_OPERATION, MSVCRT__FPE_INVALID }, - { EXCEPTION_FLT_OVERFLOW, MSVCRT__FPE_OVERFLOW }, - { EXCEPTION_FLT_STACK_CHECK, MSVCRT__FPE_STACKOVERFLOW }, - { EXCEPTION_FLT_UNDERFLOW, MSVCRT__FPE_UNDERFLOW }, + { EXCEPTION_FLT_DENORMAL_OPERAND, _FPE_DENORMAL }, + { EXCEPTION_FLT_DIVIDE_BY_ZERO, _FPE_ZERODIVIDE }, + { EXCEPTION_FLT_INEXACT_RESULT, _FPE_INEXACT }, + { EXCEPTION_FLT_INVALID_OPERATION, _FPE_INVALID }, + { EXCEPTION_FLT_OVERFLOW, _FPE_OVERFLOW }, + { EXCEPTION_FLT_STACK_CHECK, _FPE_STACKOVERFLOW }, + { EXCEPTION_FLT_UNDERFLOW, _FPE_UNDERFLOW }, }; static LONG msvcrt_exception_filter(struct _EXCEPTION_POINTERS *except) { LONG ret = EXCEPTION_CONTINUE_SEARCH; - MSVCRT___sighandler_t handler; + __sighandler_t handler; if (!except || !except->ExceptionRecord) return EXCEPTION_CONTINUE_SEARCH; @@ -101,16 +103,16 @@ static LONG msvcrt_exception_filter(struct _EXCEPTION_POINTERS *except) switch (except->ExceptionRecord->ExceptionCode) { case EXCEPTION_ACCESS_VIOLATION: - if ((handler = sighandlers[MSVCRT_SIGSEGV]) != MSVCRT_SIG_DFL) + if ((handler = sighandlers[SIGSEGV]) != SIG_DFL) { - if (handler != MSVCRT_SIG_IGN) + if (handler != SIG_IGN) { - EXCEPTION_POINTERS **ep = (EXCEPTION_POINTERS**)MSVCRT___pxcptinfoptrs(), *old_ep; + EXCEPTION_POINTERS **ep = (EXCEPTION_POINTERS**)__pxcptinfoptrs(), *old_ep; old_ep = *ep; *ep = except; - sighandlers[MSVCRT_SIGSEGV] = MSVCRT_SIG_DFL; - handler(MSVCRT_SIGSEGV); + sighandlers[SIGSEGV] = SIG_DFL; + handler(SIGSEGV); *ep = old_ep; } ret = EXCEPTION_CONTINUE_EXECUTION; @@ -127,15 +129,15 @@ static LONG msvcrt_exception_filter(struct _EXCEPTION_POINTERS *except) case EXCEPTION_FLT_OVERFLOW: case EXCEPTION_FLT_STACK_CHECK: case EXCEPTION_FLT_UNDERFLOW: - if ((handler = sighandlers[MSVCRT_SIGFPE]) != MSVCRT_SIG_DFL) + if ((handler = sighandlers[SIGFPE]) != SIG_DFL) { - if (handler != MSVCRT_SIG_IGN) + if (handler != SIG_IGN) { - EXCEPTION_POINTERS **ep = (EXCEPTION_POINTERS**)MSVCRT___pxcptinfoptrs(), *old_ep; + EXCEPTION_POINTERS **ep = (EXCEPTION_POINTERS**)__pxcptinfoptrs(), *old_ep; unsigned int i; - int float_signal = MSVCRT__FPE_INVALID; + int float_signal = _FPE_INVALID; - sighandlers[MSVCRT_SIGFPE] = MSVCRT_SIG_DFL; + sighandlers[SIGFPE] = SIG_DFL; for (i = 0; i < ARRAY_SIZE(float_exception_map); i++) { if (float_exception_map[i].status == @@ -148,7 +150,7 @@ static LONG msvcrt_exception_filter(struct _EXCEPTION_POINTERS *except) old_ep = *ep; *ep = except; - ((float_handler)handler)(MSVCRT_SIGFPE, float_signal); + ((float_handler)handler)(SIGFPE, float_signal); *ep = old_ep; } ret = EXCEPTION_CONTINUE_EXECUTION; @@ -156,16 +158,16 @@ static LONG msvcrt_exception_filter(struct _EXCEPTION_POINTERS *except) break; case EXCEPTION_ILLEGAL_INSTRUCTION: case EXCEPTION_PRIV_INSTRUCTION: - if ((handler = sighandlers[MSVCRT_SIGILL]) != MSVCRT_SIG_DFL) + if ((handler = sighandlers[SIGILL]) != SIG_DFL) { - if (handler != MSVCRT_SIG_IGN) + if (handler != SIG_IGN) { - EXCEPTION_POINTERS **ep = (EXCEPTION_POINTERS**)MSVCRT___pxcptinfoptrs(), *old_ep; + EXCEPTION_POINTERS **ep = (EXCEPTION_POINTERS**)__pxcptinfoptrs(), *old_ep; old_ep = *ep; *ep = except; - sighandlers[MSVCRT_SIGILL] = MSVCRT_SIG_DFL; - handler(MSVCRT_SIGILL); + sighandlers[SIGILL] = SIG_DFL; + handler(SIGILL); *ep = old_ep; } ret = EXCEPTION_CONTINUE_EXECUTION; @@ -185,36 +187,37 @@ void msvcrt_free_signals(void) SetConsoleCtrlHandler(msvcrt_console_handler, FALSE); } +#ifndef __REACTOS__ // Own implementation in signal/signal.c /********************************************************************* * signal (MSVCRT.@) * Some signals may never be generated except through an explicit call to * raise. */ -MSVCRT___sighandler_t CDECL MSVCRT_signal(int sig, MSVCRT___sighandler_t func) +__sighandler_t CDECL signal(int sig, __sighandler_t func) { - MSVCRT___sighandler_t ret = MSVCRT_SIG_ERR; + __sighandler_t ret = SIG_ERR; TRACE("(%d, %p)\n", sig, func); - if (func == MSVCRT_SIG_ERR) return MSVCRT_SIG_ERR; + if (func == SIG_ERR) return SIG_ERR; switch (sig) { /* Cases handled internally. Note SIGTERM is never generated by Windows, * so we effectively mask it. */ - case MSVCRT_SIGABRT: - case MSVCRT_SIGFPE: - case MSVCRT_SIGILL: - case MSVCRT_SIGSEGV: - case MSVCRT_SIGINT: - case MSVCRT_SIGTERM: - case MSVCRT_SIGBREAK: + case SIGABRT: + case SIGFPE: + case SIGILL: + case SIGSEGV: + case SIGINT: + case SIGTERM: + case SIGBREAK: ret = sighandlers[sig]; sighandlers[sig] = func; break; default: - ret = MSVCRT_SIG_ERR; + ret = SIG_ERR; } return ret; } @@ -222,43 +225,43 @@ MSVCRT___sighandler_t CDECL MSVCRT_signal(int sig, MSVCRT___sighandler_t func) /********************************************************************* * raise (MSVCRT.@) */ -int CDECL MSVCRT_raise(int sig) +int CDECL raise(int sig) { - MSVCRT___sighandler_t handler; + __sighandler_t handler; TRACE("(%d)\n", sig); switch (sig) { - case MSVCRT_SIGFPE: - case MSVCRT_SIGILL: - case MSVCRT_SIGSEGV: + case SIGFPE: + case SIGILL: + case SIGSEGV: handler = sighandlers[sig]; - if (handler == MSVCRT_SIG_DFL) MSVCRT__exit(3); - if (handler != MSVCRT_SIG_IGN) + if (handler == SIG_DFL) _exit(3); + if (handler != SIG_IGN) { - EXCEPTION_POINTERS **ep = (EXCEPTION_POINTERS**)MSVCRT___pxcptinfoptrs(), *old_ep; + EXCEPTION_POINTERS **ep = (EXCEPTION_POINTERS**)__pxcptinfoptrs(), *old_ep; - sighandlers[sig] = MSVCRT_SIG_DFL; + sighandlers[sig] = SIG_DFL; old_ep = *ep; *ep = NULL; - if (sig == MSVCRT_SIGFPE) - ((float_handler)handler)(sig, MSVCRT__FPE_EXPLICITGEN); + if (sig == SIGFPE) + ((float_handler)handler)(sig, _FPE_EXPLICITGEN); else handler(sig); *ep = old_ep; } break; - case MSVCRT_SIGABRT: - case MSVCRT_SIGINT: - case MSVCRT_SIGTERM: - case MSVCRT_SIGBREAK: + case SIGABRT: + case SIGINT: + case SIGTERM: + case SIGBREAK: handler = sighandlers[sig]; - if (handler == MSVCRT_SIG_DFL) MSVCRT__exit(3); - if (handler != MSVCRT_SIG_IGN) + if (handler == SIG_DFL) _exit(3); + if (handler != SIG_IGN) { - sighandlers[sig] = MSVCRT_SIG_DFL; + sighandlers[sig] = SIG_DFL; handler(sig); } break; @@ -267,6 +270,7 @@ int CDECL MSVCRT_raise(int sig) } return 0; } +#endif // __REACTOS__ /********************************************************************* * _XcptFilter (MSVCRT.@) @@ -282,7 +286,7 @@ int CDECL _XcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr) /********************************************************************* * _abnormal_termination (MSVCRT.@) */ -int CDECL _abnormal_termination(void) +int CDECL __intrinsic_abnormal_termination(void) { FIXME("(void)stub\n"); return 0; @@ -292,7 +296,7 @@ int CDECL _abnormal_termination(void) /****************************************************************** * __uncaught_exception (MSVCRT.@) */ -BOOL CDECL MSVCRT___uncaught_exception(void) +BOOL CDECL __uncaught_exception(void) { return msvcrt_get_thread_data()->processing_throw != 0; } @@ -323,7 +327,7 @@ void CDECL __security_error_handler(int code, void *data) else FIXME("(%d, %p) stub\n", code, data); - MSVCRT__exit(3); + _exit(3); } #endif /* _MSVCR_VER>=70 && _MSVCR_VER<=71 */ @@ -332,7 +336,7 @@ void CDECL __security_error_handler(int code, void *data) /********************************************************************* * __crtSetUnhandledExceptionFilter (MSVCR110.@) */ -LPTOP_LEVEL_EXCEPTION_FILTER CDECL MSVCR110__crtSetUnhandledExceptionFilter(LPTOP_LEVEL_EXCEPTION_FILTER filter) +LPTOP_LEVEL_EXCEPTION_FILTER CDECL __crtSetUnhandledExceptionFilter(LPTOP_LEVEL_EXCEPTION_FILTER filter) { return SetUnhandledExceptionFilter(filter); } @@ -479,8 +483,8 @@ void CDECL __CxxUnregisterExceptionObject(cxx_frame_info *frame_info, BOOL in_us } struct __std_exception_data { - char *what; - MSVCRT_bool dofree; + char *what; + char dofree; }; #if _MSVCR_VER>=140 @@ -488,13 +492,13 @@ struct __std_exception_data { /********************************************************************* * __std_exception_copy (UCRTBASE.@) */ -void CDECL MSVCRT___std_exception_copy(const struct __std_exception_data *src, +void CDECL __std_exception_copy(const struct __std_exception_data *src, struct __std_exception_data *dst) { TRACE("(%p %p)\n", src, dst); if(src->dofree && src->what) { - dst->what = MSVCRT__strdup(src->what); + dst->what = _strdup(src->what); dst->dofree = 1; } else { dst->what = src->what; @@ -505,12 +509,12 @@ void CDECL MSVCRT___std_exception_copy(const struct __std_exception_data *src, /********************************************************************* * __std_exception_destroy (UCRTBASE.@) */ -void CDECL MSVCRT___std_exception_destroy(struct __std_exception_data *data) +void CDECL __std_exception_destroy(struct __std_exception_data *data) { TRACE("(%p)\n", data); if(data->dofree) - MSVCRT_free(data->what); + free(data->what); data->what = NULL; data->dofree = 0; } diff --git a/sdk/lib/crt/wine/except_arm.c b/sdk/lib/crt/wine/except_arm.c index 41b0c1c7d3e..fecbfe65929 100644 --- a/sdk/lib/crt/wine/except_arm.c +++ b/sdk/lib/crt/wine/except_arm.c @@ -19,12 +19,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - #ifdef __arm__ +#include #include +#include #include "ntstatus.h" #define WIN32_NO_STATUS @@ -110,13 +109,12 @@ unsigned int CDECL __CxxQueryExceptionSize(void) * _setjmp (MSVCRT.@) */ __ASM_GLOBAL_FUNC(MSVCRT__setjmp, - "mov r1, #0\n\t" /* frame */ "b " __ASM_NAME("__wine_setjmpex")); /******************************************************************* * longjmp (MSVCRT.@) */ -void __cdecl MSVCRT_longjmp(struct MSVCRT___JUMP_BUFFER *jmp, int retval) +void __cdecl MSVCRT_longjmp(_JUMP_BUFFER *jmp, int retval) { EXCEPTION_RECORD rec; @@ -137,10 +135,10 @@ void __cdecl MSVCRT_longjmp(struct MSVCRT___JUMP_BUFFER *jmp, int retval) /********************************************************************* * _fpieee_flt (MSVCRT.@) */ -int __cdecl _fpieee_flt(ULONG exception_code, EXCEPTION_POINTERS *ep, +int __cdecl _fpieee_flt(__msvcrt_ulong exception_code, EXCEPTION_POINTERS *ep, int (__cdecl *handler)(_FPIEEE_RECORD*)) { - FIXME("(%x %p %p)\n", exception_code, ep, handler); + FIXME("(%lx %p %p)\n", exception_code, ep, handler); return EXCEPTION_CONTINUE_SEARCH; } diff --git a/sdk/lib/crt/wine/except_arm64.c b/sdk/lib/crt/wine/except_arm64.c index 97059d13972..574e77485f9 100644 --- a/sdk/lib/crt/wine/except_arm64.c +++ b/sdk/lib/crt/wine/except_arm64.c @@ -20,12 +20,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - #ifdef __aarch64__ +#include #include +#include #include "ntstatus.h" #define WIN32_NO_STATUS @@ -111,13 +110,12 @@ unsigned int CDECL __CxxQueryExceptionSize(void) * _setjmp (MSVCRT.@) */ __ASM_GLOBAL_FUNC(MSVCRT__setjmp, - "mov x1, #0\n\t" /* frame */ "b " __ASM_NAME("__wine_setjmpex")); /******************************************************************* * longjmp (MSVCRT.@) */ -void __cdecl MSVCRT_longjmp(struct MSVCRT___JUMP_BUFFER *jmp, int retval) +void __cdecl MSVCRT_longjmp(_JUMP_BUFFER *jmp, int retval) { EXCEPTION_RECORD rec; @@ -138,10 +136,10 @@ void __cdecl MSVCRT_longjmp(struct MSVCRT___JUMP_BUFFER *jmp, int retval) /********************************************************************* * _fpieee_flt (MSVCRT.@) */ -int __cdecl _fpieee_flt(ULONG exception_code, EXCEPTION_POINTERS *ep, +int __cdecl _fpieee_flt(__msvcrt_ulong exception_code, EXCEPTION_POINTERS *ep, int (__cdecl *handler)(_FPIEEE_RECORD*)) { - FIXME("(%x %p %p)\n", exception_code, ep, handler); + FIXME("(%lx %p %p)\n", exception_code, ep, handler); return EXCEPTION_CONTINUE_SEARCH; } diff --git a/sdk/lib/crt/wine/except_i386.c b/sdk/lib/crt/wine/except_i386.c index 68f6c75c1b3..fa8ec4997bd 100644 --- a/sdk/lib/crt/wine/except_i386.c +++ b/sdk/lib/crt/wine/except_i386.c @@ -25,12 +25,11 @@ * www.thecodeproject.com. */ -#include "config.h" -#include "wine/port.h" - #ifdef __i386__ +#include #include +#include #include "windef.h" #include "winbase.h" @@ -120,7 +119,7 @@ typedef struct _SCOPETABLE void * (*lpfnHandler)(void); } SCOPETABLE, *PSCOPETABLE; -typedef struct _MSVCRT_EXCEPTION_FRAME +typedef struct MSVCRT_EXCEPTION_FRAME { EXCEPTION_REGISTRATION_RECORD *prev; void (*handler)(PEXCEPTION_RECORD, EXCEPTION_REGISTRATION_RECORD*, @@ -328,7 +327,7 @@ static void cxx_local_unwind( cxx_exception_frame* frame, const cxx_function_des if (trylevel < 0 || trylevel >= descr->unwind_count) { ERR( "invalid trylevel %d\n", trylevel ); - MSVCRT_terminate(); + terminate(); } handler = descr->unwind_table[trylevel].handler; if (handler) @@ -540,7 +539,7 @@ static LONG CALLBACK se_translation_filter( EXCEPTION_POINTERS *ep, void *c ) if (rec->ExceptionCode != CXX_EXCEPTION) { TRACE( "non-c++ exception thrown in SEH handler: %x\n", rec->ExceptionCode ); - MSVCRT_terminate(); + terminate(); } exc_type = (cxx_exception_type *)rec->ExceptionInformation[2]; @@ -551,6 +550,18 @@ static LONG CALLBACK se_translation_filter( EXCEPTION_POINTERS *ep, void *c ) return ExceptionContinueSearch; } +static void check_noexcept( PEXCEPTION_RECORD rec, + const cxx_function_descr *descr, BOOL nested ) +{ + if (!nested && rec->ExceptionCode == CXX_EXCEPTION && + descr->magic >= CXX_FRAME_MAGIC_VC8 && + (descr->flags & FUNC_DESCR_NOEXCEPT)) + { + ERR("noexcept function propagating exception\n"); + terminate(); + } +} + /********************************************************************* * cxx_frame_handler * @@ -578,7 +589,11 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame if (descr->unwind_count && !nested_frame) cxx_local_unwind( frame, descr, -1 ); return ExceptionContinueSearch; } - if (!descr->tryblock_count) return ExceptionContinueSearch; + if (!descr->tryblock_count) + { + check_noexcept(rec, descr, nested_frame != NULL); + return ExceptionContinueSearch; + } if(rec->ExceptionCode == CXX_EXCEPTION && rec->ExceptionInformation[1] == 0 && rec->ExceptionInformation[2] == 0) @@ -643,6 +658,7 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame call_catch_block( rec, context, frame, descr, nested_frame, exc_type ); + check_noexcept(rec, descr, nested_frame != NULL); return ExceptionContinueSearch; } @@ -678,7 +694,7 @@ __ASM_GLOBAL_FUNC( __CxxFrameHandler, * * Callback meant to be used as UnwindFunc for setjmp/longjmp. */ -void __stdcall __CxxLongjmpUnwind( const struct MSVCRT___JUMP_BUFFER *buf ) +void __stdcall __CxxLongjmpUnwind( const _JUMP_BUFFER *buf ) { cxx_exception_frame *frame = (cxx_exception_frame *)buf->Registration; const cxx_function_descr *descr = (const cxx_function_descr *)buf->UnwindData[0]; @@ -1014,7 +1030,7 @@ int CDECL _except_handler4_common( ULONG *cookie, void (*check_cookie)(void), */ #define MSVCRT_JMP_MAGIC 0x56433230 /* ID value for new jump structure */ -typedef void (__stdcall *MSVCRT_unwind_function)(const struct MSVCRT___JUMP_BUFFER *); +typedef void (__stdcall *MSVCRT_unwind_function)(const _JUMP_BUFFER *); /* define an entrypoint for setjmp/setjmp3 that stores the registers in the jmp buf */ /* and then jumps to the C backend function */ @@ -1034,7 +1050,7 @@ typedef void (__stdcall *MSVCRT_unwind_function)(const struct MSVCRT___JUMP_BUFF * _setjmp (MSVCRT.@) */ DEFINE_SETJMP_ENTRYPOINT(MSVCRT__setjmp) -int CDECL DECLSPEC_HIDDEN __regs_MSVCRT__setjmp(struct MSVCRT___JUMP_BUFFER *jmp) +int CDECL DECLSPEC_HIDDEN __regs_MSVCRT__setjmp(_JUMP_BUFFER *jmp) { jmp->Registration = (unsigned long)NtCurrentTeb()->Tib.ExceptionList; if (jmp->Registration == ~0UL) @@ -1051,7 +1067,7 @@ int CDECL DECLSPEC_HIDDEN __regs_MSVCRT__setjmp(struct MSVCRT___JUMP_BUFFER *jmp * _setjmp3 (MSVCRT.@) */ DEFINE_SETJMP_ENTRYPOINT( MSVCRT__setjmp3 ) -int WINAPIV DECLSPEC_HIDDEN __regs_MSVCRT__setjmp3(struct MSVCRT___JUMP_BUFFER *jmp, int nb_args, ...) +int WINAPIV DECLSPEC_HIDDEN __regs_MSVCRT__setjmp3(_JUMP_BUFFER *jmp, int nb_args, ...) { jmp->Cookie = MSVCRT_JMP_MAGIC; jmp->UnwindFunc = 0; @@ -1082,7 +1098,7 @@ int WINAPIV DECLSPEC_HIDDEN __regs_MSVCRT__setjmp3(struct MSVCRT___JUMP_BUFFER * /********************************************************************* * longjmp (MSVCRT.@) */ -void CDECL MSVCRT_longjmp(struct MSVCRT___JUMP_BUFFER *jmp, int retval) +void CDECL MSVCRT_longjmp(_JUMP_BUFFER *jmp, int retval) { unsigned long cur_frame = 0; @@ -1120,7 +1136,7 @@ void CDECL MSVCRT_longjmp(struct MSVCRT___JUMP_BUFFER *jmp, int retval) /********************************************************************* * _seh_longjmp_unwind (MSVCRT.@) */ -void __stdcall _seh_longjmp_unwind(struct MSVCRT___JUMP_BUFFER *jmp) +void __stdcall _seh_longjmp_unwind(_JUMP_BUFFER *jmp) { msvcrt_local_unwind2( (MSVCRT_EXCEPTION_FRAME *)jmp->Registration, jmp->TryLevel, (void *)jmp->Ebp ); } @@ -1128,7 +1144,7 @@ void __stdcall _seh_longjmp_unwind(struct MSVCRT___JUMP_BUFFER *jmp) /********************************************************************* * _seh_longjmp_unwind4 (MSVCRT.@) */ -void __stdcall _seh_longjmp_unwind4(struct MSVCRT___JUMP_BUFFER *jmp) +void __stdcall _seh_longjmp_unwind4(_JUMP_BUFFER *jmp) { msvcrt_local_unwind4( (ULONG *)&jmp->Cookie, (MSVCRT_EXCEPTION_FRAME *)jmp->Registration, jmp->TryLevel, (void *)jmp->Ebp ); @@ -1137,14 +1153,14 @@ void __stdcall _seh_longjmp_unwind4(struct MSVCRT___JUMP_BUFFER *jmp) /********************************************************************* * _fpieee_flt (MSVCRT.@) */ -int __cdecl _fpieee_flt(ULONG exception_code, EXCEPTION_POINTERS *ep, +int __cdecl _fpieee_flt(__msvcrt_ulong exception_code, EXCEPTION_POINTERS *ep, int (__cdecl *handler)(_FPIEEE_RECORD*)) { FLOATING_SAVE_AREA *ctx = &ep->ContextRecord->FloatSave; _FPIEEE_RECORD rec; int ret; - TRACE("(%x %p %p)\n", exception_code, ep, handler); + TRACE("(%lx %p %p)\n", exception_code, ep, handler); switch(exception_code) { case STATUS_FLOAT_DIVIDE_BY_ZERO: diff --git a/sdk/lib/crt/wine/except_x86_64.c b/sdk/lib/crt/wine/except_x86_64.c index 9e7676413de..3c6e7af940c 100644 --- a/sdk/lib/crt/wine/except_x86_64.c +++ b/sdk/lib/crt/wine/except_x86_64.c @@ -18,12 +18,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - #ifdef __x86_64__ +#include #include +#include #include "ntstatus.h" #define WIN32_NO_STATUS @@ -90,6 +89,7 @@ typedef struct { cxx_frame_info frame_info; BOOL rethrow; + EXCEPTION_RECORD *prev_rec; } cxx_catch_ctx; typedef struct @@ -290,7 +290,7 @@ static void cxx_local_unwind(ULONG64 frame, DISPATCHER_CONTEXT *dispatch, if (trylevel<0 || trylevel>=descr->unwind_count) { ERR("invalid trylevel %d\n", trylevel); - MSVCRT_terminate(); + terminate(); } handler = rva_to_ptr(unwind_table[trylevel].handler, dispatch->ImageBase); if (handler) @@ -306,14 +306,13 @@ static void cxx_local_unwind(ULONG64 frame, DISPATCHER_CONTEXT *dispatch, static LONG CALLBACK cxx_rethrow_filter(PEXCEPTION_POINTERS eptrs, void *c) { EXCEPTION_RECORD *rec = eptrs->ExceptionRecord; - thread_data_t *data = msvcrt_get_thread_data(); cxx_catch_ctx *ctx = c; if (rec->ExceptionCode != CXX_EXCEPTION) return EXCEPTION_CONTINUE_SEARCH; if (!rec->ExceptionInformation[1] && !rec->ExceptionInformation[2]) return EXCEPTION_EXECUTE_HANDLER; - if (rec->ExceptionInformation[1] == data->exc_record->ExceptionInformation[1]) + if (rec->ExceptionInformation[1] == ctx->prev_rec->ExceptionInformation[1]) ctx->rethrow = TRUE; return EXCEPTION_CONTINUE_SEARCH; } @@ -340,6 +339,7 @@ static void* WINAPI call_catch_block(EXCEPTION_RECORD *rec) TRACE("calling handler %p\n", handler); ctx.rethrow = FALSE; + ctx.prev_rec = prev_rec; __CxxRegisterExceptionObject(&ep, &ctx.frame_info); msvcrt_get_thread_data()->processing_throw--; __TRY @@ -487,7 +487,7 @@ static LONG CALLBACK se_translation_filter(EXCEPTION_POINTERS *ep, void *c) if (rec->ExceptionCode != CXX_EXCEPTION) { TRACE("non-c++ exception thrown in SEH handler: %x\n", rec->ExceptionCode); - MSVCRT_terminate(); + terminate(); } exc_type = (cxx_exception_type *)rec->ExceptionInformation[2]; @@ -498,6 +498,18 @@ static LONG CALLBACK se_translation_filter(EXCEPTION_POINTERS *ep, void *c) return ExceptionContinueSearch; } +static void check_noexcept( PEXCEPTION_RECORD rec, + const cxx_function_descr *descr, BOOL nested ) +{ + if (!nested && rec->ExceptionCode == CXX_EXCEPTION && + descr->magic >= CXX_FRAME_MAGIC_VC8 && + (descr->flags & FUNC_DESCR_NOEXCEPT)) + { + ERR("noexcept function propagating exception\n"); + terminate(); + } +} + static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame, CONTEXT *context, DISPATCHER_CONTEXT *dispatch, const cxx_function_descr *descr) @@ -561,10 +573,20 @@ static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame, cxx_local_unwind(orig_frame, dispatch, descr, unwindlevel); return ExceptionContinueSearch; } - if (!descr->tryblock_count) return ExceptionContinueSearch; + if (!descr->tryblock_count) + { + check_noexcept(rec, descr, orig_frame != frame); + return ExceptionContinueSearch; + } if (rec->ExceptionCode == CXX_EXCEPTION) { + if (!rec->ExceptionInformation[1] && !rec->ExceptionInformation[2]) + { + TRACE("rethrow detected.\n"); + *rec = *msvcrt_get_thread_data()->exc_record; + } + exc_type = (cxx_exception_type *)rec->ExceptionInformation[2]; if (TRACE_ON(seh)) @@ -605,6 +627,7 @@ static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame, } find_catch_block(rec, context, NULL, frame, dispatch, descr, exc_type, orig_frame); + check_noexcept(rec, descr, orig_frame != frame); return ExceptionContinueSearch; } @@ -685,7 +708,7 @@ __ASM_GLOBAL_FUNC( MSVCRT__setjmp, /******************************************************************* * longjmp (MSVCRT.@) */ -void __cdecl MSVCRT_longjmp( struct MSVCRT___JUMP_BUFFER *jmp, int retval ) +void __cdecl MSVCRT_longjmp( _JUMP_BUFFER *jmp, int retval ) { EXCEPTION_RECORD rec; @@ -716,10 +739,10 @@ void __cdecl _local_unwind( void *frame, void *target ) /********************************************************************* * _fpieee_flt (MSVCRT.@) */ -int __cdecl _fpieee_flt(ULONG exception_code, EXCEPTION_POINTERS *ep, +int __cdecl _fpieee_flt(__msvcrt_ulong exception_code, EXCEPTION_POINTERS *ep, int (__cdecl *handler)(_FPIEEE_RECORD*)) { - FIXME("(%x %p %p) opcode: %s\n", exception_code, ep, handler, + FIXME("(%lx %p %p) opcode: %s\n", exception_code, ep, handler, wine_dbgstr_longlong(*(ULONG64*)ep->ContextRecord->Rip)); return EXCEPTION_CONTINUE_SEARCH; } diff --git a/sdk/lib/crt/wine/heap.c b/sdk/lib/crt/wine/heap.c index 6c1efe1cbc1..a7e87aca5df 100644 --- a/sdk/lib/crt/wine/heap.c +++ b/sdk/lib/crt/wine/heap.c @@ -50,8 +50,8 @@ #define msvcrt_set_errno _dosmaperr /* MT */ -#define LOCK_HEAP _mlock( _HEAP_LOCK ) -#define UNLOCK_HEAP _munlock( _HEAP_LOCK ) +#define LOCK_HEAP _lock( _HEAP_LOCK ) +#define UNLOCK_HEAP _unlock( _HEAP_LOCK ) /* _aligned */ #define SAVED_PTR(x) ((void *)((DWORD_PTR)((char *)x - sizeof(void *)) & \ @@ -64,7 +64,7 @@ static HANDLE heap, sb_heap; -typedef int (CDECL *MSVCRT_new_handler_func)(MSVCRT_size_t size); +typedef int (CDECL *MSVCRT_new_handler_func)(size_t size); static MSVCRT_new_handler_func MSVCRT_new_handler; static int MSVCRT_new_mode; @@ -72,9 +72,9 @@ static int MSVCRT_new_mode; /* FIXME - According to documentation it should be 8*1024, at runtime it returns 16 */ static unsigned int MSVCRT_amblksiz = 16; /* FIXME - According to documentation it should be 480 bytes, at runtime default is 0 */ -static MSVCRT_size_t MSVCRT_sbh_threshold = 0; +static size_t MSVCRT_sbh_threshold = 0; -static void* msvcrt_heap_alloc(DWORD flags, MSVCRT_size_t size) +static void* msvcrt_heap_alloc(DWORD flags, size_t size) { if(size < MSVCRT_sbh_threshold) { @@ -92,13 +92,13 @@ static void* msvcrt_heap_alloc(DWORD flags, MSVCRT_size_t size) return HeapAlloc(heap, flags, size); } -static void* msvcrt_heap_realloc(DWORD flags, void *ptr, MSVCRT_size_t size) +static void* msvcrt_heap_realloc(DWORD flags, void *ptr, size_t size) { if(sb_heap && ptr && !HeapValidate(heap, 0, ptr)) { /* TODO: move data to normal heap if it exceeds sbh_threshold limit */ void *memblock, *temp, **saved; - MSVCRT_size_t old_padding, new_padding, old_size; + size_t old_padding, new_padding, old_size; saved = SAVED_PTR(ptr); old_padding = (char*)ptr - (char*)*saved; @@ -135,7 +135,7 @@ static BOOL msvcrt_heap_free(void *ptr) return HeapFree(heap, 0, ptr); } -static MSVCRT_size_t msvcrt_heap_size(void *ptr) +static size_t msvcrt_heap_size(void *ptr) { if(sb_heap && ptr && !HeapValidate(heap, 0, ptr)) { @@ -146,36 +146,38 @@ static MSVCRT_size_t msvcrt_heap_size(void *ptr) return HeapSize(heap, 0, ptr); } +/********************************************************************* + * _callnewh (MSVCRT.@) + */ +int CDECL _callnewh(size_t size) +{ + int ret = 0; + MSVCRT_new_handler_func handler = MSVCRT_new_handler; + if(handler) + ret = (*handler)(size) ? 1 : 0; + return ret; +} + /********************************************************************* * ??2@YAPAXI@Z (MSVCRT.@) */ -void* CDECL DECLSPEC_HOTPATCH MSVCRT_operator_new(MSVCRT_size_t size) +void* CDECL DECLSPEC_HOTPATCH operator_new(size_t size) { void *retval; - int freed; - MSVCRT_new_handler_func handler; do { retval = msvcrt_heap_alloc(0, size); if(retval) { - TRACE("(%ld) returning %p\n", size, retval); + TRACE("(%Iu) returning %p\n", size, retval); return retval; } + } while(_callnewh(size)); - LOCK_HEAP; - handler = MSVCRT_new_handler; - if(handler) - freed = (*handler)(size); - else - freed = 0; - UNLOCK_HEAP; - } while(freed); - - TRACE("(%ld) out of memory\n", size); + TRACE("(%Iu) out of memory\n", size); #if _MSVCR_VER >= 80 - throw_exception(EXCEPTION_BAD_ALLOC, 0, "bad allocation"); + throw_bad_alloc(); #endif return NULL; } @@ -184,16 +186,16 @@ void* CDECL DECLSPEC_HOTPATCH MSVCRT_operator_new(MSVCRT_size_t size) /********************************************************************* * ??2@YAPAXIHPBDH@Z (MSVCRT.@) */ -void* CDECL MSVCRT_operator_new_dbg(MSVCRT_size_t size, int type, const char *file, int line) +void* CDECL operator_new_dbg(size_t size, int type, const char *file, int line) { - return MSVCRT_operator_new( size ); + return operator_new( size ); } /********************************************************************* * ??3@YAXPAX@Z (MSVCRT.@) */ -void CDECL DECLSPEC_HOTPATCH MSVCRT_operator_delete(void *mem) +void CDECL DECLSPEC_HOTPATCH operator_delete(void *mem) { TRACE("(%p)\n", mem); msvcrt_heap_free(mem); @@ -203,7 +205,7 @@ void CDECL DECLSPEC_HOTPATCH MSVCRT_operator_delete(void *mem) /********************************************************************* * ?_query_new_handler@@YAP6AHI@ZXZ (MSVCRT.@) */ -MSVCRT_new_handler_func CDECL MSVCRT__query_new_handler(void) +MSVCRT_new_handler_func CDECL _query_new_handler(void) { return MSVCRT_new_handler; } @@ -212,7 +214,7 @@ MSVCRT_new_handler_func CDECL MSVCRT__query_new_handler(void) /********************************************************************* * ?_query_new_mode@@YAHXZ (MSVCRT.@) */ -int CDECL MSVCRT__query_new_mode(void) +int CDECL _query_new_mode(void) { return MSVCRT_new_mode; } @@ -220,7 +222,7 @@ int CDECL MSVCRT__query_new_mode(void) /********************************************************************* * ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z (MSVCRT.@) */ -MSVCRT_new_handler_func CDECL MSVCRT__set_new_handler(MSVCRT_new_handler_func func) +MSVCRT_new_handler_func CDECL _set_new_handler(MSVCRT_new_handler_func func) { MSVCRT_new_handler_func old_handler; LOCK_HEAP; @@ -233,42 +235,26 @@ MSVCRT_new_handler_func CDECL MSVCRT__set_new_handler(MSVCRT_new_handler_func fu /********************************************************************* * ?set_new_handler@@YAP6AXXZP6AXXZ@Z (MSVCRT.@) */ -MSVCRT_new_handler_func CDECL MSVCRT_set_new_handler(void *func) +MSVCRT_new_handler_func CDECL set_new_handler(void *func) { TRACE("(%p)\n",func); - MSVCRT__set_new_handler(NULL); + _set_new_handler(NULL); return NULL; } /********************************************************************* * ?_set_new_mode@@YAHH@Z (MSVCRT.@) */ -int CDECL MSVCRT__set_new_mode(int mode) +int CDECL _set_new_mode(int mode) { - int old_mode; - LOCK_HEAP; - old_mode = MSVCRT_new_mode; - MSVCRT_new_mode = mode; - UNLOCK_HEAP; - return old_mode; -} - -/********************************************************************* - * _callnewh (MSVCRT.@) - */ -int CDECL _callnewh(MSVCRT_size_t size) -{ - int ret = 0; - MSVCRT_new_handler_func handler = MSVCRT_new_handler; - if(handler) - ret = (*handler)(size) ? 1 : 0; - return ret; + if(!MSVCRT_CHECK_PMT(mode == 0 || mode == 1)) return -1; + return InterlockedExchange((long*)&MSVCRT_new_mode, mode); } /********************************************************************* * _expand (MSVCRT.@) */ -void* CDECL _expand(void* mem, MSVCRT_size_t size) +void* CDECL _expand(void* mem, size_t size) { return msvcrt_heap_realloc(HEAP_REALLOC_IN_PLACE_ONLY, mem, size); } @@ -282,9 +268,9 @@ int CDECL _heapchk(void) (sb_heap && !HeapValidate(sb_heap, 0, NULL))) { msvcrt_set_errno(GetLastError()); - return MSVCRT__HEAPBADNODE; + return _HEAPBADNODE; } - return MSVCRT__HEAPOK; + return _HEAPOK; } /********************************************************************* @@ -305,7 +291,7 @@ int CDECL _heapmin(void) /********************************************************************* * _heapwalk (MSVCRT.@) */ -int CDECL _heapwalk(struct MSVCRT__heapinfo* next) +int CDECL _heapwalk(_HEAPINFO *next) { PROCESS_HEAP_ENTRY phe; @@ -315,14 +301,14 @@ int CDECL _heapwalk(struct MSVCRT__heapinfo* next) LOCK_HEAP; phe.lpData = next->_pentry; phe.cbData = (DWORD)next->_size; - phe.wFlags = next->_useflag == MSVCRT__USEDENTRY ? PROCESS_HEAP_ENTRY_BUSY : 0; + phe.wFlags = next->_useflag == _USEDENTRY ? PROCESS_HEAP_ENTRY_BUSY : 0; if (phe.lpData && phe.wFlags & PROCESS_HEAP_ENTRY_BUSY && !HeapValidate( heap, 0, phe.lpData )) { UNLOCK_HEAP; msvcrt_set_errno(GetLastError()); - return MSVCRT__HEAPBADNODE; + return _HEAPBADNODE; } do @@ -331,19 +317,19 @@ int CDECL _heapwalk(struct MSVCRT__heapinfo* next) { UNLOCK_HEAP; if (GetLastError() == ERROR_NO_MORE_ITEMS) - return MSVCRT__HEAPEND; + return _HEAPEND; msvcrt_set_errno(GetLastError()); if (!phe.lpData) - return MSVCRT__HEAPBADBEGIN; - return MSVCRT__HEAPBADNODE; + return _HEAPBADBEGIN; + return _HEAPBADNODE; } } while (phe.wFlags & (PROCESS_HEAP_REGION|PROCESS_HEAP_UNCOMMITTED_RANGE)); UNLOCK_HEAP; next->_pentry = phe.lpData; next->_size = phe.cbData; - next->_useflag = phe.wFlags & PROCESS_HEAP_ENTRY_BUSY ? MSVCRT__USEDENTRY : MSVCRT__FREEENTRY; - return MSVCRT__HEAPOK; + next->_useflag = phe.wFlags & PROCESS_HEAP_ENTRY_BUSY ? _USEDENTRY : _FREEENTRY; + return _HEAPOK; } /********************************************************************* @@ -352,44 +338,44 @@ int CDECL _heapwalk(struct MSVCRT__heapinfo* next) int CDECL _heapset(unsigned int value) { int retval; - struct MSVCRT__heapinfo heap; + _HEAPINFO heap; memset( &heap, 0, sizeof(heap) ); LOCK_HEAP; - while ((retval = _heapwalk(&heap)) == MSVCRT__HEAPOK) + while ((retval = _heapwalk(&heap)) == _HEAPOK) { - if (heap._useflag == MSVCRT__FREEENTRY) + if (heap._useflag == _FREEENTRY) memset(heap._pentry, value, heap._size); } UNLOCK_HEAP; - return retval == MSVCRT__HEAPEND? MSVCRT__HEAPOK : retval; + return retval == _HEAPEND ? _HEAPOK : retval; } /********************************************************************* * _heapadd (MSVCRT.@) */ -int CDECL _heapadd(void* mem, MSVCRT_size_t size) +int CDECL _heapadd(void* mem, size_t size) { - TRACE("(%p,%ld) unsupported in Win32\n", mem,size); - *MSVCRT__errno() = MSVCRT_ENOSYS; + TRACE("(%p,%Iu) unsupported in Win32\n", mem,size); + *_errno() = ENOSYS; return -1; } /********************************************************************* * _get_heap_handle (MSVCRT.@) */ -MSVCRT_intptr_t CDECL _get_heap_handle(void) +intptr_t CDECL _get_heap_handle(void) { - return (MSVCRT_intptr_t)heap; + return (intptr_t)heap; } /********************************************************************* * _msize (MSVCRT.@) */ -MSVCRT_size_t CDECL _msize(void* mem) +size_t CDECL _msize(void* mem) { - MSVCRT_size_t size = msvcrt_heap_size(mem); - if (size == ~(MSVCRT_size_t)0) + size_t size = msvcrt_heap_size(mem); + if (size == ~(size_t)0) { WARN(":Probably called with non wine-allocated memory, ret = -1\n"); /* At least the Win32 crtdll/msvcrt also return -1 in this case */ @@ -401,7 +387,7 @@ MSVCRT_size_t CDECL _msize(void* mem) /********************************************************************* * _aligned_msize (MSVCR80.@) */ -size_t CDECL _aligned_msize(void *p, MSVCRT_size_t alignment, MSVCRT_size_t offset) +size_t CDECL _aligned_msize(void *p, size_t alignment, size_t offset) { void **alloc_ptr; @@ -418,13 +404,13 @@ size_t CDECL _aligned_msize(void *p, MSVCRT_size_t alignment, MSVCRT_size_t offs /********************************************************************* * calloc (MSVCRT.@) */ -void* CDECL DECLSPEC_HOTPATCH MSVCRT_calloc(MSVCRT_size_t count, MSVCRT_size_t size) +void* CDECL DECLSPEC_HOTPATCH calloc(size_t count, size_t size) { - MSVCRT_size_t bytes = count*size; + size_t bytes = count*size; if (size && bytes / size != count) { - *MSVCRT__errno() = MSVCRT_ENOMEM; + *_errno() = ENOMEM; return NULL; } @@ -435,16 +421,16 @@ void* CDECL DECLSPEC_HOTPATCH MSVCRT_calloc(MSVCRT_size_t count, MSVCRT_size_t s /********************************************************************* * _calloc_base (UCRTBASE.@) */ -void* CDECL _calloc_base(MSVCRT_size_t count, MSVCRT_size_t size) +void* CDECL _calloc_base(size_t count, size_t size) { - return MSVCRT_calloc(count, size); + return calloc(count, size); } #endif /********************************************************************* * free (MSVCRT.@) */ -void CDECL DECLSPEC_HOTPATCH MSVCRT_free(void* ptr) +void CDECL DECLSPEC_HOTPATCH free(void* ptr) { msvcrt_heap_free(ptr); } @@ -462,32 +448,40 @@ void CDECL _free_base(void* ptr) /********************************************************************* * malloc (MSVCRT.@) */ -void* CDECL MSVCRT_malloc(MSVCRT_size_t size) +void* CDECL malloc(size_t size) { - void *ret = msvcrt_heap_alloc(0, size); - if (!ret) - *MSVCRT__errno() = MSVCRT_ENOMEM; - return ret; + void *ret; + + do + { + ret = msvcrt_heap_alloc(0, size); + if (ret || !MSVCRT_new_mode) + break; + } while(_callnewh(size)); + + if (!ret) + *_errno() = ENOMEM; + return ret; } #if _MSVCR_VER>=140 /********************************************************************* * _malloc_base (UCRTBASE.@) */ -void* CDECL _malloc_base(MSVCRT_size_t size) +void* CDECL _malloc_base(size_t size) { - return MSVCRT_malloc(size); + return malloc(size); } #endif /********************************************************************* * realloc (MSVCRT.@) */ -void* CDECL DECLSPEC_HOTPATCH MSVCRT_realloc(void* ptr, MSVCRT_size_t size) +void* CDECL DECLSPEC_HOTPATCH realloc(void* ptr, size_t size) { - if (!ptr) return MSVCRT_malloc(size); + if (!ptr) return malloc(size); if (size) return msvcrt_heap_realloc(0, ptr, size); - MSVCRT_free(ptr); + free(ptr); return NULL; } @@ -495,9 +489,9 @@ void* CDECL DECLSPEC_HOTPATCH MSVCRT_realloc(void* ptr, MSVCRT_size_t size) /********************************************************************* * _realloc_base (UCRTBASE.@) */ -void* CDECL _realloc_base(void* ptr, MSVCRT_size_t size) +void* CDECL _realloc_base(void* ptr, size_t size) { - return MSVCRT_realloc(ptr, size); + return realloc(ptr, size); } #endif @@ -505,20 +499,20 @@ void* CDECL _realloc_base(void* ptr, MSVCRT_size_t size) /********************************************************************* * _recalloc (MSVCR80.@) */ -void* CDECL _recalloc(void *mem, MSVCRT_size_t num, MSVCRT_size_t size) +void* CDECL _recalloc(void *mem, size_t num, size_t size) { - MSVCRT_size_t old_size; + size_t old_size; void *ret; if(!mem) - return MSVCRT_calloc(num, size); + return calloc(num, size); size = num*size; old_size = _msize(mem); - ret = MSVCRT_realloc(mem, size); + ret = realloc(mem, size); if(!ret) { - *MSVCRT__errno() = MSVCRT_ENOMEM; + *_errno() = ENOMEM; return NULL; } @@ -539,7 +533,7 @@ unsigned int* CDECL __p__amblksiz(void) /********************************************************************* * _get_sbh_threshold (MSVCRT.@) */ -MSVCRT_size_t CDECL _get_sbh_threshold(void) +size_t CDECL _get_sbh_threshold(void) { return MSVCRT_sbh_threshold; } @@ -547,7 +541,7 @@ MSVCRT_size_t CDECL _get_sbh_threshold(void) /********************************************************************* * _set_sbh_threshold (MSVCRT.@) */ -int CDECL _set_sbh_threshold(MSVCRT_size_t threshold) +int CDECL _set_sbh_threshold(size_t threshold) { #ifdef _WIN64 return 0; @@ -577,29 +571,29 @@ void CDECL _aligned_free(void *memblock) if (memblock) { void **saved = SAVED_PTR(memblock); - MSVCRT_free(*saved); + free(*saved); } } /********************************************************************* * _aligned_offset_malloc (MSVCRT.@) */ -void * CDECL _aligned_offset_malloc(MSVCRT_size_t size, MSVCRT_size_t alignment, MSVCRT_size_t offset) +void * CDECL _aligned_offset_malloc(size_t size, size_t alignment, size_t offset) { void *memblock, *temp, **saved; - TRACE("(%lu, %lu, %lu)\n", size, alignment, offset); + TRACE("(%Iu, %Iu, %Iu)\n", size, alignment, offset); /* alignment must be a power of 2 */ if ((alignment & (alignment - 1)) != 0) { - *MSVCRT__errno() = MSVCRT_EINVAL; + *_errno() = EINVAL; return NULL; } /* offset must be less than size */ if (offset && offset >= size) { - *MSVCRT__errno() = MSVCRT_EINVAL; + *_errno() = EINVAL; return NULL; } @@ -608,7 +602,7 @@ void * CDECL _aligned_offset_malloc(MSVCRT_size_t size, MSVCRT_size_t alignment, alignment = sizeof(void *); /* allocate enough space for void pointer and alignment */ - temp = MSVCRT_malloc(size + alignment + sizeof(void *)); + temp = malloc(size + alignment + sizeof(void *)); if (!temp) return NULL; @@ -627,21 +621,21 @@ void * CDECL _aligned_offset_malloc(MSVCRT_size_t size, MSVCRT_size_t alignment, /********************************************************************* * _aligned_malloc (MSVCRT.@) */ -void * CDECL _aligned_malloc(MSVCRT_size_t size, MSVCRT_size_t alignment) +void * CDECL _aligned_malloc(size_t size, size_t alignment) { - TRACE("(%lu, %lu)\n", size, alignment); + TRACE("(%Iu, %Iu)\n", size, alignment); return _aligned_offset_malloc(size, alignment, 0); } /********************************************************************* * _aligned_offset_realloc (MSVCRT.@) */ -void * CDECL _aligned_offset_realloc(void *memblock, MSVCRT_size_t size, - MSVCRT_size_t alignment, MSVCRT_size_t offset) +void * CDECL _aligned_offset_realloc(void *memblock, size_t size, + size_t alignment, size_t offset) { void * temp, **saved; - MSVCRT_size_t old_padding, new_padding, old_size; - TRACE("(%p, %lu, %lu, %lu)\n", memblock, size, alignment, offset); + size_t old_padding, new_padding, old_size; + TRACE("(%p, %Iu, %Iu, %Iu)\n", memblock, size, alignment, offset); if (!memblock) return _aligned_offset_malloc(size, alignment, offset); @@ -649,14 +643,14 @@ void * CDECL _aligned_offset_realloc(void *memblock, MSVCRT_size_t size, /* alignment must be a power of 2 */ if ((alignment & (alignment - 1)) != 0) { - *MSVCRT__errno() = MSVCRT_EINVAL; + *_errno() = EINVAL; return NULL; } /* offset must be less than size */ if (offset >= size) { - *MSVCRT__errno() = MSVCRT_EINVAL; + *_errno() = EINVAL; return NULL; } @@ -674,7 +668,7 @@ void * CDECL _aligned_offset_realloc(void *memblock, MSVCRT_size_t size, saved = SAVED_PTR(memblock); if (memblock != ALIGN_PTR(*saved, alignment, offset)) { - *MSVCRT__errno() = MSVCRT_EINVAL; + *_errno() = EINVAL; return NULL; } @@ -696,7 +690,7 @@ void * CDECL _aligned_offset_realloc(void *memblock, MSVCRT_size_t size, } old_size -= old_padding; - temp = MSVCRT_realloc(*saved, size + alignment + sizeof(void *)); + temp = realloc(*saved, size + alignment + sizeof(void *)); if (!temp) return NULL; @@ -728,7 +722,7 @@ void * CDECL _aligned_offset_realloc(void *memblock, MSVCRT_size_t size, temp saved memblock However, in the new block, actual data is still written as follows - (because it was copied by MSVCRT_realloc): + (because it was copied by realloc): +-------+---------------------+--------------------------------+-------+ | ... | "old_padding" bytes | ... "old_size" bytes ... | ... | +-------+---------------------+--------------------------------+-------+ @@ -751,25 +745,25 @@ void * CDECL _aligned_offset_realloc(void *memblock, MSVCRT_size_t size, /********************************************************************* * _aligned_realloc (MSVCRT.@) */ -void * CDECL _aligned_realloc(void *memblock, MSVCRT_size_t size, MSVCRT_size_t alignment) +void * CDECL _aligned_realloc(void *memblock, size_t size, size_t alignment) { - TRACE("(%p, %lu, %lu)\n", memblock, size, alignment); + TRACE("(%p, %Iu, %Iu)\n", memblock, size, alignment); return _aligned_offset_realloc(memblock, size, alignment, 0); } /********************************************************************* * memmove_s (MSVCRT.@) */ -int CDECL MSVCRT_memmove_s(void *dest, MSVCRT_size_t numberOfElements, const void *src, MSVCRT_size_t count) +int CDECL memmove_s(void *dest, size_t numberOfElements, const void *src, size_t count) { - TRACE("(%p %lu %p %lu)\n", dest, numberOfElements, src, count); + TRACE("(%p %Iu %p %Iu)\n", dest, numberOfElements, src, count); if(!count) return 0; - if (!MSVCRT_CHECK_PMT(dest != NULL)) return MSVCRT_EINVAL; - if (!MSVCRT_CHECK_PMT(src != NULL)) return MSVCRT_EINVAL; - if (!MSVCRT_CHECK_PMT_ERR( count <= numberOfElements, MSVCRT_ERANGE )) return MSVCRT_ERANGE; + if (!MSVCRT_CHECK_PMT(dest != NULL)) return EINVAL; + if (!MSVCRT_CHECK_PMT(src != NULL)) return EINVAL; + if (!MSVCRT_CHECK_PMT_ERR( count <= numberOfElements, ERANGE )) return ERANGE; memmove(dest, src, count); return 0; @@ -779,10 +773,10 @@ int CDECL MSVCRT_memmove_s(void *dest, MSVCRT_size_t numberOfElements, const voi /********************************************************************* * wmemmove_s (MSVCR100.@) */ -int CDECL wmemmove_s(MSVCRT_wchar_t *dest, MSVCRT_size_t numberOfElements, - const MSVCRT_wchar_t *src, MSVCRT_size_t count) +int CDECL wmemmove_s(wchar_t *dest, size_t numberOfElements, + const wchar_t *src, size_t count) { - TRACE("(%p %lu %p %lu)\n", dest, numberOfElements, src, count); + TRACE("(%p %Iu %p %Iu)\n", dest, numberOfElements, src, count); if (!count) return 0; @@ -791,11 +785,11 @@ int CDECL wmemmove_s(MSVCRT_wchar_t *dest, MSVCRT_size_t numberOfElements, * http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1225.pdf * in that it does not zero the output buffer on constraint violation. */ - if (!MSVCRT_CHECK_PMT(dest != NULL)) return MSVCRT_EINVAL; - if (!MSVCRT_CHECK_PMT(src != NULL)) return MSVCRT_EINVAL; - if (!MSVCRT_CHECK_PMT_ERR(count <= numberOfElements, MSVCRT_ERANGE)) return MSVCRT_ERANGE; + if (!MSVCRT_CHECK_PMT(dest != NULL)) return EINVAL; + if (!MSVCRT_CHECK_PMT(src != NULL)) return EINVAL; + if (!MSVCRT_CHECK_PMT_ERR(count <= numberOfElements, ERANGE)) return ERANGE; - memmove(dest, src, sizeof(MSVCRT_wchar_t)*count); + memmove(dest, src, sizeof(wchar_t)*count); return 0; } #endif @@ -803,23 +797,23 @@ int CDECL wmemmove_s(MSVCRT_wchar_t *dest, MSVCRT_size_t numberOfElements, /********************************************************************* * memcpy_s (MSVCRT.@) */ -int CDECL MSVCRT_memcpy_s(void *dest, MSVCRT_size_t numberOfElements, const void *src, MSVCRT_size_t count) +int CDECL memcpy_s(void *dest, size_t numberOfElements, const void *src, size_t count) { - TRACE("(%p %lu %p %lu)\n", dest, numberOfElements, src, count); + TRACE("(%p %Iu %p %Iu)\n", dest, numberOfElements, src, count); if(!count) return 0; - if (!MSVCRT_CHECK_PMT(dest != NULL)) return MSVCRT_EINVAL; + if (!MSVCRT_CHECK_PMT(dest != NULL)) return EINVAL; if (!MSVCRT_CHECK_PMT(src != NULL)) { memset(dest, 0, numberOfElements); - return MSVCRT_EINVAL; + return EINVAL; } - if (!MSVCRT_CHECK_PMT_ERR( count <= numberOfElements, MSVCRT_ERANGE )) + if (!MSVCRT_CHECK_PMT_ERR( count <= numberOfElements, ERANGE )) { memset(dest, 0, numberOfElements); - return MSVCRT_ERANGE; + return ERANGE; } memmove(dest, src, count); @@ -830,26 +824,26 @@ int CDECL MSVCRT_memcpy_s(void *dest, MSVCRT_size_t numberOfElements, const void /********************************************************************* * wmemcpy_s (MSVCR100.@) */ -int CDECL wmemcpy_s(MSVCRT_wchar_t *dest, MSVCRT_size_t numberOfElements, - const MSVCRT_wchar_t *src, MSVCRT_size_t count) +int CDECL wmemcpy_s(wchar_t *dest, size_t numberOfElements, + const wchar_t *src, size_t count) { - TRACE("(%p %lu %p %lu)\n", dest, numberOfElements, src, count); + TRACE("(%p %Iu %p %Iu)\n", dest, numberOfElements, src, count); if (!count) return 0; - if (!MSVCRT_CHECK_PMT(dest != NULL)) return MSVCRT_EINVAL; + if (!MSVCRT_CHECK_PMT(dest != NULL)) return EINVAL; if (!MSVCRT_CHECK_PMT(src != NULL)) { - memset(dest, 0, numberOfElements*sizeof(MSVCRT_wchar_t)); - return MSVCRT_EINVAL; + memset(dest, 0, numberOfElements*sizeof(wchar_t)); + return EINVAL; } - if (!MSVCRT_CHECK_PMT_ERR(count <= numberOfElements, MSVCRT_ERANGE)) { - memset(dest, 0, numberOfElements*sizeof(MSVCRT_wchar_t)); - return MSVCRT_ERANGE; + if (!MSVCRT_CHECK_PMT_ERR(count <= numberOfElements, ERANGE)) { + memset(dest, 0, numberOfElements*sizeof(wchar_t)); + return ERANGE; } - memmove(dest, src, sizeof(MSVCRT_wchar_t)*count); + memmove(dest, src, sizeof(wchar_t)*count); return 0; } #endif @@ -857,12 +851,12 @@ int CDECL wmemcpy_s(MSVCRT_wchar_t *dest, MSVCRT_size_t numberOfElements, /********************************************************************* * strncpy_s (MSVCRT.@) */ -int CDECL MSVCRT_strncpy_s(char *dest, MSVCRT_size_t numberOfElements, - const char *src, MSVCRT_size_t count) +int CDECL strncpy_s(char *dest, size_t numberOfElements, + const char *src, size_t count) { - MSVCRT_size_t i, end; + size_t i, end; - TRACE("(%s %lu %s %lu)\n", dest, numberOfElements, src, count); + TRACE("(%p %Iu %s %Iu)\n", dest, numberOfElements, debugstr_a(src), count); if(!count) { if(dest && numberOfElements) @@ -870,11 +864,11 @@ int CDECL MSVCRT_strncpy_s(char *dest, MSVCRT_size_t numberOfElements, return 0; } - if (!MSVCRT_CHECK_PMT(dest != NULL)) return MSVCRT_EINVAL; - if (!MSVCRT_CHECK_PMT(src != NULL)) return MSVCRT_EINVAL; - if (!MSVCRT_CHECK_PMT(numberOfElements != 0)) return MSVCRT_EINVAL; + if (!MSVCRT_CHECK_PMT(dest != NULL)) return EINVAL; + if (!MSVCRT_CHECK_PMT(src != NULL)) return EINVAL; + if (!MSVCRT_CHECK_PMT(numberOfElements != 0)) return EINVAL; - if(count!=MSVCRT__TRUNCATE && count #include +#include +#define _NO_CRT_STDIO_INLINE +#include +#include +#include #include "windef.h" #include "winbase.h" +#undef strncpy +#undef wcsncpy -#define MSVCRT_INT_MAX 0x7fffffff -#define MSVCRT_LONG_MAX 0x7fffffff -#define MSVCRT_LONG_MIN (-MSVCRT_LONG_MAX-1) -#define MSVCRT_ULONG_MAX 0xffffffff -#define MSVCRT_I64_MAX (((__int64)0x7fffffff << 32) | 0xffffffff) -#define MSVCRT_I64_MIN (-MSVCRT_I64_MAX-1) -#define MSVCRT_UI64_MAX (((unsigned __int64)0xffffffff << 32) | 0xffffffff) -#define MSVCRT_MB_LEN_MAX 5 -#define MSVCRT_FLT_MAX_10_EXP 38 -#define MSVCRT_FLT_MIN_10_EXP (-37) -#define MSVCRT_DBL_MAX_10_EXP 308 -#define MSVCRT_DBL_MIN_10_EXP (-307) -#define MSVCRT_DBL_DIG 15 -#ifdef _WIN64 -#define MSVCRT_SIZE_MAX MSVCRT_UI64_MAX -#else -#define MSVCRT_SIZE_MAX MSVCRT_ULONG_MAX +#ifdef __REACTOS__ +typedef long __msvcrt_long; +typedef unsigned long __msvcrt_ulong; #endif -#define MSVCRT__MAX_DRIVE 3 -#define MSVCRT__MAX_DIR 256 -#define MSVCRT__MAX_FNAME 256 -#define MSVCRT__MAX_EXT 256 +extern BOOL sse2_supported DECLSPEC_HIDDEN; -typedef unsigned char MSVCRT_bool; -typedef unsigned short MSVCRT_wchar_t; -typedef unsigned short MSVCRT_wint_t; -typedef unsigned short MSVCRT_wctrans_t; -typedef unsigned short MSVCRT_wctype_t; -typedef unsigned short MSVCRT__ino_t; -typedef unsigned int MSVCRT__fsize_t; -typedef int MSVCRT_long; -typedef unsigned int MSVCRT_ulong; -typedef __int64 MSVCRT_longlong; -#ifdef _WIN64 -typedef unsigned __int64 MSVCRT_size_t; -typedef __int64 MSVCRT_intptr_t; -typedef unsigned __int64 MSVCRT_uintptr_t; -#else -typedef unsigned int MSVCRT_size_t; -typedef int MSVCRT_intptr_t; -typedef unsigned int MSVCRT_uintptr_t; -#endif -#ifdef _CRTDLL -typedef short MSVCRT__dev_t; -#else -typedef unsigned int MSVCRT__dev_t; -#endif -typedef int MSVCRT__off_t; -typedef int MSVCRT_clock_t; -typedef int MSVCRT___time32_t; -typedef __int64 DECLSPEC_ALIGN(8) MSVCRT___time64_t; -typedef __int64 DECLSPEC_ALIGN(8) MSVCRT_fpos_t; -typedef int MSVCRT_mbstate_t; +#define DBL80_MAX_10_EXP 4932 +#define DBL80_MIN_10_EXP -4951 + +typedef void (__cdecl *terminate_function)(void); +typedef void (__cdecl *unexpected_function)(void); +typedef void (__cdecl *_se_translator_function)(unsigned int code, struct _EXCEPTION_POINTERS *info); +void __cdecl terminate(void); -typedef void (__cdecl *MSVCRT_terminate_handler)(void); -typedef void (__cdecl *MSVCRT_terminate_function)(void); -typedef void (__cdecl *MSVCRT_unexpected_handler)(void); -typedef void (__cdecl *MSVCRT_unexpected_function)(void); -typedef void (__cdecl *MSVCRT__se_translator_function)(unsigned int code, struct _EXCEPTION_POINTERS *info); -typedef void (__cdecl *MSVCRT__beginthread_start_routine_t)(void *); -typedef unsigned int (__stdcall *MSVCRT__beginthreadex_start_routine_t)(void *); -typedef int (__cdecl *MSVCRT__onexit_t)(void); -typedef void (__cdecl *MSVCRT_invalid_parameter_handler)(const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, unsigned, MSVCRT_uintptr_t); -typedef void (__cdecl *MSVCRT_purecall_handler)(void); typedef void (__cdecl *MSVCRT_security_error_handler)(int, void *); typedef struct {ULONG x80[3];} MSVCRT__LDOUBLE; /* Intel 80 bit FP format has sizeof() 12 */ -struct MSVCRT_tm { - int tm_sec; - int tm_min; - int tm_hour; - int tm_mday; - int tm_mon; - int tm_year; - int tm_wday; - int tm_yday; - int tm_isdst; -}; - -typedef struct MSVCRT_tagLC_ID { - unsigned short wLanguage; - unsigned short wCountry; - unsigned short wCodePage; -} MSVCRT_LC_ID, *MSVCRT_LPLC_ID; - -typedef struct { +typedef struct __lc_time_data { union { const char *str[43]; struct { @@ -146,69 +70,31 @@ typedef struct { #if _MSVCR_VER < 110 LCID lcid; #endif - int unk[2]; + int unk; + int refcount; +#if _MSVCR_VER == 0 || _MSVCR_VER >= 100 union { - const MSVCRT_wchar_t *wstr[43]; + const wchar_t *wstr[43]; struct { - const MSVCRT_wchar_t *short_wday[7]; - const MSVCRT_wchar_t *wday[7]; - const MSVCRT_wchar_t *short_mon[12]; - const MSVCRT_wchar_t *mon[12]; - const MSVCRT_wchar_t *am; - const MSVCRT_wchar_t *pm; - const MSVCRT_wchar_t *short_date; - const MSVCRT_wchar_t *date; - const MSVCRT_wchar_t *time; + const wchar_t *short_wday[7]; + const wchar_t *wday[7]; + const wchar_t *short_mon[12]; + const wchar_t *mon[12]; + const wchar_t *am; + const wchar_t *pm; + const wchar_t *short_date; + const wchar_t *date; + const wchar_t *time; } names; } wstr; +#endif #if _MSVCR_VER >= 110 - const MSVCRT_wchar_t *locname; + const wchar_t *locname; #endif char data[1]; -} MSVCRT___lc_time_data; +} __lc_time_data; -typedef struct MSVCRT_threadlocaleinfostruct { -#if _MSVCR_VER >= 140 - unsigned short *pctype; - int mb_cur_max; - unsigned int lc_codepage; -#endif - - int refcount; -#if _MSVCR_VER < 140 - unsigned int lc_codepage; -#endif - unsigned int lc_collate_cp; - MSVCRT_ulong lc_handle[6]; - MSVCRT_LC_ID lc_id[6]; - struct { - char *locale; - MSVCRT_wchar_t *wlocale; - int *refcount; - int *wrefcount; - } lc_category[6]; - int lc_clike; -#if _MSVCR_VER < 140 - int mb_cur_max; -#endif - int *lconv_intl_refcount; - int *lconv_num_refcount; - int *lconv_mon_refcount; - struct MSVCRT_lconv *lconv; - int *ctype1_refcount; - unsigned short *ctype1; -#if _MSVCR_VER < 140 - unsigned short *pctype; -#endif - unsigned char *pclmap; - unsigned char *pcumap; - MSVCRT___lc_time_data *lc_time_curr; -#if _MSVCR_VER >= 110 - MSVCRT_wchar_t *lc_name[6]; -#endif -} MSVCRT_threadlocinfo; - -typedef struct MSVCRT_threadmbcinfostruct { +typedef struct threadmbcinfostruct { int refcount; int mbcodepage; int ismbcodepage; @@ -216,23 +102,7 @@ typedef struct MSVCRT_threadmbcinfostruct { unsigned short mbulinfo[6]; unsigned char mbctype[257]; unsigned char mbcasemap[256]; -} MSVCRT_threadmbcinfo; - -typedef struct MSVCRT_threadlocaleinfostruct *MSVCRT_pthreadlocinfo; -typedef struct MSVCRT_threadmbcinfostruct *MSVCRT_pthreadmbcinfo; - -typedef struct MSVCRT_localeinfo_struct -{ - MSVCRT_pthreadlocinfo locinfo; - MSVCRT_pthreadmbcinfo mbcinfo; -} MSVCRT__locale_tstruct, *MSVCRT__locale_t; - -typedef struct MSVCRT__onexit_table_t -{ - MSVCRT__onexit_t *_first; - MSVCRT__onexit_t *_last; - MSVCRT__onexit_t *_end; -} MSVCRT__onexit_table_t; +} threadmbcinfo; typedef struct _frame_info { @@ -255,39 +125,41 @@ void CDECL __DestructExceptionObject(EXCEPTION_RECORD*); /* TLS data */ extern DWORD msvcrt_tls_index DECLSPEC_HIDDEN; +#define LOCALE_FREE 0x1 +#define LOCALE_THREAD 0x2 + /* Keep in sync with msvcr90/tests/msvcr90.c */ struct __thread_data { DWORD tid; HANDLE handle; int thread_errno; - MSVCRT_ulong thread_doserrno; + __msvcrt_ulong thread_doserrno; int unk1; unsigned int random_seed; /* seed for rand() */ char *strtok_next; /* next ptr for strtok() */ - MSVCRT_wchar_t *wcstok_next; /* next ptr for wcstok() */ + wchar_t *wcstok_next; /* next ptr for wcstok() */ unsigned char *mbstok_next; /* next ptr for mbstok() */ char *strerror_buffer; /* buffer for strerror */ - MSVCRT_wchar_t *wcserror_buffer; /* buffer for wcserror */ + wchar_t *wcserror_buffer; /* buffer for wcserror */ char *tmpnam_buffer; /* buffer for tmpname() */ - MSVCRT_wchar_t *wtmpnam_buffer; /* buffer for wtmpname() */ + wchar_t *wtmpnam_buffer; /* buffer for wtmpname() */ void *unk2[2]; char *asctime_buffer; /* buffer for asctime */ - MSVCRT_wchar_t *wasctime_buffer; /* buffer for wasctime */ - struct MSVCRT_tm *time_buffer; /* buffer for localtime/gmtime */ + wchar_t *wasctime_buffer; /* buffer for wasctime */ + struct tm *time_buffer; /* buffer for localtime/gmtime */ char *efcvt_buffer; /* buffer for ecvt/fcvt */ int unk3[2]; void *unk4[3]; EXCEPTION_POINTERS *xcptinfo; int fpecode; - MSVCRT_pthreadmbcinfo mbcinfo; - MSVCRT_pthreadlocinfo locinfo; - BOOL have_locale; + pthreadmbcinfo mbcinfo; + pthreadlocinfo locinfo; + int locale_flags; int unk5[1]; - MSVCRT_terminate_function terminate_handler; - MSVCRT_unexpected_function unexpected_handler; - MSVCRT__se_translator_function se_translator; - void *unk6[3]; - int unk7; + terminate_function terminate_handler; + unexpected_function unexpected_handler; + _se_translator_function se_translator; /* preserve offset to exc_record and processing_throw */ + void *unk6; EXCEPTION_RECORD *exc_record; CONTEXT *ctx_record; int processing_throw; @@ -300,61 +172,50 @@ struct __thread_data { char cached_locale[131]; void *unk10[100]; #if _MSVCR_VER >= 140 - MSVCRT_invalid_parameter_handler invalid_parameter_handler; + _invalid_parameter_handler invalid_parameter_handler; + HMODULE module; #endif }; typedef struct __thread_data thread_data_t; -extern thread_data_t *msvcrt_get_thread_data(void) DECLSPEC_HIDDEN; +extern thread_data_t *CDECL msvcrt_get_thread_data(void) DECLSPEC_HIDDEN; -LCID MSVCRT_locale_to_LCID(const char*, unsigned short*, BOOL*) DECLSPEC_HIDDEN; -extern MSVCRT__locale_t MSVCRT_locale DECLSPEC_HIDDEN; -extern MSVCRT___lc_time_data cloc_time_data DECLSPEC_HIDDEN; +LCID locale_to_LCID(const char*, unsigned short*, BOOL*) DECLSPEC_HIDDEN; +extern _locale_t MSVCRT_locale DECLSPEC_HIDDEN; +extern __lc_time_data cloc_time_data DECLSPEC_HIDDEN; extern unsigned int MSVCRT___lc_codepage; extern int MSVCRT___lc_collate_cp; extern WORD MSVCRT__ctype [257]; extern BOOL initial_locale DECLSPEC_HIDDEN; +extern WORD *MSVCRT__pwctype; void msvcrt_set_errno(int) DECLSPEC_HIDDEN; #if _MSVCR_VER >= 80 -typedef enum { - EXCEPTION_BAD_ALLOC, -#if _MSVCR_VER >= 100 - EXCEPTION_SCHEDULER_RESOURCE_ALLOCATION_ERROR, - EXCEPTION_IMPROPER_LOCK, - EXCEPTION_INVALID_SCHEDULER_POLICY_KEY, - EXCEPTION_INVALID_SCHEDULER_POLICY_VALUE, - EXCEPTION_INVALID_SCHEDULER_POLICY_THREAD_SPECIFICATION, - EXCEPTION_IMPROPER_SCHEDULER_ATTACH, - EXCEPTION_IMPROPER_SCHEDULER_DETACH, -#endif -} exception_type; -void throw_exception(exception_type, HRESULT, const char*) DECLSPEC_HIDDEN; +void throw_bad_alloc(void) DECLSPEC_HIDDEN; #endif void __cdecl _purecall(void); void __cdecl _amsg_exit(int errnum); extern char **MSVCRT__environ; -extern MSVCRT_wchar_t **MSVCRT__wenviron; +extern wchar_t **MSVCRT__wenviron; extern char ** msvcrt_SnapshotOfEnvironmentA(char **) DECLSPEC_HIDDEN; -extern MSVCRT_wchar_t ** msvcrt_SnapshotOfEnvironmentW(MSVCRT_wchar_t **) DECLSPEC_HIDDEN; +extern wchar_t ** msvcrt_SnapshotOfEnvironmentW(wchar_t **) DECLSPEC_HIDDEN; -MSVCRT_wchar_t *msvcrt_wstrdupa(const char *) DECLSPEC_HIDDEN; +wchar_t *msvcrt_wstrdupa(const char *) DECLSPEC_HIDDEN; extern unsigned int MSVCRT__commode; /* FIXME: This should be declared in new.h but it's not an extern "C" so * it would not be much use anyway. Even for Winelib applications. */ -int __cdecl MSVCRT__set_new_mode(int mode); +void* __cdecl operator_new(size_t); +void __cdecl operator_delete(void*); +int __cdecl _set_new_mode(int mode); -void* __cdecl MSVCRT_operator_new(MSVCRT_size_t); -void __cdecl MSVCRT_operator_delete(void*); - -typedef void* (__cdecl *malloc_func_t)(MSVCRT_size_t); +typedef void* (__cdecl *malloc_func_t)(size_t); typedef void (__cdecl *free_func_t)(void*); /* Setup and teardown multi threaded locks */ @@ -363,10 +224,9 @@ extern void msvcrt_free_locks(void) DECLSPEC_HIDDEN; extern void msvcrt_init_exception(void*) DECLSPEC_HIDDEN; extern BOOL msvcrt_init_locale(void) DECLSPEC_HIDDEN; -extern void msvcrt_init_math(void) DECLSPEC_HIDDEN; +extern void msvcrt_init_math(void*) DECLSPEC_HIDDEN; extern void msvcrt_init_io(void) DECLSPEC_HIDDEN; extern void msvcrt_free_io(void) DECLSPEC_HIDDEN; -extern void msvcrt_init_console(void) DECLSPEC_HIDDEN; extern void msvcrt_free_console(void) DECLSPEC_HIDDEN; extern void msvcrt_init_args(void) DECLSPEC_HIDDEN; extern void msvcrt_free_args(void) DECLSPEC_HIDDEN; @@ -378,14 +238,12 @@ extern void msvcrt_destroy_heap(void) DECLSPEC_HIDDEN; extern void msvcrt_init_clock(void) DECLSPEC_HIDDEN; #if _MSVCR_VER >= 100 -extern void msvcrt_init_scheduler(void*) DECLSPEC_HIDDEN; -extern void msvcrt_free_scheduler(void) DECLSPEC_HIDDEN; +extern void msvcrt_init_concurrency(void*) DECLSPEC_HIDDEN; +extern void msvcrt_free_concurrency(void) DECLSPEC_HIDDEN; extern void msvcrt_free_scheduler_thread(void) DECLSPEC_HIDDEN; #endif -extern unsigned msvcrt_create_io_inherit_block(WORD*, BYTE**) DECLSPEC_HIDDEN; - -extern unsigned int __cdecl _control87(unsigned int, unsigned int); +extern BOOL msvcrt_create_io_inherit_block(WORD*, BYTE**) DECLSPEC_HIDDEN; /* run-time error codes */ #define _RT_STACK 0 @@ -421,795 +279,66 @@ extern unsigned int __cdecl _control87(unsigned int, unsigned int); #define _RT_CRNL 252 #define _RT_BANNER 255 -struct MSVCRT___timeb32 { - MSVCRT___time32_t time; - unsigned short millitm; - short timezone; - short dstflag; -}; - -struct MSVCRT___timeb64 { - MSVCRT___time64_t time; - unsigned short millitm; - short timezone; - short dstflag; -}; - -struct MSVCRT__iobuf { - char* _ptr; - int _cnt; - char* _base; - int _flag; - int _file; - int _charbuf; - int _bufsiz; - char* _tmpfname; -}; - -typedef struct MSVCRT__iobuf MSVCRT_FILE; - -struct MSVCRT_lconv { - char* decimal_point; - char* thousands_sep; - char* grouping; - char* int_curr_symbol; - char* currency_symbol; - char* mon_decimal_point; - char* mon_thousands_sep; - char* mon_grouping; - char* positive_sign; - char* negative_sign; - char int_frac_digits; - char frac_digits; - char p_cs_precedes; - char p_sep_by_space; - char n_cs_precedes; - char n_sep_by_space; - char p_sign_posn; - char n_sign_posn; -#if _MSVCR_VER >= 100 - MSVCRT_wchar_t* _W_decimal_point; - MSVCRT_wchar_t* _W_thousands_sep; - MSVCRT_wchar_t* _W_int_curr_symbol; - MSVCRT_wchar_t* _W_currency_symbol; - MSVCRT_wchar_t* _W_mon_decimal_point; - MSVCRT_wchar_t* _W_mon_thousands_sep; - MSVCRT_wchar_t* _W_positive_sign; - MSVCRT_wchar_t* _W_negative_sign; -#endif -}; - -struct MSVCRT__exception { - int type; - char* name; - double arg1; - double arg2; - double retval; -}; - -struct MSVCRT__complex { - double x; /* Real part */ - double y; /* Imaginary part */ -}; -typedef struct MSVCRT__complex _Dcomplex; - -typedef struct MSVCRT__div_t { - int quot; /* quotient */ - int rem; /* remainder */ -} MSVCRT_div_t; - -typedef struct MSVCRT__ldiv_t { - MSVCRT_long quot; /* quotient */ - MSVCRT_long rem; /* remainder */ -} MSVCRT_ldiv_t; - -typedef struct MSVCRT__lldiv_t { - MSVCRT_longlong quot; /* quotient */ - MSVCRT_longlong rem; /* remainder */ -} MSVCRT_lldiv_t; - -struct MSVCRT__heapinfo { - int* _pentry; - MSVCRT_size_t _size; - int _useflag; -}; - -#ifdef __i386__ -struct MSVCRT___JUMP_BUFFER { - unsigned long Ebp; - unsigned long Ebx; - unsigned long Edi; - unsigned long Esi; - unsigned long Esp; - unsigned long Eip; - unsigned long Registration; - unsigned long TryLevel; - /* Start of new struct members */ - unsigned long Cookie; - unsigned long UnwindFunc; - unsigned long UnwindData[6]; -}; -#elif defined(__x86_64__) -struct MSVCRT__SETJMP_FLOAT128 -{ - unsigned __int64 DECLSPEC_ALIGN(16) Part[2]; -}; -struct MSVCRT___JUMP_BUFFER -{ - unsigned __int64 Frame; - unsigned __int64 Rbx; - unsigned __int64 Rsp; - unsigned __int64 Rbp; - unsigned __int64 Rsi; - unsigned __int64 Rdi; - unsigned __int64 R12; - unsigned __int64 R13; - unsigned __int64 R14; - unsigned __int64 R15; - unsigned __int64 Rip; - unsigned __int64 Spare; - struct MSVCRT__SETJMP_FLOAT128 Xmm6; - struct MSVCRT__SETJMP_FLOAT128 Xmm7; - struct MSVCRT__SETJMP_FLOAT128 Xmm8; - struct MSVCRT__SETJMP_FLOAT128 Xmm9; - struct MSVCRT__SETJMP_FLOAT128 Xmm10; - struct MSVCRT__SETJMP_FLOAT128 Xmm11; - struct MSVCRT__SETJMP_FLOAT128 Xmm12; - struct MSVCRT__SETJMP_FLOAT128 Xmm13; - struct MSVCRT__SETJMP_FLOAT128 Xmm14; - struct MSVCRT__SETJMP_FLOAT128 Xmm15; -}; -#elif defined(__arm__) -struct MSVCRT___JUMP_BUFFER -{ - unsigned long Frame; - unsigned long R4; - unsigned long R5; - unsigned long R6; - unsigned long R7; - unsigned long R8; - unsigned long R9; - unsigned long R10; - unsigned long R11; - unsigned long Sp; - unsigned long Pc; - unsigned long Fpscr; - unsigned long long D[8]; -}; -#elif defined(__aarch64__) -struct MSVCRT___JUMP_BUFFER -{ - unsigned __int64 Frame; - unsigned __int64 Reserved; - unsigned __int64 X19; - unsigned __int64 X20; - unsigned __int64 X21; - unsigned __int64 X22; - unsigned __int64 X23; - unsigned __int64 X24; - unsigned __int64 X25; - unsigned __int64 X26; - unsigned __int64 X27; - unsigned __int64 X28; - unsigned __int64 Fp; - unsigned __int64 Lr; - unsigned __int64 Sp; - unsigned long Fpcr; - unsigned long Fpsr; - double D[8]; -}; -#endif /* __i386__ */ - -struct MSVCRT__diskfree_t { - unsigned int total_clusters; - unsigned int avail_clusters; - unsigned int sectors_per_cluster; - unsigned int bytes_per_sector; -}; - -struct MSVCRT__finddata32_t { - unsigned int attrib; - MSVCRT___time32_t time_create; - MSVCRT___time32_t time_access; - MSVCRT___time32_t time_write; - MSVCRT__fsize_t size; - char name[260]; -}; - -struct MSVCRT__finddata32i64_t { - unsigned int attrib; - MSVCRT___time32_t time_create; - MSVCRT___time32_t time_access; - MSVCRT___time32_t time_write; - __int64 DECLSPEC_ALIGN(8) size; - char name[260]; -}; - -struct MSVCRT__finddata64i32_t { - unsigned int attrib; - MSVCRT___time64_t time_create; - MSVCRT___time64_t time_access; - MSVCRT___time64_t time_write; - MSVCRT__fsize_t size; - char name[260]; -}; - -struct MSVCRT__finddata64_t { - unsigned int attrib; - MSVCRT___time64_t time_create; - MSVCRT___time64_t time_access; - MSVCRT___time64_t time_write; - __int64 DECLSPEC_ALIGN(8) size; - char name[260]; -}; - -struct MSVCRT__wfinddata32_t { - unsigned int attrib; - MSVCRT___time32_t time_create; - MSVCRT___time32_t time_access; - MSVCRT___time32_t time_write; - MSVCRT__fsize_t size; - MSVCRT_wchar_t name[260]; -}; - -struct MSVCRT__wfinddata32i64_t { - unsigned int attrib; - MSVCRT___time32_t time_create; - MSVCRT___time32_t time_access; - MSVCRT___time32_t time_write; - __int64 DECLSPEC_ALIGN(8) size; - MSVCRT_wchar_t name[260]; -}; - -struct MSVCRT__wfinddata64i32_t { - unsigned int attrib; - MSVCRT___time64_t time_create; - MSVCRT___time64_t time_access; - MSVCRT___time64_t time_write; - MSVCRT__fsize_t size; - MSVCRT_wchar_t name[260]; -}; - -struct MSVCRT__wfinddata64_t { - unsigned int attrib; - MSVCRT___time64_t time_create; - MSVCRT___time64_t time_access; - MSVCRT___time64_t time_write; - __int64 DECLSPEC_ALIGN(8) size; - MSVCRT_wchar_t name[260]; -}; - -struct MSVCRT___utimbuf32 -{ - MSVCRT___time32_t actime; - MSVCRT___time32_t modtime; -}; - -struct MSVCRT___utimbuf64 -{ - MSVCRT___time64_t actime; - MSVCRT___time64_t modtime; -}; - -/* for FreeBSD */ -#undef st_atime -#undef st_ctime -#undef st_mtime - -struct MSVCRT__stat32 { - MSVCRT__dev_t st_dev; - MSVCRT__ino_t st_ino; - unsigned short st_mode; - short st_nlink; - short st_uid; - short st_gid; - MSVCRT__dev_t st_rdev; - MSVCRT__off_t st_size; - MSVCRT___time32_t st_atime; - MSVCRT___time32_t st_mtime; - MSVCRT___time32_t st_ctime; -}; - -struct MSVCRT__stat32i64 { - MSVCRT__dev_t st_dev; - MSVCRT__ino_t st_ino; - unsigned short st_mode; - short st_nlink; - short st_uid; - short st_gid; - MSVCRT__dev_t st_rdev; - __int64 DECLSPEC_ALIGN(8) st_size; - MSVCRT___time32_t st_atime; - MSVCRT___time32_t st_mtime; - MSVCRT___time32_t st_ctime; -}; - -struct MSVCRT__stat64i32 { - MSVCRT__dev_t st_dev; - MSVCRT__ino_t st_ino; - unsigned short st_mode; - short st_nlink; - short st_uid; - short st_gid; - MSVCRT__dev_t st_rdev; - MSVCRT__off_t st_size; - MSVCRT___time64_t st_atime; - MSVCRT___time64_t st_mtime; - MSVCRT___time64_t st_ctime; -}; - -struct MSVCRT__stat64 { - MSVCRT__dev_t st_dev; - MSVCRT__ino_t st_ino; - unsigned short st_mode; - short st_nlink; - short st_uid; - short st_gid; - MSVCRT__dev_t st_rdev; - __int64 DECLSPEC_ALIGN(8) st_size; - MSVCRT___time64_t st_atime; - MSVCRT___time64_t st_mtime; - MSVCRT___time64_t st_ctime; -}; - -#ifdef _WIN64 -#define MSVCRT__finddata_t MSVCRT__finddata64i32_t -#define MSVCRT__finddatai64_t MSVCRT__finddata64_t -#define MSVCRT__wfinddata_t MSVCRT__wfinddata64i32_t -#define MSVCRT__wfinddatai64_t MSVCRT__wfinddata64_t -#define MSVCRT__stat MSVCRT__stat64i32 -#define MSVCRT__stati64 MSVCRT__stat64 -#else -#define MSVCRT__finddata_t MSVCRT__finddata32_t -#define MSVCRT__finddatai64_t MSVCRT__finddata32i64_t -#define MSVCRT__wfinddata_t MSVCRT__wfinddata32_t -#define MSVCRT__wfinddatai64_t MSVCRT__wfinddata32i64_t -#define MSVCRT__stat MSVCRT__stat32 -#define MSVCRT__stati64 MSVCRT__stat32i64 -#endif - -#define MSVCRT_WEOF (MSVCRT_wint_t)(0xFFFF) -#define MSVCRT_EOF (-1) -#define MSVCRT_TMP_MAX 0x7fff -#define MSVCRT_TMP_MAX_S 0x7fffffff -#define MSVCRT_RAND_MAX 0x7fff -#define MSVCRT_BUFSIZ 512 - -#define MSVCRT_SEEK_SET 0 -#define MSVCRT_SEEK_CUR 1 -#define MSVCRT_SEEK_END 2 +extern FILE MSVCRT__iob[]; #define MSVCRT_NO_CONSOLE_FD (-2) #define MSVCRT_NO_CONSOLE ((HANDLE)MSVCRT_NO_CONSOLE_FD) -#define MSVCRT_STDIN_FILENO 0 -#define MSVCRT_STDOUT_FILENO 1 -#define MSVCRT_STDERR_FILENO 2 +#define MSVCRT_stdin (MSVCRT__iob+STDIN_FILENO) +#define MSVCRT_stdout (MSVCRT__iob+STDOUT_FILENO) +#define MSVCRT_stderr (MSVCRT__iob+STDERR_FILENO) -/* more file._flag flags, but these conflict with Unix */ -#define MSVCRT__IOFBF 0x0000 -#define MSVCRT__IONBF 0x0004 -#define MSVCRT__IOLBF 0x0040 - -#define MSVCRT_FILENAME_MAX 260 -#define MSVCRT_DRIVE_MAX 3 -#define MSVCRT_FNAME_MAX 256 -#define MSVCRT_DIR_MAX 256 -#define MSVCRT_EXT_MAX 256 -#define MSVCRT_PATH_MAX 260 -#define MSVCRT_stdin (MSVCRT__iob+MSVCRT_STDIN_FILENO) -#define MSVCRT_stdout (MSVCRT__iob+MSVCRT_STDOUT_FILENO) -#define MSVCRT_stderr (MSVCRT__iob+MSVCRT_STDERR_FILENO) - -#define MSVCRT__P_WAIT 0 -#define MSVCRT__P_NOWAIT 1 -#define MSVCRT__P_OVERLAY 2 -#define MSVCRT__P_NOWAITO 3 -#define MSVCRT__P_DETACH 4 - -#define MSVCRT_EPERM 1 -#define MSVCRT_ENOENT 2 -#define MSVCRT_ESRCH 3 -#define MSVCRT_EINTR 4 -#define MSVCRT_EIO 5 -#define MSVCRT_ENXIO 6 -#define MSVCRT_E2BIG 7 -#define MSVCRT_ENOEXEC 8 -#define MSVCRT_EBADF 9 -#define MSVCRT_ECHILD 10 -#define MSVCRT_EAGAIN 11 -#define MSVCRT_ENOMEM 12 -#define MSVCRT_EACCES 13 -#define MSVCRT_EFAULT 14 -#define MSVCRT_EBUSY 16 -#define MSVCRT_EEXIST 17 -#define MSVCRT_EXDEV 18 -#define MSVCRT_ENODEV 19 -#define MSVCRT_ENOTDIR 20 -#define MSVCRT_EISDIR 21 -#define MSVCRT_EINVAL 22 -#define MSVCRT_ENFILE 23 -#define MSVCRT_EMFILE 24 -#define MSVCRT_ENOTTY 25 -#define MSVCRT_EFBIG 27 -#define MSVCRT_ENOSPC 28 -#define MSVCRT_ESPIPE 29 -#define MSVCRT_EROFS 30 -#define MSVCRT_EMLINK 31 -#define MSVCRT_EPIPE 32 -#define MSVCRT_EDOM 33 -#define MSVCRT_ERANGE 34 -#define MSVCRT_EDEADLK 36 -#define MSVCRT_EDEADLOCK MSVCRT_EDEADLK -#define MSVCRT_ENAMETOOLONG 38 -#define MSVCRT_ENOLCK 39 -#define MSVCRT_ENOSYS 40 -#define MSVCRT_ENOTEMPTY 41 -#define MSVCRT_EILSEQ 42 -#define MSVCRT_STRUNCATE 80 - -#define MSVCRT_LC_ALL 0 -#define MSVCRT_LC_COLLATE 1 -#define MSVCRT_LC_CTYPE 2 -#define MSVCRT_LC_MONETARY 3 -#define MSVCRT_LC_NUMERIC 4 -#define MSVCRT_LC_TIME 5 -#define MSVCRT_LC_MIN MSVCRT_LC_ALL -#define MSVCRT_LC_MAX MSVCRT_LC_TIME - -#define MSVCRT__HEAPEMPTY -1 -#define MSVCRT__HEAPOK -2 -#define MSVCRT__HEAPBADBEGIN -3 -#define MSVCRT__HEAPBADNODE -4 -#define MSVCRT__HEAPEND -5 -#define MSVCRT__HEAPBADPTR -6 - -#define MSVCRT__FREEENTRY 0 -#define MSVCRT__USEDENTRY 1 - -#define MSVCRT__OUT_TO_DEFAULT 0 -#define MSVCRT__OUT_TO_STDERR 1 -#define MSVCRT__OUT_TO_MSGBOX 2 -#define MSVCRT__REPORT_ERRMODE 3 - -/* ASCII char classification table - binary compatible */ -#define MSVCRT__UPPER 0x0001 /* C1_UPPER */ -#define MSVCRT__LOWER 0x0002 /* C1_LOWER */ -#define MSVCRT__DIGIT 0x0004 /* C1_DIGIT */ -#define MSVCRT__SPACE 0x0008 /* C1_SPACE */ -#define MSVCRT__PUNCT 0x0010 /* C1_PUNCT */ -#define MSVCRT__CONTROL 0x0020 /* C1_CNTRL */ -#define MSVCRT__BLANK 0x0040 /* C1_BLANK */ -#define MSVCRT__HEX 0x0080 /* C1_XDIGIT */ -#define MSVCRT__LEADBYTE 0x8000 -#define MSVCRT__ALPHA (0x0100|MSVCRT__UPPER|MSVCRT__LOWER) /* (C1_ALPHA|_UPPER|_LOWER) */ - -#define MSVCRT__IOREAD 0x0001 -#define MSVCRT__IOWRT 0x0002 -#define MSVCRT__IOMYBUF 0x0008 -#define MSVCRT__IOEOF 0x0010 -#define MSVCRT__IOERR 0x0020 -#define MSVCRT__IOSTRG 0x0040 -#define MSVCRT__IORW 0x0080 +/* internal file._flag flags */ #define MSVCRT__USERBUF 0x0100 #define MSVCRT__IOCOMMIT 0x4000 -#define MSVCRT__S_IEXEC 0x0040 -#define MSVCRT__S_IWRITE 0x0080 -#define MSVCRT__S_IREAD 0x0100 -#define MSVCRT__S_IFIFO 0x1000 -#define MSVCRT__S_IFCHR 0x2000 -#define MSVCRT__S_IFDIR 0x4000 -#define MSVCRT__S_IFREG 0x8000 -#define MSVCRT__S_IFMT 0xF000 +#ifdef __REACTOS__ +typedef void (__cdecl *__sighandler_t)(int); +#endif -#define MSVCRT__LK_UNLCK 0 -#define MSVCRT__LK_LOCK 1 -#define MSVCRT__LK_NBLCK 2 -#define MSVCRT__LK_RLCK 3 -#define MSVCRT__LK_NBRLCK 4 +#define _MAX__TIME64_T (((__time64_t)0x00000007 << 32) | 0x93406FFF) -#define MSVCRT__SH_COMPAT 0x00 /* Compatibility */ -#define MSVCRT__SH_DENYRW 0x10 /* Deny read/write */ -#define MSVCRT__SH_DENYWR 0x20 /* Deny write */ -#define MSVCRT__SH_DENYRD 0x30 /* Deny read */ -#define MSVCRT__SH_DENYNO 0x40 /* Deny nothing */ +_locale_t CDECL get_current_locale_noalloc(_locale_t locale) DECLSPEC_HIDDEN; +void CDECL free_locale_noalloc(_locale_t locale) DECLSPEC_HIDDEN; +pthreadlocinfo CDECL get_locinfo(void) DECLSPEC_HIDDEN; +pthreadmbcinfo CDECL get_mbcinfo(void) DECLSPEC_HIDDEN; +threadmbcinfo* create_mbcinfo(int, LCID, threadmbcinfo*) DECLSPEC_HIDDEN; +void free_locinfo(pthreadlocinfo) DECLSPEC_HIDDEN; +void free_mbcinfo(pthreadmbcinfo) DECLSPEC_HIDDEN; +int __cdecl __crtLCMapStringA(LCID, DWORD, const char*, int, char*, int, unsigned int, int) DECLSPEC_HIDDEN; -#define MSVCRT__O_RDONLY 0 -#define MSVCRT__O_WRONLY 1 -#define MSVCRT__O_RDWR 2 -#define MSVCRT__O_ACCMODE (MSVCRT__O_RDONLY|MSVCRT__O_WRONLY|MSVCRT__O_RDWR) -#define MSVCRT__O_APPEND 0x0008 -#define MSVCRT__O_RANDOM 0x0010 -#define MSVCRT__O_SEQUENTIAL 0x0020 -#define MSVCRT__O_TEMPORARY 0x0040 -#define MSVCRT__O_NOINHERIT 0x0080 -#define MSVCRT__O_CREAT 0x0100 -#define MSVCRT__O_TRUNC 0x0200 -#define MSVCRT__O_EXCL 0x0400 -#define MSVCRT__O_SHORT_LIVED 0x1000 -#define MSVCRT__O_TEXT 0x4000 -#define MSVCRT__O_BINARY 0x8000 -#define MSVCRT__O_RAW MSVCRT__O_BINARY -#define MSVCRT__O_WTEXT 0x10000 -#define MSVCRT__O_U16TEXT 0x20000 -#define MSVCRT__O_U8TEXT 0x40000 - -/* _statusfp bit flags */ -#define MSVCRT__SW_INEXACT 0x00000001 /* inexact (precision) */ -#define MSVCRT__SW_UNDERFLOW 0x00000002 /* underflow */ -#define MSVCRT__SW_OVERFLOW 0x00000004 /* overflow */ -#define MSVCRT__SW_ZERODIVIDE 0x00000008 /* zero divide */ -#define MSVCRT__SW_INVALID 0x00000010 /* invalid */ - -#define MSVCRT__SW_UNEMULATED 0x00000040 /* unemulated instruction */ -#define MSVCRT__SW_SQRTNEG 0x00000080 /* square root of a neg number */ -#define MSVCRT__SW_STACKOVERFLOW 0x00000200 /* FP stack overflow */ -#define MSVCRT__SW_STACKUNDERFLOW 0x00000400 /* FP stack underflow */ - -#define MSVCRT__SW_DENORMAL 0x00080000 /* denormal status bit */ - -/* fpclass constants */ -#define MSVCRT__FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */ -#define MSVCRT__FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */ -#define MSVCRT__FPCLASS_NINF 0x0004 /* Negative Infinity */ -#define MSVCRT__FPCLASS_NN 0x0008 /* Negative Normal */ -#define MSVCRT__FPCLASS_ND 0x0010 /* Negative Denormal */ -#define MSVCRT__FPCLASS_NZ 0x0020 /* Negative Zero */ -#define MSVCRT__FPCLASS_PZ 0x0040 /* Positive Zero */ -#define MSVCRT__FPCLASS_PD 0x0080 /* Positive Denormal */ -#define MSVCRT__FPCLASS_PN 0x0100 /* Positive Normal */ -#define MSVCRT__FPCLASS_PINF 0x0200 /* Positive Infinity */ - -/* fpclassify constants */ -#define MSVCRT_FP_INFINITE 1 -#define MSVCRT_FP_NAN 2 -#define MSVCRT_FP_NORMAL -1 -#define MSVCRT_FP_SUBNORMAL -2 -#define MSVCRT_FP_ZERO 0 - -#define MSVCRT__MCW_EM 0x0008001f -#define MSVCRT__MCW_IC 0x00040000 -#define MSVCRT__MCW_RC 0x00000300 -#define MSVCRT__MCW_PC 0x00030000 -#define MSVCRT__MCW_DN 0x03000000 - -#define MSVCRT__EM_INVALID 0x00000010 -#define MSVCRT__EM_DENORMAL 0x00080000 -#define MSVCRT__EM_ZERODIVIDE 0x00000008 -#define MSVCRT__EM_OVERFLOW 0x00000004 -#define MSVCRT__EM_UNDERFLOW 0x00000002 -#define MSVCRT__EM_INEXACT 0x00000001 -#define MSVCRT__IC_AFFINE 0x00040000 -#define MSVCRT__IC_PROJECTIVE 0x00000000 -#define MSVCRT__RC_CHOP 0x00000300 -#define MSVCRT__RC_UP 0x00000200 -#define MSVCRT__RC_DOWN 0x00000100 -#define MSVCRT__RC_NEAR 0x00000000 -#define MSVCRT__PC_24 0x00020000 -#define MSVCRT__PC_53 0x00010000 -#define MSVCRT__PC_64 0x00000000 -#define MSVCRT__DN_SAVE 0x00000000 -#define MSVCRT__DN_FLUSH 0x01000000 -#define MSVCRT__DN_FLUSH_OPERANDS_SAVE_RESULTS 0x02000000 -#define MSVCRT__DN_SAVE_OPERANDS_FLUSH_RESULTS 0x03000000 -#define MSVCRT__EM_AMBIGUOUS 0x80000000 - -typedef struct -{ - unsigned int control; - unsigned int status; -} MSVCRT_fenv_t; - -#define MSVCRT_CLOCKS_PER_SEC 1000 - -/* signals */ -#define MSVCRT_SIGINT 2 -#define MSVCRT_SIGILL 4 -#define MSVCRT_SIGFPE 8 -#define MSVCRT_SIGSEGV 11 -#define MSVCRT_SIGTERM 15 -#define MSVCRT_SIGBREAK 21 -#define MSVCRT_SIGABRT 22 -#define MSVCRT_NSIG (MSVCRT_SIGABRT + 1) - -typedef void (__cdecl *MSVCRT___sighandler_t)(int); - -#define MSVCRT_SIG_DFL ((MSVCRT___sighandler_t)0) -#define MSVCRT_SIG_IGN ((MSVCRT___sighandler_t)1) -#define MSVCRT_SIG_ERR ((MSVCRT___sighandler_t)-1) - -#define MSVCRT__FPE_INVALID 0x81 -#define MSVCRT__FPE_DENORMAL 0x82 -#define MSVCRT__FPE_ZERODIVIDE 0x83 -#define MSVCRT__FPE_OVERFLOW 0x84 -#define MSVCRT__FPE_UNDERFLOW 0x85 -#define MSVCRT__FPE_INEXACT 0x86 -#define MSVCRT__FPE_UNEMULATED 0x87 -#define MSVCRT__FPE_SQRTNEG 0x88 -#define MSVCRT__FPE_STACKOVERFLOW 0x8a -#define MSVCRT__FPE_STACKUNDERFLOW 0x8b -#define MSVCRT__FPE_EXPLICITGEN 0x8c - -#define _MS 0x01 -#define _MP 0x02 -#define _M1 0x04 -#define _M2 0x08 - -#define _SBUP 0x10 -#define _SBLOW 0x20 - -#define _MBC_SINGLE 0 -#define _MBC_LEAD 1 -#define _MBC_TRAIL 2 -#define _MBC_ILLEGAL -1 - -#define _MB_CP_SBCS 0 -#define _MB_CP_OEM -2 -#define _MB_CP_ANSI -3 -#define _MB_CP_LOCALE -4 - -#define MSVCRT__TRUNCATE ((MSVCRT_size_t)-1) - -#define _MAX__TIME64_T (((MSVCRT___time64_t)0x00000007 << 32) | 0x93406FFF) - -/* _set_abort_behavior codes */ -#define MSVCRT__WRITE_ABORT_MSG 1 -#define MSVCRT__CALL_REPORTFAULT 2 - -/* _get_output_format return code */ -#define MSVCRT__TWO_DIGIT_EXPONENT 0x1 - -#define MSVCRT__NLSCMPERROR ((unsigned int)0x7fffffff) - -void __cdecl MSVCRT_free(void*); -void* __cdecl MSVCRT_malloc(MSVCRT_size_t); -void* __cdecl MSVCRT_calloc(MSVCRT_size_t,MSVCRT_size_t); -void* __cdecl MSVCRT_realloc(void*,MSVCRT_size_t); - -int __cdecl MSVCRT_iswalpha(MSVCRT_wint_t); -int __cdecl MSVCRT_iswspace(MSVCRT_wint_t); -int __cdecl MSVCRT_iswdigit(MSVCRT_wint_t); -int __cdecl MSVCRT_isleadbyte(int); -int __cdecl MSVCRT__isleadbyte_l(int, MSVCRT__locale_t); -int __cdecl MSVCRT__isspace_l(int, MSVCRT__locale_t); -int __cdecl MSVCRT__iswspace_l(MSVCRT_wchar_t, MSVCRT__locale_t); - -void __cdecl MSVCRT__lock_file(MSVCRT_FILE*); -void __cdecl MSVCRT__unlock_file(MSVCRT_FILE*); -int __cdecl MSVCRT_fgetc(MSVCRT_FILE*); -int __cdecl MSVCRT__fgetc_nolock(MSVCRT_FILE*); -int __cdecl MSVCRT__fputc_nolock(int,MSVCRT_FILE*); -int __cdecl MSVCRT_ungetc(int,MSVCRT_FILE*); -int __cdecl MSVCRT__ungetc_nolock(int,MSVCRT_FILE*); -MSVCRT_wint_t __cdecl MSVCRT_fgetwc(MSVCRT_FILE*); -MSVCRT_wint_t __cdecl MSVCRT__fgetwc_nolock(MSVCRT_FILE*); -MSVCRT_wint_t __cdecl MSVCRT__fputwc_nolock(MSVCRT_wint_t,MSVCRT_FILE*); -MSVCRT_wint_t __cdecl MSVCRT_ungetwc(MSVCRT_wint_t,MSVCRT_FILE*); -MSVCRT_wint_t __cdecl MSVCRT__ungetwc_nolock(MSVCRT_wint_t, MSVCRT_FILE*); -int __cdecl MSVCRT__fseeki64_nolock(MSVCRT_FILE*,__int64,int); -__int64 __cdecl MSVCRT__ftelli64(MSVCRT_FILE* file); -__int64 __cdecl MSVCRT__ftelli64_nolock(MSVCRT_FILE*); -void __cdecl MSVCRT__exit(int); -void __cdecl MSVCRT_abort(void); -MSVCRT_ulong* __cdecl MSVCRT___doserrno(void); -int* __cdecl MSVCRT__errno(void); -char* __cdecl MSVCRT_getenv(const char*); -MSVCRT_size_t __cdecl MSVCRT__fread_nolock(void*,MSVCRT_size_t,MSVCRT_size_t,MSVCRT_FILE*); -MSVCRT_size_t __cdecl MSVCRT__fread_nolock_s(void*,MSVCRT_size_t,MSVCRT_size_t,MSVCRT_size_t,MSVCRT_FILE*); -MSVCRT_size_t __cdecl MSVCRT__fwrite_nolock(const void*,MSVCRT_size_t,MSVCRT_size_t,MSVCRT_FILE*); -int __cdecl MSVCRT_fclose(MSVCRT_FILE*); -int __cdecl MSVCRT__fclose_nolock(MSVCRT_FILE*); -int __cdecl MSVCRT__fflush_nolock(MSVCRT_FILE*); -void __cdecl MSVCRT_terminate(void); -MSVCRT_FILE* __cdecl MSVCRT__iob_func(void); -MSVCRT_clock_t __cdecl MSVCRT_clock(void); -MSVCRT___time32_t __cdecl MSVCRT__time32(MSVCRT___time32_t*); -MSVCRT___time64_t __cdecl MSVCRT__time64(MSVCRT___time64_t*); -MSVCRT_FILE* __cdecl MSVCRT__fdopen(int, const char *); -MSVCRT_FILE* __cdecl MSVCRT__wfdopen(int, const MSVCRT_wchar_t *); -int __cdecl MSVCRT_vsnprintf(char *str, MSVCRT_size_t len, const char *format, __ms_va_list valist); -int __cdecl MSVCRT_vsnwprintf(MSVCRT_wchar_t *str, MSVCRT_size_t len, - const MSVCRT_wchar_t *format, __ms_va_list valist ); -int WINAPIV MSVCRT__snwprintf(MSVCRT_wchar_t*, unsigned int, const MSVCRT_wchar_t*, ...); -int WINAPIV MSVCRT_sprintf(char*,const char*,...); -int WINAPIV MSVCRT__snprintf(char*,unsigned int,const char*,...); -int WINAPIV MSVCRT__scprintf(const char*,...); -int __cdecl MSVCRT_raise(int sig); -int __cdecl MSVCRT__set_printf_count_output(int); - -#define MSVCRT__ENABLE_PER_THREAD_LOCALE 1 -#define MSVCRT__DISABLE_PER_THREAD_LOCALE 2 - -extern MSVCRT__locale_t MSVCRT_locale; -MSVCRT_pthreadlocinfo get_locinfo(void) DECLSPEC_HIDDEN; -MSVCRT_pthreadmbcinfo get_mbcinfo(void) DECLSPEC_HIDDEN; -void __cdecl MSVCRT__free_locale(MSVCRT__locale_t); -void free_locinfo(MSVCRT_pthreadlocinfo) DECLSPEC_HIDDEN; -void free_mbcinfo(MSVCRT_pthreadmbcinfo) DECLSPEC_HIDDEN; -int _setmbcp_l(int, LCID, MSVCRT_pthreadmbcinfo) DECLSPEC_HIDDEN; - -#ifndef __WINE_MSVCRT_TEST -int __cdecl MSVCRT__write(int,const void*,unsigned int); -int __cdecl _getch(void); -int __cdecl _ismbblead(unsigned int); -int __cdecl _ismbblead_l(unsigned int, MSVCRT__locale_t); -int __cdecl _ismbclegal(unsigned int c); -int __cdecl _ismbstrail(const unsigned char* start, const unsigned char* str); -int __cdecl MSVCRT_mbtowc(MSVCRT_wchar_t*,const char*,MSVCRT_size_t); -int __cdecl MSVCRT_mbtowc_l(MSVCRT_wchar_t*,const char*,MSVCRT_size_t,MSVCRT__locale_t); -MSVCRT_size_t __cdecl MSVCRT_mbstowcs(MSVCRT_wchar_t*,const char*,MSVCRT_size_t); -MSVCRT_size_t __cdecl MSVCRT__mbstowcs_l(MSVCRT_wchar_t*, const char*, MSVCRT_size_t, MSVCRT__locale_t); -int __cdecl MSVCRT__mbstowcs_s_l(MSVCRT_size_t*, MSVCRT_wchar_t*, - MSVCRT_size_t, const char*, MSVCRT_size_t, MSVCRT__locale_t); -MSVCRT_size_t __cdecl MSVCRT_wcstombs(char*,const MSVCRT_wchar_t*,MSVCRT_size_t); -MSVCRT_size_t __cdecl MSVCRT__wcstombs_l(char*, const MSVCRT_wchar_t*, MSVCRT_size_t, MSVCRT__locale_t); -MSVCRT_intptr_t __cdecl MSVCRT__spawnve(int,const char*,const char* const *,const char* const *); -MSVCRT_intptr_t __cdecl MSVRT__spawnvpe(int,const char*,const char* const *,const char* const *); -MSVCRT_intptr_t __cdecl MSVCRT__wspawnve(int,const MSVCRT_wchar_t*,const MSVCRT_wchar_t* const *,const MSVCRT_wchar_t* const *); -MSVCRT_intptr_t __cdecl MSVCRT__wspawnvpe(int,const MSVCRT_wchar_t*,const MSVCRT_wchar_t* const *,const MSVCRT_wchar_t* const *); -void __cdecl MSVCRT__searchenv(const char*,const char*,char*); -int __cdecl MSVCRT__getdrive(void); -char* __cdecl MSVCRT__strdup(const char*); -char* __cdecl MSVCRT__strnset(char*,int,MSVCRT_size_t); -char* __cdecl _strset(char*,int); -int __cdecl _ungetch(int); -int __cdecl _cputs(const char*); -int WINAPIV _cprintf(const char*,...); -int WINAPIV _cwprintf(const MSVCRT_wchar_t*,...); -char*** __cdecl MSVCRT___p__environ(void); -int* __cdecl __p___mb_cur_max(void); -int* __cdecl MSVCRT___p__fmode(void); -MSVCRT_wchar_t* __cdecl MSVCRT__wcsdup(const MSVCRT_wchar_t*); -MSVCRT_size_t __cdecl MSVCRT_strnlen(const char *,MSVCRT_size_t); -MSVCRT_size_t __cdecl MSVCRT_wcsnlen(const MSVCRT_wchar_t*,MSVCRT_size_t); -MSVCRT_wchar_t*** __cdecl MSVCRT___p__wenviron(void); -INT __cdecl MSVCRT_wctomb(char*,MSVCRT_wchar_t); -int __cdecl MSVCRT__wctomb_l(char*, MSVCRT_wchar_t, MSVCRT__locale_t); -char* __cdecl MSVCRT__strdate(char* date); -char* __cdecl MSVCRT__strtime(char* date); -int __cdecl _setmbcp(int); -int __cdecl MSVCRT__close(int); -int __cdecl MSVCRT__dup(int); -int __cdecl MSVCRT__dup2(int, int); -int __cdecl MSVCRT__pipe(int *, unsigned int, int); -MSVCRT_wchar_t* __cdecl MSVCRT__wgetenv(const MSVCRT_wchar_t*); -void __cdecl MSVCRT__wsearchenv(const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, MSVCRT_wchar_t*); -MSVCRT_intptr_t __cdecl MSVCRT__spawnvpe(int, const char*, const char* const*, const char* const*); -void __cdecl MSVCRT__invalid_parameter(const MSVCRT_wchar_t *expr, const MSVCRT_wchar_t *func, - const MSVCRT_wchar_t *file, unsigned int line, MSVCRT_uintptr_t arg); -int __cdecl MSVCRT__toupper_l(int,MSVCRT__locale_t); -int __cdecl MSVCRT__tolower_l(int,MSVCRT__locale_t); -int __cdecl MSVCRT__towupper_l(MSVCRT_wint_t,MSVCRT__locale_t); -int __cdecl MSVCRT__towlower_l(MSVCRT_wint_t,MSVCRT__locale_t); -int __cdecl MSVCRT__toupper(int); /* only use on lower-case ASCII characters */ -int __cdecl MSVCRT__stricmp(const char*, const char*); -int __cdecl MSVCRT__strnicmp(const char*, const char*, MSVCRT_size_t); -int __cdecl MSVCRT__strnicoll_l(const char*, const char*, MSVCRT_size_t, MSVCRT__locale_t); -int __cdecl MSVCRT__strncoll_l(const char*, const char*, MSVCRT_size_t, MSVCRT__locale_t); -int __cdecl MSVCRT_strncmp(const char*, const char*, MSVCRT_size_t); -int __cdecl MSVCRT_strcmp(const char*, const char*); -char* __cdecl MSVCRT_strstr(const char*, const char*); -unsigned int __cdecl MSVCRT__get_output_format(void); -char* __cdecl MSVCRT_strtok_s(char*, const char*, char**); -double parse_double(MSVCRT_wchar_t (*)(void*), void (*)(void*), void*, MSVCRT_pthreadlocinfo, int*); +enum fpmod { + FP_ROUND_ZERO, /* only used when dropped part contains only zeros */ + FP_ROUND_DOWN, + FP_ROUND_EVEN, + FP_ROUND_UP, + FP_VAL_INFINITY, + FP_VAL_NAN +}; +struct fpnum { + int sign; + int exp; + ULONGLONG m; + enum fpmod mod; +}; +struct fpnum fpnum_parse(wchar_t (*)(void*), void (*)(void*), + void*, pthreadlocinfo, BOOL) DECLSPEC_HIDDEN; +int fpnum_double(struct fpnum*, double*) DECLSPEC_HIDDEN; /* Maybe one day we'll enable the invalid parameter handlers with the full set of information (msvcrXXd) * #define MSVCRT_INVALID_PMT(x) MSVCRT_call_invalid_parameter_handler(x, __FUNCTION__, __FILE__, __LINE__, 0) * #define MSVCRT_CHECK_PMT(x) ((x) ? TRUE : MSVCRT_INVALID_PMT(#x),FALSE) * Until this is done, just keep the same semantics for CHECK_PMT(), but without generating / sending * any information - * NB : MSVCRT_call_invalid_parameter_handler is a wrapper around MSVCRT__invalid_parameter in order + * NB : MSVCRT_call_invalid_parameter_handler is a wrapper around _invalid_parameter in order * to do the Ansi to Unicode transformation */ -#define MSVCRT_INVALID_PMT(x,err) (*MSVCRT__errno() = (err), MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0)) +#define MSVCRT_INVALID_PMT(x,err) (*_errno() = (err), _invalid_parameter(NULL, NULL, NULL, 0, 0)) #define MSVCRT_CHECK_PMT_ERR(x,err) ((x) || (MSVCRT_INVALID_PMT( 0, (err) ), FALSE)) -#define MSVCRT_CHECK_PMT(x) MSVCRT_CHECK_PMT_ERR((x), MSVCRT_EINVAL) -#endif +#define MSVCRT_CHECK_PMT(x) MSVCRT_CHECK_PMT_ERR((x), EINVAL) -#define MSVCRT__ARGMAX 100 typedef int (*puts_clbk_a)(void*, int, const char*); -typedef int (*puts_clbk_w)(void*, int, const MSVCRT_wchar_t*); +typedef int (*puts_clbk_w)(void*, int, const wchar_t*); typedef union _printf_arg { void *get_ptr; @@ -1217,33 +346,15 @@ typedef union _printf_arg LONGLONG get_longlong; double get_double; } printf_arg; -typedef printf_arg (*args_clbk)(void*, int, int, __ms_va_list*); -int pf_printf_a(puts_clbk_a, void*, const char*, MSVCRT__locale_t, - DWORD, args_clbk, void*, __ms_va_list*) DECLSPEC_HIDDEN; -int pf_printf_w(puts_clbk_w, void*, const MSVCRT_wchar_t*, MSVCRT__locale_t, - DWORD, args_clbk, void*, __ms_va_list*) DECLSPEC_HIDDEN; -int create_positional_ctx_a(void*, const char*, __ms_va_list) DECLSPEC_HIDDEN; -int create_positional_ctx_w(void*, const MSVCRT_wchar_t*, __ms_va_list) DECLSPEC_HIDDEN; -printf_arg arg_clbk_valist(void*, int, int, __ms_va_list*) DECLSPEC_HIDDEN; -printf_arg arg_clbk_positional(void*, int, int, __ms_va_list*) DECLSPEC_HIDDEN; - -#define MSVCRT_FLT_MIN 1.175494351e-38F -#define MSVCRT_DBL_MIN 2.2250738585072014e-308 -#define MSVCRT__OVERFLOW 3 -#define MSVCRT__UNDERFLOW 4 - -#define MSVCRT_FP_ILOGB0 (-MSVCRT_INT_MAX - 1) -#define MSVCRT_FP_ILOGBNAN MSVCRT_INT_MAX - -typedef struct -{ - float f; -} MSVCRT__CRT_FLOAT; - -typedef struct -{ - double x; -} MSVCRT__CRT_DOUBLE; +typedef printf_arg (*args_clbk)(void*, int, int, va_list*); +int pf_printf_a(puts_clbk_a, void*, const char*, _locale_t, + DWORD, args_clbk, void*, va_list*) DECLSPEC_HIDDEN; +int pf_printf_w(puts_clbk_w, void*, const wchar_t*, _locale_t, + DWORD, args_clbk, void*, va_list*) DECLSPEC_HIDDEN; +int create_positional_ctx_a(void*, const char*, va_list) DECLSPEC_HIDDEN; +int create_positional_ctx_w(void*, const wchar_t*, va_list) DECLSPEC_HIDDEN; +printf_arg arg_clbk_valist(void*, int, int, va_list*) DECLSPEC_HIDDEN; +printf_arg arg_clbk_positional(void*, int, int, va_list*) DECLSPEC_HIDDEN; extern char* __cdecl __unDName(char *,const char*,int,malloc_func_t,free_func_t,unsigned short int); @@ -1267,225 +378,28 @@ extern char* __cdecl __unDName(char *,const char*,int,malloc_func_t,free_func_t, #define UNDNAME_NO_SPECIAL_SYMS (0x4000) #define UNDNAME_NO_COMPLEX_TYPE (0x8000) -#define UCRTBASE_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION (0x0001) -#define UCRTBASE_PRINTF_STANDARD_SNPRINTF_BEHAVIOUR (0x0002) -#define UCRTBASE_PRINTF_LEGACY_WIDE_SPECIFIERS (0x0004) -#define UCRTBASE_PRINTF_LEGACY_MSVCRT_COMPATIBILITY (0x0008) -#define UCRTBASE_PRINTF_LEGACY_THREE_DIGIT_EXPONENTS (0x0010) - -#define UCRTBASE_PRINTF_MASK (0x001F) +#define UCRTBASE_PRINTF_MASK ( \ + _CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION | \ + _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR | \ + _CRT_INTERNAL_PRINTF_LEGACY_WIDE_SPECIFIERS | \ + _CRT_INTERNAL_PRINTF_LEGACY_MSVCRT_COMPATIBILITY | \ + _CRT_INTERNAL_PRINTF_LEGACY_THREE_DIGIT_EXPONENTS | \ + _CRT_INTERNAL_PRINTF_STANDARD_ROUNDING ) #define MSVCRT_PRINTF_POSITIONAL_PARAMS (0x0100) #define MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER (0x0200) -#define UCRTBASE_SCANF_SECURECRT (0x0001) -#define UCRTBASE_SCANF_LEGACY_WIDE_SPECIFIERS (0x0002) -#define UCRTBASE_SCANF_LEGACY_MSVCRT_COMPATIBILITY (0x0004) - -#define UCRTBASE_SCANF_MASK (0x0007) +#define UCRTBASE_SCANF_MASK ( \ + _CRT_INTERNAL_SCANF_SECURECRT | \ + _CRT_INTERNAL_SCANF_LEGACY_WIDE_SPECIFIERS | \ + _CRT_INTERNAL_SCANF_LEGACY_MSVCRT_COMPATIBILITY ) #define COOPERATIVE_TIMEOUT_INFINITE ((unsigned int)-1) #define COOPERATIVE_WAIT_TIMEOUT ~0 -typedef enum { - _FpCodeUnspecified, - _FpCodeAdd, - _FpCodeSubtract, - _FpCodeMultiply, - _FpCodeDivide, - _FpCodeSquareRoot, - _FpCodeRemainder, - _FpCodeCompare, - _FpCodeConvert, - _FpCodeRound, - _FpCodeTruncate, - _FpCodeFloor, - _FpCodeCeil, - _FpCodeAcos, - _FpCodeAsin, - _FpCodeAtan, - _FpCodeAtan2, - _FpCodeCabs, - _FpCodeCos, - _FpCodeCosh, - _FpCodeExp, - _FpCodeFabs, - _FpCodeFmod, - _FpCodeFrexp, - _FpCodeHypot, - _FpCodeLdexp, - _FpCodeLog, - _FpCodeLog10, - _FpCodeModf, - _FpCodePow, - _FpCodeSin, - _FpCodeSinh, - _FpCodeTan, - _FpCodeTanh, - _FpCodeY0, - _FpCodeY1, - _FpCodeYn, - _FpCodeLogb, - _FpCodeNextafter, - _FpCodeNegate, - _FpCodeFmin, - _FpCodeFmax, - _FpCodeConvertTrunc, - _XMMIAddps, - _XMMIAddss, - _XMMISubps, - _XMMISubss, - _XMMIMulps, - _XMMIMulss, - _XMMIDivps, - _XMMIDivss, - _XMMISqrtps, - _XMMISqrtss, - _XMMIMaxps, - _XMMIMaxss, - _XMMIMinps, - _XMMIMinss, - _XMMICmpps, - _XMMICmpss, - _XMMIComiss, - _XMMIUComiss, - _XMMICvtpi2ps, - _XMMICvtsi2ss, - _XMMICvtps2pi, - _XMMICvtss2si, - _XMMICvttps2pi, - _XMMICvttss2si, - _XMMIAddsubps, - _XMMIHaddps, - _XMMIHsubps, - _XMMI2Addpd, - _XMMI2Addsd, - _XMMI2Subpd, - _XMMI2Subsd, - _XMMI2Mulpd, - _XMMI2Mulsd, - _XMMI2Divpd, - _XMMI2Divsd, - _XMMI2Sqrtpd, - _XMMI2Sqrtsd, - _XMMI2Maxpd, - _XMMI2Maxsd, - _XMMI2Minpd, - _XMMI2Minsd, - _XMMI2Cmppd, - _XMMI2Cmpsd, - _XMMI2Comisd, - _XMMI2UComisd, - _XMMI2Cvtpd2pi, - _XMMI2Cvtsd2si, - _XMMI2Cvttpd2pi, - _XMMI2Cvttsd2si, - _XMMI2Cvtps2pd, - _XMMI2Cvtss2sd, - _XMMI2Cvtpd2ps, - _XMMI2Cvtsd2ss, - _XMMI2Cvtdq2ps, - _XMMI2Cvttps2dq, - _XMMI2Cvtps2dq, - _XMMI2Cvttpd2dq, - _XMMI2Cvtpd2dq, - _XMMI2Addsubpd, - _XMMI2Haddpd, - _XMMI2Hsubpd, -} _FP_OPERATION_CODE; - -typedef enum { - _FpFormatFp32, - _FpFormatFp64, - _FpFormatFp80, - _FpFormatFp128, - _FpFormatI16, - _FpFormatI32, - _FpFormatI64, - _FpFormatU16, - _FpFormatU32, - _FpFormatU64, - _FpFormatBcd80, - _FpFormatCompare, - _FpFormatString, -} _FPIEEE_FORMAT; - -typedef float _FP32; -typedef double _FP64; -typedef short _I16; -typedef int _I32; -typedef unsigned short _U16; -typedef unsigned int _U32; -typedef __int64 _Q64; - -typedef struct { - unsigned short W[5]; -} _FP80; - -typedef struct DECLSPEC_ALIGN(16) { - MSVCRT_ulong W[4]; -} _FP128; - -typedef struct DECLSPEC_ALIGN(8) { - MSVCRT_ulong W[2]; -} _I64; - -typedef struct DECLSPEC_ALIGN(8) { - MSVCRT_ulong W[2]; -} _U64; - -typedef struct { - unsigned short W[5]; -} _BCD80; - -typedef struct DECLSPEC_ALIGN(16) { - _Q64 W[2]; -} _FPQ64; - -typedef struct { - union { - _FP32 Fp32Value; - _FP64 Fp64Value; - _FP80 Fp80Value; - _FP128 Fp128Value; - _I16 I16Value; - _I32 I32Value; - _I64 I64Value; - _U16 U16Value; - _U32 U32Value; - _U64 U64Value; - _BCD80 Bcd80Value; - char *StringValue; - int CompareValue; - _Q64 Q64Value; - _FPQ64 Fpq64Value; - } Value; - unsigned int OperandValid : 1; - unsigned int Format : 4; -} _FPIEEE_VALUE; - -typedef struct { - unsigned int Inexact : 1; - unsigned int Underflow : 1; - unsigned int Overflow : 1; - unsigned int ZeroDivide : 1; - unsigned int InvalidOperation : 1; -} _FPIEEE_EXCEPTION_FLAGS; - -typedef struct { - unsigned int RoundingMode : 2; - unsigned int Precision : 3; - unsigned int Operation :12; - _FPIEEE_EXCEPTION_FLAGS Cause; - _FPIEEE_EXCEPTION_FLAGS Enable; - _FPIEEE_EXCEPTION_FLAGS Status; - _FPIEEE_VALUE Operand1; - _FPIEEE_VALUE Operand2; - _FPIEEE_VALUE Result; -} _FPIEEE_RECORD, *_PFPIEEE_RECORD; - #define INHERIT_THREAD_PRIORITY 0xF000 + #ifdef __REACTOS__ #define __wine_longjmp longjmp #define __wine_jmp_buf _JBTYPE diff --git a/sdk/lib/crt/wine/mtdll.h b/sdk/lib/crt/wine/mtdll.h index c01beaff93c..87eebd97dd4 100644 --- a/sdk/lib/crt/wine/mtdll.h +++ b/sdk/lib/crt/wine/mtdll.h @@ -19,22 +19,9 @@ #ifndef WINE_MTDLL_H #define WINE_MTDLL_H -#if defined(_MT) - -#define _mlock(locknum) _lock(locknum) -#define _munlock(locknum) _unlock(locknum) - void __cdecl _unlock( int locknum ); void __cdecl _lock( int locknum ); -#else - -#define _mlock(locknum) do {} while(0) -#define _munlock(locknum) do {} while(0) - -#endif - - #define _SIGNAL_LOCK 1 #define _IOB_SCAN_LOCK 2 #define _TMPNAM_LOCK 3 diff --git a/sdk/lib/crt/wine/undname.c b/sdk/lib/crt/wine/undname.c index df3e4e8cc80..0119a1956fb 100644 --- a/sdk/lib/crt/wine/undname.c +++ b/sdk/lib/crt/wine/undname.c @@ -19,9 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - #include #include #include @@ -31,6 +28,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); +#ifdef __REACTOS__ +#define MSVCRT_atoi atoi +#define MSVCRT_isdigit isdigit +#define MSVCRT_sprintf sprintf +#endif + /* TODO: * - document a bit (grammar + functions) * - back-port this new code into tools/winedump/msmangle.c @@ -233,7 +236,7 @@ static char* str_array_get_ref(struct array* cref, unsigned idx) * Helper for printf type of command (only %s and %c are implemented) * while dynamically allocating the buffer */ -static char* str_printf(struct parsed_symbol* sym, const char* format, ...) +static char* WINAPIV str_printf(struct parsed_symbol* sym, const char* format, ...) { va_list args; unsigned int len = 1, i, sz; @@ -882,7 +885,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct, goto done; if (modifier) modifier = str_printf(sym, "%s %s", modifier, ptr_modif); - else if(ptr_modif[0]) + else if(ptr_modif) modifier = str_printf(sym, " %s", ptr_modif); if (!get_calling_convention(*sym->current++, &call_conv, &exported, diff --git a/sdk/tools/winesync/crt.cfg b/sdk/tools/winesync/crt.cfg index 81308194937..5448ee622e2 100644 --- a/sdk/tools/winesync/crt.cfg +++ b/sdk/tools/winesync/crt.cfg @@ -13,4 +13,4 @@ files: dlls/msvcrt/mtdll.h: sdk/lib/crt/wine/mtdll.h dlls/msvcrt/undname.c: sdk/lib/crt/wine/undname.c tags: - wine: wine-5.0 + wine: wine-7.0