summaryrefslogtreecommitdiff
path: root/dbe
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2024-03-04 15:08:32 +0100
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-04-15 18:59:23 -0700
commit232cad9ec36631379b23ce29d577332f82565803 (patch)
tree610b389034511f242886ffab99b22593a6fd1592 /dbe
parentf789dca4e9e0ca5cfcdb1f95a7479cb1ca113738 (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 'dbe')
-rw-r--r--dbe/dbe.c4
-rw-r--r--dbe/midbe.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/dbe/dbe.c b/dbe/dbe.c
index 237dd0fa9..3cf0a3ef9 100644
--- a/dbe/dbe.c
+++ b/dbe/dbe.c
@@ -413,7 +413,7 @@ ProcDbeDeallocateBackBufferName(ClientPtr client)
return dbeErrorBase + DbeBadBuffer;
}
- FreeResource(stuff->buffer, RT_NONE);
+ FreeResource(stuff->buffer, X11_RESTYPE_NONE);
return Success;
@@ -1314,7 +1314,7 @@ DbeDestroyWindow(WindowPtr pWin)
* NULL if there are no more buffer IDs associated with this
* window.
*/
- FreeResource(pDbeWindowPriv->IDs[0], RT_NONE);
+ FreeResource(pDbeWindowPriv->IDs[0], X11_RESTYPE_NONE);
pDbeWindowPriv = DBE_WINDOW_PRIV(pWin);
}
}
diff --git a/dbe/midbe.c b/dbe/midbe.c
index 9684d45bd..c646bc0c7 100644
--- a/dbe/midbe.c
+++ b/dbe/midbe.c
@@ -177,7 +177,7 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction)
if (rc != Success || !AddResource(bufId, dbeDrawableResType,
pDbeWindowPriv->pBackBuffer)) {
/* free the buffer and the drawable resource */
- FreeResource(bufId, RT_NONE);
+ FreeResource(bufId, X11_RESTYPE_NONE);
return (rc == Success) ? BadAlloc : rc;
}
@@ -599,7 +599,7 @@ miDbePositionWindow(WindowPtr pWin, int x, int y)
/* DbeWindowPrivDelete() will free the window private if there no
* more buffer IDs associated with this window.
*/
- FreeResource(pDbeWindowPriv->IDs[0], RT_NONE);
+ FreeResource(pDbeWindowPriv->IDs[0], X11_RESTYPE_NONE);
pDbeWindowPriv = DBE_WINDOW_PRIV(pWin);
}