From 04cbc6d134828448e287bcb5ed1f268036172566 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 28 Feb 2025 17:43:15 +0100 Subject: [PATCH] xkb: rename XkbAddGeomRow() to SrvXkbAddGeomRow() 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 | 6 +----- xkb/xkmread.c | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/xkb/XKBGAlloc.c b/xkb/XKBGAlloc.c index 68290bae6..f7ef2d605 100644 --- a/xkb/XKBGAlloc.c +++ b/xkb/XKBGAlloc.c @@ -690,7 +690,7 @@ SrvXkbAddGeomKey(XkbRowPtr row) } XkbRowPtr -XkbAddGeomRow(XkbSectionPtr section, int sz_keys) +SrvXkbAddGeomRow(XkbSectionPtr section, int sz_keys) { XkbRowPtr row; diff --git a/xkb/xkb.c b/xkb/xkb.c index 91f8b8565..1d132a40a 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -5379,7 +5379,7 @@ _CheckSetSections(XkbGeometryPtr geom, swaps(&rWire->top); swaps(&rWire->left); } - row = XkbAddGeomRow(section, rWire->nKeys); + row = SrvXkbAddGeomRow(section, rWire->nKeys); if (!row) return BadAlloc; row->top = rWire->top; diff --git a/xkb/xkbgeom.h b/xkb/xkbgeom.h index 4daa1d37e..97523f955 100644 --- a/xkb/xkbgeom.h +++ b/xkb/xkbgeom.h @@ -29,7 +29,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "xkbstr.h" -#define XkbAddGeomRow SrvXkbAddGeomRow #define XkbAddGeomSection SrvXkbAddGeomSection #define XkbAddGeomShape SrvXkbAddGeomShape #define XkbAllocGeometry SrvXkbAllocGeometry @@ -323,10 +322,7 @@ extern XkbShapePtr XkbAddGeomShape(XkbGeometryPtr /* geom */ , ); XkbKeyPtr SrvXkbAddGeomKey(XkbRowPtr row); - -extern XkbRowPtr XkbAddGeomRow(XkbSectionPtr /* section */ , - int /* sz_keys */ - ); +XkbRowPtr SrvXkbAddGeomRow(XkbSectionPtr section, int sz_keys); extern XkbSectionPtr XkbAddGeomSection(XkbGeometryPtr /* geom */ , Atom /* name */ , diff --git a/xkb/xkmread.c b/xkb/xkmread.c index d3ad28610..3a65c581f 100644 --- a/xkb/xkmread.c +++ b/xkb/xkmread.c @@ -989,7 +989,7 @@ ReadXkmGeomSection(FILE * file, XkbGeometryPtr geom) for (i = 0; i < sectionWire.num_rows; i++) { tmp = fread(&rowWire, SIZEOF(xkmRowDesc), 1, file); nRead += SIZEOF(xkmRowDesc) * tmp; - row = XkbAddGeomRow(section, rowWire.num_keys); + row = SrvXkbAddGeomRow(section, rowWire.num_keys); if (!row) { _XkbLibError(_XkbErrBadAlloc, "ReadXkmKeycodes", 0); return nRead;