From 3863a05f54501e16c549b8744df656a4da59ebe3 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 29 Apr 2024 13:03:21 +0200 Subject: [PATCH] (submit/xf86-parser v2) xfree86: parser: rename IOBASE for fixing name conflict Resolve conflicts with OS headers definining IOBASE by renaming the IOBASE enum value to XF86_TOKEN_IOBASE. This way, don't need the special #undef hack anymore. --- hw/xfree86/parser/Device.c | 4 ++-- hw/xfree86/parser/xf86tokens.h | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/xfree86/parser/Device.c b/hw/xfree86/parser/Device.c index cd2cd8415..c4e1fa81d 100644 --- a/hw/xfree86/parser/Device.c +++ b/hw/xfree86/parser/Device.c @@ -75,7 +75,7 @@ static const xf86ConfigSymTabRec DeviceTab[] = { {VIDEORAM, "videoram"}, {BIOSBASE, "biosbase"}, {MEMBASE, "membase"}, - {IOBASE, "iobase"}, + {XF86_TOKEN_IOBASE, "iobase"}, {CLOCKCHIP, "clockchip"}, {CHIPID, "chipid"}, {CHIPREV, "chiprev"}, @@ -179,7 +179,7 @@ xf86parseDeviceSection(void) Error(NUMBER_MSG, "MemBase"); ptr->dev_mem_base = xf86_lex_val.num; break; - case IOBASE: + case XF86_TOKEN_IOBASE: if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) Error(NUMBER_MSG, "IOBase"); ptr->dev_io_base = xf86_lex_val.num; diff --git a/hw/xfree86/parser/xf86tokens.h b/hw/xfree86/parser/xf86tokens.h index 2414a7038..11d0fa041 100644 --- a/hw/xfree86/parser/xf86tokens.h +++ b/hw/xfree86/parser/xf86tokens.h @@ -59,9 +59,6 @@ #ifndef _xf86_tokens_h #define _xf86_tokens_h -/* Undefine symbols that some OSs might define */ -#undef IOBASE - /* * Each token should have a unique value regardless of the section * it is used in. @@ -169,7 +166,7 @@ typedef enum { CLOCKS, VIDEORAM, BOARD, - IOBASE, + XF86_TOKEN_IOBASE, RAMDAC, DACSPEED, BIOSBASE,