(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.
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-04-29 13:03:21 +02:00
parent b28944c970
commit 3863a05f54
2 changed files with 3 additions and 6 deletions

View File

@ -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;

View File

@ -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,