Fixes for Sparc build.

This commit is contained in:
Gregg Mattinson 2002-08-07 01:18:41 +00:00 committed by Alexandre Julliard
parent 520852c769
commit 8c9bdcc9e1
9 changed files with 29 additions and 13 deletions

View File

@ -413,8 +413,13 @@ DIB_DirectDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
/* The easy case : the source-less blits.... */ /* The easy case : the source-less blits.... */
if (src == NULL) { 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 */ 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); IntersectRect(&temp_rect, &full_rect, &xdst);
xdst = temp_rect; xdst = temp_rect;
} else { } else {

View File

@ -292,7 +292,7 @@ double _CItanh(void)
/* The above cannot be called on non x86 platforms, stub them for linking */ /* 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(_CIacos)
IX86_ONLY(_CIasin) IX86_ONLY(_CIasin)

View File

@ -73,7 +73,7 @@ static void COM_ExternalLockFreeList();
*/ */
typedef struct { typedef struct {
unsigned char threadingModell; // we use the COINIT flags unsigned char threadingModell; /* we use the COINIT flags */
unsigned long threadID; unsigned long threadID;
long AppartmentLockCount; long AppartmentLockCount;
} OleAppartmentData; } OleAppartmentData;

View File

@ -65,8 +65,7 @@ BOOL HCR_MapTypeToValue ( LPCSTR szExtension, LPSTR szFileType, DWORD len, BOOL
RegCloseKey(hkey); RegCloseKey(hkey);
TRACE("--UE; TRACE("--UE;\n} %s\n", szFileType );
} %s\n", szFileType );
return TRUE; return TRUE;
} }

View File

@ -381,7 +381,7 @@ HRESULT SHELL32_CompareIDs (IShellFolder * iface, LPARAM lParam, LPCITEMIDLIST p
nextpidl2; nextpidl2;
IShellFolder *psf; IShellFolder *psf;
// test for empty pidls /* test for empty pidls */
BOOL isEmpty1 = _ILIsDesktop (pidl1); BOOL isEmpty1 = _ILIsDesktop (pidl1);
BOOL isEmpty2 = _ILIsDesktop (pidl2); BOOL isEmpty2 = _ILIsDesktop (pidl2);
@ -392,26 +392,26 @@ HRESULT SHELL32_CompareIDs (IShellFolder * iface, LPARAM lParam, LPCITEMIDLIST p
if (isEmpty2) if (isEmpty2)
return 1; 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; type1 = _ILGetDataPointer (pidl1)->type;
type2 = _ILGetDataPointer (pidl2)->type; type2 = _ILGetDataPointer (pidl2)->type;
if (type1 != type2) if (type1 != type2)
return (type1 - type2); return (type1 - type2);
// test for name of pidl /* test for name of pidl */
_ILSimpleGetText (pidl1, szTemp1, MAX_PATH); _ILSimpleGetText (pidl1, szTemp1, MAX_PATH);
_ILSimpleGetText (pidl2, szTemp2, MAX_PATH); _ILSimpleGetText (pidl2, szTemp2, MAX_PATH);
nReturn = strcasecmp (szTemp1, szTemp2); nReturn = strcasecmp (szTemp1, szTemp2);
if (nReturn != 0) if (nReturn != 0)
return nReturn; return nReturn;
// test of complex pidls /* test of complex pidls */
firstpidl = ILCloneFirst (pidl1); firstpidl = ILCloneFirst (pidl1);
nextpidl1 = ILGetNext (pidl1); nextpidl1 = ILGetNext (pidl1);
nextpidl2 = ILGetNext (pidl2); nextpidl2 = ILGetNext (pidl2);
// optimizing: test special cases and bind not deeper /* optimizing: test special cases and bind not deeper */
// the deeper shellfolder would do the same /* the deeper shellfolder would do the same */
isEmpty1 = _ILIsDesktop (nextpidl1); isEmpty1 = _ILIsDesktop (nextpidl1);
isEmpty2 = _ILIsDesktop (nextpidl2); isEmpty2 = _ILIsDesktop (nextpidl2);
@ -421,7 +421,7 @@ HRESULT SHELL32_CompareIDs (IShellFolder * iface, LPARAM lParam, LPCITEMIDLIST p
nReturn = -1; nReturn = -1;
} else if (isEmpty2) { } else if (isEmpty2) {
nReturn = 1; nReturn = 1;
// optimizing end /* optimizing end */
} else if (SUCCEEDED (IShellFolder_BindToObject (iface, firstpidl, NULL, &IID_IShellFolder, (LPVOID *) & psf))) { } else if (SUCCEEDED (IShellFolder_BindToObject (iface, firstpidl, NULL, &IID_IShellFolder, (LPVOID *) & psf))) {
nReturn = IShellFolder_CompareIDs (psf, lParam, nextpidl1, nextpidl2); nReturn = IShellFolder_CompareIDs (psf, lParam, nextpidl1, nextpidl2);
IShellFolder_Release (psf); IShellFolder_Release (psf);

View File

@ -29,6 +29,10 @@ void *xmalloc(size_t);
void *xrealloc(void *, size_t); void *xrealloc(void *, size_t);
char *xstrdup(const char *str); char *xstrdup(const char *str);
#ifndef __GNUC__
#define __attribute__(X)
#endif
int yyerror(const char *s, ...) __attribute__((format (printf, 1, 2))); int yyerror(const char *s, ...) __attribute__((format (printf, 1, 2)));
int yywarning(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))); void internal_error(const char *file, int line, const char *s, ...) __attribute__((format (printf, 3, 4)));

View File

@ -36,7 +36,7 @@ typedef struct _func_t func_t;
type *l_prev; type *l_prev;
#define LINK(x,y) do { x->l_next = y; if (y) y->l_prev = x; } while (0) #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 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) #define INIT_LINK(x) do { x->l_next = NULL; x->l_prev = NULL; } while (0)

View File

@ -31,6 +31,10 @@ void *xmalloc(size_t);
void *xrealloc(void *, size_t); void *xrealloc(void *, size_t);
char *xstrdup(const char *str); char *xstrdup(const char *str);
#ifndef __GNUC__
#define __attribute__(X)
#endif
int yyerror(const char *s, ...) __attribute__((format (printf, 1, 2))); int yyerror(const char *s, ...) __attribute__((format (printf, 1, 2)));
int xyyerror(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))); int yywarning(const char *s, ...) __attribute__((format (printf, 1, 2)));

View File

@ -31,6 +31,10 @@ void *xmalloc(size_t);
void *xrealloc(void *, size_t); void *xrealloc(void *, size_t);
char *xstrdup(const char *str); char *xstrdup(const char *str);
#ifndef __GNUC__
#define __attribute__(X)
#endif
int yyerror(const char *s, ...) __attribute__((format (printf, 1, 2))); int yyerror(const char *s, ...) __attribute__((format (printf, 1, 2)));
int yywarning(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))); void internal_error(const char *file, int line, const char *s, ...) __attribute__((format (printf, 3, 4)));