xkb: rename XkbAddGeomProperty() to SrvXkbAddGeomProperty()

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:31:01 +01:00 committed by Enrico Weigelt, metux IT consult .
parent d19cb7e6a7
commit 9dd5637d68
4 changed files with 6 additions and 8 deletions

View File

@ -542,7 +542,7 @@ XkbAllocGeometry(XkbDescPtr xkb, XkbGeometrySizesPtr sizes)
/***====================================================================***/
XkbPropertyPtr
XkbAddGeomProperty(XkbGeometryPtr geom, char *name, char *value)
SrvXkbAddGeomProperty(XkbGeometryPtr geom, char *name, char *value)
{
register int i;
register XkbPropertyPtr prop;

View File

@ -5535,7 +5535,7 @@ _CheckSetGeom(XkbGeometryPtr geom, xkbSetGeometryReq * req, ClientPtr client)
free(name);
return status;
}
if (XkbAddGeomProperty(geom, name, val) == NULL) {
if (SrvXkbAddGeomProperty(geom, name, val) == NULL) {
free(name);
free(val);
return BadAlloc;

View File

@ -29,7 +29,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "xkbstr.h"
#define XkbAddGeomProperty SrvXkbAddGeomProperty
#define XkbAddGeomRow SrvXkbAddGeomRow
#define XkbAddGeomSection SrvXkbAddGeomSection
#define XkbAddGeomShape SrvXkbAddGeomShape
@ -304,10 +303,9 @@ typedef enum {
XKB_GEOM_CLEAR_ALL /* Clear all items after reallocation. */
} XkbGeomClearance;
extern XkbPropertyPtr XkbAddGeomProperty(XkbGeometryPtr /* geom */ ,
char * /* name */ ,
char * /* value */
);
XkbPropertyPtr SrvXkbAddGeomProperty(XkbGeometryPtr geom,
char *name,
char *value);
XkbKeyAliasPtr SrvXkbAddGeomKeyAlias(XkbGeometryPtr geom,
char *alias,

View File

@ -1068,7 +1068,7 @@ ReadXkmGeometry(FILE * file, XkbDescPtr xkb)
for (i = 0; i < wireGeom.num_properties; i++) {
nRead += XkmGetCountedString(file, buf, 100);
nRead += XkmGetCountedString(file, val, 1024);
if (XkbAddGeomProperty(geom, buf, val) == NULL) {
if (SrvXkbAddGeomProperty(geom, buf, val) == NULL) {
_XkbLibError(_XkbErrBadAlloc, "ReadXkmGeometry", 0);
return nRead;
}