diff options
author | Harold L Hunt II <huntharo@msu.edu> | 2004-03-17 22:19:22 +0000 |
---|---|---|
committer | Harold L Hunt II <huntharo@msu.edu> | 2004-03-17 22:19:22 +0000 |
commit | 22ad6972712cb9936467dbdb419fec35e4138786 (patch) | |
tree | 8027a71e4e4a32cfa86e0fc24694ee81c1d193bd | |
parent | 04d1c5972f5431a12102920a2f4ed9b01954979f (diff) | |
download | xorg-lib-libXaw-22ad6972712cb9936467dbdb419fec35e4138786.tar.gz |
Fix Xaw shared lib build on Cygwin (Ralf Habacker).XPRINT_BASEXORG-RELEASE-1-TM-MERGE
-rw-r--r-- | src/Vendor.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/Vendor.c b/src/Vendor.c index 83313b6..7012f52 100644 --- a/src/Vendor.c +++ b/src/Vendor.c @@ -111,11 +111,13 @@ static XtResource resources[] = { * ***************************************************************************/ -#ifdef __UNIXOS2__ +#if defined(__UNIXOS2__) || defined(__CYGWIN__) /* 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(__UNIXOS2__) unsigned long _DLL_InitTerm(unsigned long mod,unsigned long flag) { switch (flag) { @@ -130,6 +132,25 @@ unsigned long _DLL_InitTerm(unsigned long mod,unsigned long flag) return 0; } } +#endif + +#if defined(__CYGWIN__) +int __stdcall +DllMain(unsigned long mod_handle, unsigned long flag, void *routine) +{ + switch (flag) + { + case 1: /* DLL_PROCESS_ATTACH - process attach */ + vendorShellWidgetClass = (WidgetClass)(&_XawVendorShellClassRec); + _XawFixupVendorShell(); + break; + case 0: /* DLL_PROCESS_DETACH - process detach */ + break; + } + return 1; +} +#endif + #define vendorShellClassRec _XawVendorShellClassRec #endif @@ -337,7 +358,7 @@ XawVendorShellClassPartInit(WidgetClass cclass) } } -#if defined(__osf__) || defined(__UNIXOS2__) +#if defined(__osf__) || defined(__UNIXOS2__) || defined(__CYGWIN__) /* stupid OSF/1 shared libraries have the wrong semantics */ /* symbols do not get resolved external to the shared library */ void _XawFixupVendorShell() |