diff options
author | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2016-01-06 22:33:12 -0800 |
---|---|---|
committer | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2016-08-29 22:18:08 -0700 |
commit | b8891dae09e107be01520c41ca8d903fe74cf6a0 (patch) | |
tree | 44c9340c954fdeee03dd2f3a2fff31e73142a72c /src/Vendor.c | |
parent | ad4de8d0cdbb1ab03da1d672a4862b55158693b7 (diff) |
darwin: Remove incorrect export of vendorShellClassRec and vendorShellWidgetClass
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Diffstat (limited to 'src/Vendor.c')
-rw-r--r-- | src/Vendor.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/Vendor.c b/src/Vendor.c index 8899cd1..6b34b31 100644 --- a/src/Vendor.c +++ b/src/Vendor.c @@ -110,12 +110,21 @@ static void XawVendorShellClassPartInit(WidgetClass); void XawVendorShellExtResize(Widget); #endif -#if defined(__UNIXOS2__) || defined(__CYGWIN__) || defined(__MINGW32__) +#if defined(__UNIXOS2__) || 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; void _XawFixupVendorShell(void); +#if defined(__APPLE__) +__attribute__((constructor)) +static void __VendorShellHack(void) +{ + vendorShellWidgetClass = (WidgetClass)(&_XawVendorShellClassRec); + _XawFixupVendorShell(); +} +#endif + #if defined(__UNIXOS2__) unsigned long _DLL_InitTerm(unsigned long mod,unsigned long flag) { @@ -229,9 +238,10 @@ externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = { } }; +#if !defined(__APPLE__) externaldef(vendorshellwidgetclass) WidgetClass vendorShellWidgetClass = (WidgetClass) (&vendorShellClassRec); - +#endif #ifdef XAW_INTERNATIONALIZATION /*************************************************************************** @@ -475,7 +485,7 @@ XawVendorShellClassPartInit(WidgetClass class) } #endif -#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 |