Would someone please look at the attached patch and comment? I have build tested it and gave it a quick runtime test, but I am not certain about whether or not it is needed.
Harold
Index: Vendor.c
===================================================================
RCS file: /cvs/xc/lib/Xt/Vendor.c,v
retrieving revision 1.7
diff -u -r1.7 Vendor.c
--- Vendor.c 31 May 2002 18:45:46 -0000 1.7
+++ Vendor.c 18 Nov 2003 00:52:23 -0000
@@ -64,9 +64,11 @@
*
***************************************************************************/
-#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) {
@@ -80,6 +82,23 @@
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)(&vendorShellClassRec);
+ break;
+ case 0: /* DLL_PROCESS_DETACH - process detach */
+ break;
+ }
+ return 1;
+}
+#endif
#endif
externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = {
