summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Huddleston Sequoia <jeremyhu@apple.com>2016-01-06 22:21:01 -0800
committerJeremy Huddleston Sequoia <jeremyhu@apple.com>2016-08-29 22:16:36 -0700
commitb3049d9b13333c0e67f1f23959227020741f486b (patch)
tree78249f90245236cd3116ca69019d7e51cefffd90 /src
parent4a7626b5127c0eb597cd2b8d0ae3de0286b74d7c (diff)
downloadxorg-lib-libXaw-b3049d9b13333c0e67f1f23959227020741f486b.tar.gz
darwin: Remove incorrect export of vendorShellClassRec and vendorShellWidgetClass
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Diffstat (limited to 'src')
-rw-r--r--src/Vendor.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/Vendor.c b/src/Vendor.c
index b8797f5..d14b796 100644
--- a/src/Vendor.c
+++ b/src/Vendor.c
@@ -111,12 +111,20 @@ static XtResource resources[] = {
*
***************************************************************************/
-#if defined(__CYGWIN__) || defined(__MINGW32__)
+#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__)
/* to fix the EditRes problem because of wrong linker semantics */
extern WidgetClass vendorShellWidgetClass; /* from Xt/Vendor.c */
extern VendorShellClassRec _XawVendorShellClassRec;
extern void _XawFixupVendorShell();
+#if defined(__APPLE__)
+__attribute__((constructor))
+static void __VendorShellHack(void)
+{
+ vendorShellWidgetClass = (WidgetClass)(&_XawVendorShellClassRec);
+ _XawFixupVendorShell();
+}
+#else
int __stdcall
DllMain(unsigned long mod_handle, unsigned long flag, void *routine)
{
@@ -131,6 +139,7 @@ DllMain(unsigned long mod_handle, unsigned long flag, void *routine)
}
return 1;
}
+#endif
#define vendorShellClassRec _XawVendorShellClassRec
@@ -195,7 +204,7 @@ externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = {
}
};
-#ifndef __UNIXOS2__
+#if !defined(__UNIXOS2__) && !defined(__APPLE__)
externaldef(vendorshellwidgetclass) WidgetClass vendorShellWidgetClass =
(WidgetClass) (&vendorShellClassRec);
#endif
@@ -339,7 +348,7 @@ XawVendorShellClassPartInit(WidgetClass cclass)
}
}
-#if defined(__osf__) || defined(__UNIXOS2__) || defined(__CYGWIN__) || defined(__MINGW32__)
+#if defined(__osf__) || defined(__UNIXOS2__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__)
/* stupid OSF/1 shared libraries have the wrong semantics */
/* symbols do not get resolved external to the shared library */
void _XawFixupVendorShell()