dix: colormap: fix name clash with win32 api on UpdateColors
As soon as winapi headers are included, we're running into a name clash on UpdateColors(), since winapi has a function by the same name. Trivial fix simply renaming our own UpdateColors() function. ../dix/colormap.c:110:13: error: conflicting types for ‘UpdateColors’ 110 | static void UpdateColors(ColormapPtr /*pmap */ | ^~~~~~~~~~~~ In file included from /usr/share/mingw-w64/include/windows.h:71, from /usr/share/mingw-w64/include/winsock2.h:23, from /usr/i686-w64-mingw32/include/X11/Xwinsock.h:57, from ../os/osdep.h:138, from ../dix/colormap.c:57: /usr/share/mingw-w64/include/wingdi.h:3202:28: note: previous declaration of ‘UpdateColors’ was here 3202 | WINGDIAPI WINBOOL WINAPI UpdateColors(HDC hdc); | ^~~~~~~~~~~~ Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1351>
This commit is contained in:
parent
facdaae4e8
commit
d8cbcfd601
|
@ -107,8 +107,7 @@ static void FreeCell(ColormapPtr /*pmap */ ,
|
|||
int /*channel */
|
||||
);
|
||||
|
||||
static void UpdateColors(ColormapPtr /*pmap */
|
||||
);
|
||||
static void doUpdateColors(ColormapPtr pmap);
|
||||
|
||||
static int AllocDirect(int /*client */ ,
|
||||
ColormapPtr /*pmap */ ,
|
||||
|
@ -558,7 +557,7 @@ CopyColormapAndFree(Colormap mid, ColormapPtr pSrc, int client)
|
|||
}
|
||||
pSrc->flags &= ~AllAllocated;
|
||||
FreePixels(pSrc, client);
|
||||
UpdateColors(pmap);
|
||||
doUpdateColors(pmap);
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
@ -568,7 +567,7 @@ CopyColormapAndFree(Colormap mid, ColormapPtr pSrc, int client)
|
|||
CopyFree(BLUEMAP, client, pSrc, pmap);
|
||||
}
|
||||
if (pmap->class & DynamicClass)
|
||||
UpdateColors(pmap);
|
||||
doUpdateColors(pmap);
|
||||
/* XXX should worry about removing any X11_RESTYPE_CMAPENTRY resource */
|
||||
return Success;
|
||||
}
|
||||
|
@ -698,7 +697,7 @@ FreeCell(ColormapPtr pmap, Pixel i, int channel)
|
|||
}
|
||||
|
||||
static void
|
||||
UpdateColors(ColormapPtr pmap)
|
||||
doUpdateColors(ColormapPtr pmap)
|
||||
{
|
||||
xColorItem *defs;
|
||||
xColorItem *pdef;
|
||||
|
|
Loading…
Reference in New Issue