From 329a4e3b57479b0d36cec7fbf41b910ba5aafcf2 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 28 Feb 2025 17:16:49 +0100 Subject: [PATCH] xkb: rename XkbAddGeomDoodad() to SrvXkbAddGeomDoodad() Instead of doing dirty preprocessor trick, directly rename the function itself. (the renaming itself is necessary since libX11 has the same symbol) Signed-off-by: Enrico Weigelt, metux IT consult --- xkb/XKBGAlloc.c | 2 +- xkb/xkb.c | 2 +- xkb/xkbgeom.h | 8 +++----- xkb/xkmread.c | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/xkb/XKBGAlloc.c b/xkb/XKBGAlloc.c index 5e59632de..55fb0a0ce 100644 --- a/xkb/XKBGAlloc.c +++ b/xkb/XKBGAlloc.c @@ -747,7 +747,7 @@ XkbAddGeomSection(XkbGeometryPtr geom, } XkbDoodadPtr -XkbAddGeomDoodad(XkbGeometryPtr geom, XkbSectionPtr section, Atom name) +SrvXkbAddGeomDoodad(XkbGeometryPtr geom, XkbSectionPtr section, Atom name) { XkbDoodadPtr old, doodad; register int i, nDoodads; diff --git a/xkb/xkb.c b/xkb/xkb.c index 74450b8d5..ff732f0c7 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -5179,7 +5179,7 @@ _CheckSetDoodad(char **wire_inout, xkbSetGeometryReq *req, swaps(&any.angle); } CHK_ATOM_ONLY(dWire->any.name); - doodad = XkbAddGeomDoodad(geom, section, any.name); + doodad = SrvXkbAddGeomDoodad(geom, section, any.name); if (!doodad) return BadAlloc; doodad->any.type = dWire->any.type; diff --git a/xkb/xkbgeom.h b/xkb/xkbgeom.h index af40d12bd..152f781d9 100644 --- a/xkb/xkbgeom.h +++ b/xkb/xkbgeom.h @@ -29,7 +29,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "xkbstr.h" -#define XkbAddGeomDoodad SrvXkbAddGeomDoodad #define XkbAddGeomKey SrvXkbAddGeomKey #define XkbAddGeomOutline SrvXkbAddGeomOutline #define XkbAddGeomOverlay SrvXkbAddGeomOverlay @@ -362,10 +361,9 @@ extern XkbOverlayKeyPtr XkbAddGeomOverlayKey(XkbOverlayPtr /* overlay */ , char * /* under */ ); -extern XkbDoodadPtr XkbAddGeomDoodad(XkbGeometryPtr /* geom */ , - XkbSectionPtr /* section */ , - Atom /* name */ - ); +XkbDoodadPtr SrvXkbAddGeomDoodad(XkbGeometryPtr geom, + XkbSectionPtr section, + Atom name); extern void XkbFreeGeomKeyAliases(XkbGeometryPtr /* geom */ , diff --git a/xkb/xkmread.c b/xkb/xkmread.c index b1af821db..6fcf7517d 100644 --- a/xkb/xkmread.c +++ b/xkb/xkmread.c @@ -868,7 +868,7 @@ ReadXkmGeomDoodad(FILE * file, XkbGeometryPtr geom, XkbSectionPtr section) nRead += XkmGetCountedString(file, buf, 100); tmp = fread(&doodadWire, SIZEOF(xkmDoodadDesc), 1, file); nRead += SIZEOF(xkmDoodadDesc) * tmp; - doodad = XkbAddGeomDoodad(geom, section, XkbInternAtom(buf, FALSE)); + doodad = SrvXkbAddGeomDoodad(geom, section, XkbInternAtom(buf, FALSE)); if (!doodad) return nRead; doodad->any.type = doodadWire.any.type;