summaryrefslogtreecommitdiff
path: root/src/Vendor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Vendor.c')
-rw-r--r--src/Vendor.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/Vendor.c b/src/Vendor.c
index 08e7e41..4cd0b9b 100644
--- a/src/Vendor.c
+++ b/src/Vendor.c
@@ -112,22 +112,12 @@ void XawVendorShellExtResize(Widget);
void XawVendorStructureNotifyHandler(Widget, XtPointer, XEvent*, Boolean*);
-#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__)
+#if defined(__CYGWIN__) || defined(__MINGW32__)
/* to fix the EditRes problem because of wrong linker semantics */
extern WidgetClass vendorShellWidgetClass; /* from Xt/Vendor.c */
extern VendorShellClassRec _XawVendorShellClassRec;
void _XawFixupVendorShell(void);
-#if defined(__APPLE__)
-__attribute__((constructor))
-static void __VendorShellHack(void)
-{
- vendorShellWidgetClass = (WidgetClass)(&_XawVendorShellClassRec);
- _XawFixupVendorShell();
-}
-#endif
-
-#if defined(__CYGWIN__) || defined(__MINGW32__)
int __stdcall DllMain(unsigned long, unsigned long, void *);
int __stdcall
@@ -144,7 +134,6 @@ DllMain(unsigned long mod_handle, unsigned long flag, void *routine)
}
return 1;
}
-#endif
#define vendorShellClassRec _XawVendorShellClassRec
@@ -162,6 +151,9 @@ static CompositeClassExtensionRec vendorCompositeExt = {
#endif
#define SuperClass (&wmShellClassRec)
+#if defined(__APPLE__)
+__attribute__((weak))
+#endif
externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = {
{
/* superclass */ (WidgetClass)SuperClass,
@@ -223,10 +215,11 @@ externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = {
}
};
-#if !defined(__APPLE__)
+#if defined(__APPLE__)
+__attribute__((weak))
+#endif
externaldef(vendorshellwidgetclass) WidgetClass vendorShellWidgetClass =
(WidgetClass) (&vendorShellClassRec);
-#endif
#ifdef XAW_INTERNATIONALIZATION
/***************************************************************************
@@ -470,7 +463,7 @@ XawVendorShellClassPartInit(WidgetClass class)
}
#endif
-#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__)
+#if defined(__CYGWIN__) || defined(__MINGW32__)
/* shared libraries on these platforms have the wrong semantics */
/* symbols do not get resolved external to the shared library */
void