From cb3a8055384e40ff404c39fa10e2c222e53f4b23 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 28 Feb 2025 17:22:42 +0100 Subject: [PATCH] xkb: rename XkbAddGeomOutline() to SrvXkbAddGeomOutline() 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 | 5 +---- xkb/xkmread.c | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/xkb/XKBGAlloc.c b/xkb/XKBGAlloc.c index 70e0bca72..0ec321c82 100644 --- a/xkb/XKBGAlloc.c +++ b/xkb/XKBGAlloc.c @@ -630,7 +630,7 @@ SrvXkbAddGeomColor(XkbGeometryPtr geom, char *spec, unsigned int pixel) } XkbOutlinePtr -XkbAddGeomOutline(XkbShapePtr shape, int sz_points) +SrvXkbAddGeomOutline(XkbShapePtr shape, int sz_points) { XkbOutlinePtr outline; diff --git a/xkb/xkb.c b/xkb/xkb.c index a9039e261..675616b1b 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -5476,7 +5476,7 @@ _CheckSetShapes(XkbGeometryPtr geom, if (!_XkbCheckRequestBounds(client, req, olWire, olWire + 1)) return BadLength; - ol = XkbAddGeomOutline(shape, olWire->nPoints); + ol = SrvXkbAddGeomOutline(shape, olWire->nPoints); if (!ol) return BadAlloc; ol->corner_radius = olWire->cornerRadius; diff --git a/xkb/xkbgeom.h b/xkb/xkbgeom.h index b7e37c87d..e05e56e8b 100644 --- a/xkb/xkbgeom.h +++ b/xkb/xkbgeom.h @@ -29,7 +29,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "xkbstr.h" -#define XkbAddGeomOutline SrvXkbAddGeomOutline #define XkbAddGeomOverlay SrvXkbAddGeomOverlay #define XkbAddGeomOverlayRow SrvXkbAddGeomOverlayRow #define XkbAddGeomOverlayKey SrvXkbAddGeomOverlayKey @@ -321,9 +320,7 @@ XkbColorPtr SrvXkbAddGeomColor(XkbGeometryPtr geom, char *spec, unsigned int pixel); -extern XkbOutlinePtr XkbAddGeomOutline(XkbShapePtr /* shape */ , - int /* sz_points */ - ); +XkbOutlinePtr SrvXkbAddGeomOutline(XkbShapePtr shape, int sz_points); extern XkbShapePtr XkbAddGeomShape(XkbGeometryPtr /* geom */ , Atom /* name */ , diff --git a/xkb/xkmread.c b/xkb/xkmread.c index b69bb54c3..208bc15c5 100644 --- a/xkb/xkmread.c +++ b/xkb/xkmread.c @@ -1110,7 +1110,7 @@ ReadXkmGeometry(FILE * file, XkbDescPtr xkb) tmp = fread(&olWire, SIZEOF(xkmOutlineDesc), 1, file); nRead += tmp * SIZEOF(xkmOutlineDesc); - ol = XkbAddGeomOutline(shape, olWire.num_points); + ol = SrvXkbAddGeomOutline(shape, olWire.num_points); if (!ol) { _XkbLibError(_XkbErrBadAlloc, "ReadXkmGeometry", 0); return nRead;