diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2024-03-04 15:08:32 +0100 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-04-15 18:59:23 -0700 |
commit | 232cad9ec36631379b23ce29d577332f82565803 (patch) | |
tree | 610b389034511f242886ffab99b22593a6fd1592 /glx | |
parent | f789dca4e9e0ca5cfcdb1f95a7479cb1ca113738 (diff) |
prevent name clash on Windows w/ RT_* defines
Windows' native headers using some our RT_* define's names for other things.
Since the naming isn't very nice anyways, introducing some new ones
(X11_RESTYPE_NONE, X11_RESTYPE_FONT, X11_RESTYPE_CURSOR) and define the old
ones as an alias to them, in case some out-of-tree code still uses them.
With thins change, we don't need to be so extremely careful about include
ordering and have explicit #undef's in order to prevent name clashes on
Win32 targets.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1355>
Diffstat (limited to 'glx')
-rw-r--r-- | glx/glxcmds.c | 2 | ||||
-rw-r--r-- | glx/vndext.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/glx/glxcmds.c b/glx/glxcmds.c index a5069eb10..9ad99da8e 100644 --- a/glx/glxcmds.c +++ b/glx/glxcmds.c @@ -1396,7 +1396,7 @@ DoCreatePbuffer(ClientPtr client, int screenNum, XID fbconfigId, return BadAlloc; err = XaceHook(XACE_RESOURCE_ACCESS, client, glxDrawableId, RT_PIXMAP, - pPixmap, RT_NONE, NULL, DixCreateAccess); + pPixmap, X11_RESTYPE_NONE, NULL, DixCreateAccess); if (err != Success) { (*pGlxScreen->pScreen->DestroyPixmap) (pPixmap); return err; diff --git a/glx/vndext.c b/glx/vndext.c index 770aff6bb..21ba29269 100644 --- a/glx/vndext.c +++ b/glx/vndext.c @@ -114,7 +114,7 @@ GlxMappingInit(void) idResource = CreateNewResourceType(idResourceDeleteCallback, "GLXServerIDRes"); - if (idResource == RT_NONE) + if (idResource == X11_RESTYPE_NONE) { GlxMappingReset(); return FALSE; |