_wine_ldt_copy can not be auto-imported when building under cygwin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As discussed on http://bugs.winehq.com/show_bug.cgi?id=273
(after 2002-11-19 15:33)

The attached patch fixes the following problem:

'_wine_ldt_copy' can't be auto-imported" when building under cygwin


note1: there are still other issues when building under cygwin
note2: this is the 'nicest' way to do it, but I couldn't think of better way to do it.

Best regards,

Jeroen Janssen
Index: include/wine/library.h
===================================================================
RCS file: /home/wine/wine/include/wine/library.h,v
retrieving revision 1.16
diff -u -r1.16 library.h
--- include/wine/library.h	27 Aug 2002 18:30:53 -0000	1.16
+++ include/wine/library.h	19 Nov 2002 18:18:17 -0000
@@ -72,12 +72,24 @@
 extern int wine_ldt_set_entry( unsigned short sel, const LDT_ENTRY *entry );
 
 /* the local copy of the LDT */
-extern struct __wine_ldt_copy
+/*extern*/ struct __wine_ldt_copy
 {
     void         *base[8192];  /* base address or 0 if entry is free   */
     unsigned long limit[8192]; /* limit in bytes or 0 if entry is free */
     unsigned char flags[8192]; /* flags (defined below) */
-} wine_ldt_copy;
+};/* wine_ldt_copy;*/
+
+#ifdef __CYGWIN__
+
+  #ifdef CYGWIN_EXPORT
+  extern __declspec(dllexport) struct __wine_ldt_copy wine_ldt_copy;
+  #else
+  extern __declspec(dllimport) struct __wine_ldt_copy wine_ldt_copy;
+  #endif
+
+#else
+extern wine_ldt_copy;
+#endif
 
 #define WINE_LDT_FLAGS_DATA      0x13  /* Data segment */
 #define WINE_LDT_FLAGS_STACK     0x17  /* Stack segment */
Index: library/Makefile.in
===================================================================
RCS file: /home/wine/wine/library/Makefile.in,v
retrieving revision 1.16
diff -u -r1.16 Makefile.in
--- library/Makefile.in	3 Aug 2002 00:25:59 -0000	1.16
+++ library/Makefile.in	19 Nov 2002 18:18:18 -0000
@@ -1,4 +1,4 @@
-DEFS      = @DLLFLAGS@ -D__WINE__ -DDLLDIR="\"$(dlldir)\""
+DEFS      = @DLLFLAGS@ -D__WINE__ -DDLLDIR="\"$(dlldir)\"" -DCYGWIN_EXPORT
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ..
 SRCDIR    = @srcdir@

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux