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 <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-02-28 17:16:49 +01:00 committed by Enrico Weigelt, metux IT consult .
parent 2a4410a655
commit 329a4e3b57
4 changed files with 6 additions and 8 deletions

View File

@ -747,7 +747,7 @@ XkbAddGeomSection(XkbGeometryPtr geom,
} }
XkbDoodadPtr XkbDoodadPtr
XkbAddGeomDoodad(XkbGeometryPtr geom, XkbSectionPtr section, Atom name) SrvXkbAddGeomDoodad(XkbGeometryPtr geom, XkbSectionPtr section, Atom name)
{ {
XkbDoodadPtr old, doodad; XkbDoodadPtr old, doodad;
register int i, nDoodads; register int i, nDoodads;

View File

@ -5179,7 +5179,7 @@ _CheckSetDoodad(char **wire_inout, xkbSetGeometryReq *req,
swaps(&any.angle); swaps(&any.angle);
} }
CHK_ATOM_ONLY(dWire->any.name); CHK_ATOM_ONLY(dWire->any.name);
doodad = XkbAddGeomDoodad(geom, section, any.name); doodad = SrvXkbAddGeomDoodad(geom, section, any.name);
if (!doodad) if (!doodad)
return BadAlloc; return BadAlloc;
doodad->any.type = dWire->any.type; doodad->any.type = dWire->any.type;

View File

@ -29,7 +29,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "xkbstr.h" #include "xkbstr.h"
#define XkbAddGeomDoodad SrvXkbAddGeomDoodad
#define XkbAddGeomKey SrvXkbAddGeomKey #define XkbAddGeomKey SrvXkbAddGeomKey
#define XkbAddGeomOutline SrvXkbAddGeomOutline #define XkbAddGeomOutline SrvXkbAddGeomOutline
#define XkbAddGeomOverlay SrvXkbAddGeomOverlay #define XkbAddGeomOverlay SrvXkbAddGeomOverlay
@ -362,10 +361,9 @@ extern XkbOverlayKeyPtr XkbAddGeomOverlayKey(XkbOverlayPtr /* overlay */ ,
char * /* under */ char * /* under */
); );
extern XkbDoodadPtr XkbAddGeomDoodad(XkbGeometryPtr /* geom */ , XkbDoodadPtr SrvXkbAddGeomDoodad(XkbGeometryPtr geom,
XkbSectionPtr /* section */ , XkbSectionPtr section,
Atom /* name */ Atom name);
);
extern void extern void
XkbFreeGeomKeyAliases(XkbGeometryPtr /* geom */ , XkbFreeGeomKeyAliases(XkbGeometryPtr /* geom */ ,

View File

@ -868,7 +868,7 @@ ReadXkmGeomDoodad(FILE * file, XkbGeometryPtr geom, XkbSectionPtr section)
nRead += XkmGetCountedString(file, buf, 100); nRead += XkmGetCountedString(file, buf, 100);
tmp = fread(&doodadWire, SIZEOF(xkmDoodadDesc), 1, file); tmp = fread(&doodadWire, SIZEOF(xkmDoodadDesc), 1, file);
nRead += SIZEOF(xkmDoodadDesc) * tmp; nRead += SIZEOF(xkmDoodadDesc) * tmp;
doodad = XkbAddGeomDoodad(geom, section, XkbInternAtom(buf, FALSE)); doodad = SrvXkbAddGeomDoodad(geom, section, XkbInternAtom(buf, FALSE));
if (!doodad) if (!doodad)
return nRead; return nRead;
doodad->any.type = doodadWire.any.type; doodad->any.type = doodadWire.any.type;