diff options
Diffstat (limited to 'src/Vendor.c')
-rw-r--r-- | src/Vendor.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/Vendor.c b/src/Vendor.c index 3b282dc..aa2e7a6 100644 --- a/src/Vendor.c +++ b/src/Vendor.c @@ -64,9 +64,11 @@ SOFTWARE. * ***************************************************************************/ -#ifdef __UNIXOS2__ +#if defined(__UNIXOS2__) || defined(__CYGWIN__) /* to fix the EditRes problem because of wrong linker semantics */ extern WidgetClass vendorShellWidgetClass; + +#if defined(__UNIXOS2__) unsigned long _DLL_InitTerm(unsigned long mod,unsigned long flag) { switch (flag) { @@ -82,6 +84,23 @@ unsigned long _DLL_InitTerm(unsigned long mod,unsigned long flag) } #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)(&vendorShellClassRec); + break; + case 0: /* DLL_PROCESS_DETACH - process detach */ + break; + } + return 1; +} +#endif +#endif + externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = { { /* superclass */ (WidgetClass) &wmShellClassRec, |