ObjFW  Diff

Differences From Artifact [7f6288ce90]:

To Artifact [b7aba5c4db]:


788
789
790
791
792
793
794
795
796
797



798
799
800

801
802




803

804
805


806
807
808
809
810
811
812
788
789
790
791
792
793
794



795
796
797
798
799
800
801


802
803
804
805
806
807


808
809
810
811
812
813
814
815
816







-
-
-
+
+
+



+
-
-
+
+
+
+

+
-
-
+
+







typedef EXCEPTION_DISPOSITION (*seh_personality_fn)(PEXCEPTION_RECORD, void *,
    PCONTEXT, PDISPATCHER_CONTEXT);
static seh_personality_fn __gxx_personality_seh0;

OF_CONSTRUCTOR()
{
	/*
	 * This only works if the application uses libstdc++-6.dll.
	 * There is unfortunately no other way, as Windows does not support
	 * proper weak linking.
	 * This only works if the application uses libc++.dll or
	 * libstdc++-6.dll. There is unfortunately no other way, as Windows
	 * does not support proper weak linking.
	 */

	HMODULE module;

	if ((module = GetModuleHandle("libstdc++-6")) == NULL)
		return;
	module = GetModuleHandle("libc++");

	if (module == NULL)
		module = GetModuleHandle("libstdc++-6");

	if (module != NULL)
	__gxx_personality_seh0 = (seh_personality_fn)
	    GetProcAddress(module, "__gxx_personality_seh0");
		__gxx_personality_seh0 = (seh_personality_fn)
		    GetProcAddress(module, "__gxx_personality_seh0");
}

EXCEPTION_DISPOSITION
__gnu_objc_personality_seh0(PEXCEPTION_RECORD ms_exc, void *this_frame,
    PCONTEXT ms_orig_context, PDISPATCHER_CONTEXT ms_disp)
{
	struct _Unwind_Exception *ex =