20020804 - Sparc / Solaris fixes

Shachar Shemesh wine-devel at sun.consumer.org.il
Tue Aug 6 16:08:04 CDT 2002


Hi Gregg,

I couldn't get WINE to compile on sparc at all. Is there anything I am 
missing regarding causing it to compile winelib only? Special command 
lines for configure? I just used the vanilla "./configure && make depend 
&& make".

            Shachar

Gregg Mattinson wrote:

>Here's the patches required to get 20020804 compiled on Sparc / Solaris with cc.
>
>License: X11 / LGPL, as usual.
>
>comments.diff:
> - Remove C++ style comments
>
>ddraw.diff:
> - Remove non-static structure initializers
> - Fix initialization order of full_rect structure.
>
>msvcrt.diff:
> - Fix the IX86_ONLY macro.  This has been bugging me for a while.
>
>shlwapi_tests.diff:
> - Fix the SHQueryValueEx test so nUsedBuffer is currect.
>
>strings.diff:
> - Removed multi-line string constant from classes.c
>
>utils.diff:
> - cc doesn't support __attribute__(...).
>
>widl.diff:
> - cc doesn't support typeof() in macros, and since the LINK_LAST macro was 
>always used with a attr_t type, I replaced it.
>
>Gregg Mattinson
>Co-op Developer
>Sun Microsystems of Canada
>  
>
>------------------------------------------------------------------------
>
>Index: dlls/ole32/compobj.c
>===================================================================
>RCS file: /opcom/comp/ws/wine/CVSROOT/wine/dlls/ole32/compobj.c,v
>retrieving revision 1.3
>diff -u -r1.3 compobj.c
>--- /tmp/T03RaGiL	Tue Aug  6 13:11:13 2002
>+++ compobj.c	Tue Aug  6 13:09:03 2002
>@@ -73,7 +73,7 @@
>  */
> 
> typedef struct {
>-	unsigned char		threadingModell;	// we use the COINIT flags
>+        unsigned char		threadingModell;	/* we use the COINIT flags */
>         unsigned long		threadID;
> 	long			AppartmentLockCount;
> } OleAppartmentData;
>Index: dlls/shell32/shlfolder.c
>===================================================================
>RCS file: /opcom/comp/ws/wine/CVSROOT/wine/dlls/shell32/shlfolder.c,v
>retrieving revision 1.3
>diff -u -r1.3 shlfolder.c
>--- /tmp/T0vHaqLL	Tue Aug  6 13:25:08 2002
>+++ shlfolder.c	Tue Aug  6 13:22:54 2002
>@@ -381,7 +381,7 @@
>       nextpidl2;
>     IShellFolder *psf;
> 
>-    // test for empty pidls
>+    /* test for empty pidls */
>     BOOL isEmpty1 = _ILIsDesktop (pidl1);
>     BOOL isEmpty2 = _ILIsDesktop (pidl2);
> 
>@@ -392,26 +392,26 @@
>     if (isEmpty2)
> 	return 1;
> 
>-    // test for different types. Sort order is the PT_* constant */
>+    /* test for different types. Sort order is the PT_* constant */
>     type1 = _ILGetDataPointer (pidl1)->type;
>     type2 = _ILGetDataPointer (pidl2)->type;
>     if (type1 != type2)
> 	return (type1 - type2);
> 
>-    // test for name of pidl
>+    /* test for name of pidl */
>     _ILSimpleGetText (pidl1, szTemp1, MAX_PATH);
>     _ILSimpleGetText (pidl2, szTemp2, MAX_PATH);
>     nReturn = strcasecmp (szTemp1, szTemp2);
>     if (nReturn != 0)
> 	return nReturn;
> 
>-    // test of complex pidls
>+    /* test of complex pidls */
>     firstpidl = ILCloneFirst (pidl1);
>     nextpidl1 = ILGetNext (pidl1);
>     nextpidl2 = ILGetNext (pidl2);
> 
>-    // optimizing: test special cases and bind not deeper
>-    // the deeper shellfolder would do the same
>+    /* optimizing: test special cases and bind not deeper */
>+    /* the deeper shellfolder would do the same */
>     isEmpty1 = _ILIsDesktop (nextpidl1);
>     isEmpty2 = _ILIsDesktop (nextpidl2);
> 
>@@ -421,7 +421,7 @@
> 	nReturn = -1;
>     } else if (isEmpty2) {
>     	nReturn = 1;
>-    // optimizing end
>+    /* optimizing end */
>     } else if (SUCCEEDED (IShellFolder_BindToObject (iface, firstpidl, NULL, &IID_IShellFolder, (LPVOID *) & psf))) {
> 	nReturn = IShellFolder_CompareIDs (psf, lParam, nextpidl1, nextpidl2);
> 	IShellFolder_Release (psf);
>  
>
>------------------------------------------------------------------------
>
>Index: dlls/ddraw/dsurface/dib.c
>===================================================================
>RCS file: /opcom/comp/ws/wine/CVSROOT/wine/dlls/ddraw/dsurface/dib.c,v
>retrieving revision 1.3
>diff -u -r1.3 dib.c
>--- /tmp/T0u_aqgL	Tue Aug  6 13:08:39 2002
>+++ dib.c	Tue Aug  6 13:02:52 2002
>@@ -413,8 +413,13 @@
> 
>     /* The easy case : the source-less blits.... */
>     if (src == NULL) {
>-        RECT full_rect = { 0, 0, ddesc.dwHeight, ddesc.dwWidth };
>+        RECT full_rect;
>         RECT temp_rect; /* No idea if intersect rect can be the same as one of the source rect */
>+
>+	full_rect.left   = 0;
>+	full_rect.top    = 0;
>+	full_rect.right  = ddesc.dwWidth;
>+	full_rect.bottom = ddesc.dwHeight;
>         IntersectRect(&temp_rect, &full_rect, &xdst);
>         xdst = temp_rect;
>     } else {
>  
>
>------------------------------------------------------------------------
>
>Index: dlls/msvcrt/math.c
>===================================================================
>RCS file: /opcom/comp/ws/wine/CVSROOT/wine/dlls/msvcrt/math.c,v
>retrieving revision 1.2
>diff -u -r1.2 math.c
>--- /tmp/T0wHaaWK	Tue Aug  6 11:17:53 2002
>+++ math.c	Tue Aug  6 10:33:59 2002
>@@ -292,7 +292,7 @@
> 
> /* The above cannot be called on non x86 platforms, stub them for linking */
> 
>-#define IX86_ONLY(func) double MSVCRT_##func(void) { return 0.0; }
>+#define IX86_ONLY(func) double func(void) { return 0.0; }
> 
> IX86_ONLY(_CIacos)
> IX86_ONLY(_CIasin)
>  
>
>------------------------------------------------------------------------
>
>Index: dlls/shlwapi/tests/shreg.c
>===================================================================
>RCS file: /opcom/comp/ws/wine/CVSROOT/wine/dlls/shlwapi/tests/shreg.c,v
>retrieving revision 1.2
>diff -u -r1.2 shreg.c
>--- /tmp/T023aGXK	Tue Aug  6 11:18:28 2002
>+++ shreg.c	Tue Aug  6 10:30:58 2002
>@@ -108,8 +108,8 @@
> 	/****** SHQueryValueExA ******/
> 
> 	sTestedFunction = "SHQueryValueExA";
>-	nUsedBuffer1 = max(strlen(sExpTestpath1)+1, strlen(sTestpath1));
>-	nUsedBuffer2 = max(strlen(sExpTestpath2)+1, strlen(sTestpath2));
>+	nUsedBuffer1 = max(strlen(sExpTestpath1)+1, strlen(sTestpath1)+1);
>+	nUsedBuffer2 = max(strlen(sExpTestpath2)+1, strlen(sTestpath2)+1);
> 	/*
> 	 * Case 1.1 All arguments are NULL
> 	 */
>  
>
>------------------------------------------------------------------------
>
>Index: dlls/shell32/classes.c
>===================================================================
>RCS file: /opcom/comp/ws/wine/CVSROOT/wine/dlls/shell32/classes.c,v
>retrieving revision 1.2
>diff -u -r1.2 classes.c
>--- /tmp/T0tfaiIL	Tue Aug  6 13:18:33 2002
>+++ classes.c	Tue Aug  6 13:16:03 2002
>@@ -65,8 +65,8 @@
> 
> 	RegCloseKey(hkey);
> 
>-	TRACE("--UE;
>-} %s\n", szFileType );
>+	TRACE("--UE;\n"
>+"} %s\n", szFileType );
> 
> 	return TRUE;
> }
>  
>
>------------------------------------------------------------------------
>
>Index: tools/widl/utils.h
>===================================================================
>RCS file: /opcom/comp/ws/wine/CVSROOT/wine/tools/widl/utils.h,v
>retrieving revision 1.1
>diff -u -r1.1 utils.h
>--- /tmp/T0D2a4JL	Tue Aug  6 13:22:30 2002
>+++ utils.h	Tue Aug  6 11:35:29 2002
>@@ -29,6 +29,10 @@
> void *xrealloc(void *, size_t);
> char *xstrdup(const char *str);
> 
>+#ifndef __GNUC__
>+#define __attribute__(X)
>+#endif
>+
> int yyerror(const char *s, ...) __attribute__((format (printf, 1, 2)));
> int yywarning(const char *s, ...) __attribute__((format (printf, 1, 2)));
> void internal_error(const char *file, int line, const char *s, ...) __attribute__((format (printf, 3, 4)));
>Index: tools/wmc/utils.h
>===================================================================
>RCS file: /opcom/comp/ws/wine/CVSROOT/wine/tools/wmc/utils.h,v
>retrieving revision 1.1
>diff -u -r1.1 utils.h
>--- /tmp/T0i7aqKL	Tue Aug  6 13:22:30 2002
>+++ utils.h	Tue Aug  6 13:20:06 2002
>@@ -31,6 +31,10 @@
> void *xrealloc(void *, size_t);
> char *xstrdup(const char *str);
> 
>+#ifndef __GNUC__
>+#define __attribute__(X)
>+#endif
>+
> int yyerror(const char *s, ...) __attribute__((format (printf, 1, 2)));
> int xyyerror(const char *s, ...) __attribute__((format (printf, 1, 2)));
> int yywarning(const char *s, ...) __attribute__((format (printf, 1, 2)));
>Index: tools/wrc/utils.h
>===================================================================
>RCS file: /opcom/comp/ws/wine/CVSROOT/wine/tools/wrc/utils.h,v
>retrieving revision 1.2
>diff -u -r1.2 utils.h
>--- /tmp/T0s_aOKL	Tue Aug  6 13:22:31 2002
>+++ utils.h	Tue Aug  6 11:35:20 2002
>@@ -31,6 +31,10 @@
> void *xrealloc(void *, size_t);
> char *xstrdup(const char *str);
> 
>+#ifndef __GNUC__
>+#define __attribute__(X)
>+#endif
>+
> int yyerror(const char *s, ...) __attribute__((format (printf, 1, 2)));
> int yywarning(const char *s, ...) __attribute__((format (printf, 1, 2)));
> void internal_error(const char *file, int line, const char *s, ...) __attribute__((format (printf, 3, 4)));
>  
>
>------------------------------------------------------------------------
>
>Index: tools/widl/widltypes.h
>===================================================================
>RCS file: /opcom/comp/ws/wine/CVSROOT/wine/tools/widl/widltypes.h,v
>retrieving revision 1.1
>diff -u -r1.1 widltypes.h
>--- /tmp/T0fwaaiL	Tue Aug  6 13:10:19 2002
>+++ widltypes.h	Tue Aug  6 11:40:33 2002
>@@ -36,7 +36,7 @@
>   type *l_prev;
> 
> #define LINK(x,y) do { x->l_next = y; if (y) y->l_prev = x; } while (0)
>-#define LINK_LAST(x,y) do { if (y) { typeof(x) _c = x; while (_c->l_next) _c = _c->l_next; LINK(_c, y); } } while (0)
>+#define LINK_LAST(x,y) do { if (y) { attr_t *_c = x; while (_c->l_next) _c = _c->l_next; LINK(_c, y); } } while (0)
> #define LINK_SAFE(x,y) do { if (x) LINK_LAST(x,y); else { x = y; } } while (0)
> 
> #define INIT_LINK(x) do { x->l_next = NULL; x->l_prev = NULL; } while (0)
>  
>






More information about the wine-devel mailing list