summaryrefslogtreecommitdiff
path: root/hw/xfree86/common
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2019-07-22 13:51:06 -0400
committerAdam Jackson <ajax@redhat.com>2019-07-22 20:28:27 -0400
commit454b3a826edb5fc6d0fea3a9cfd1a5e8fc568747 (patch)
treefa724c3da6bd67e39813af5d55407ad286b3cd32 /hw/xfree86/common
parent074c98cf5365c3d534f7c62ad6dbdd332883b46b (diff)
hw: Rename boolean config value field from bool to boolean
"bool" conflicts with C++ (meh) and stdbool.h (ngh alright fine). This is a driver-visible change and will likely break the build for mach64, but it can be fixed by simply using xf86ReturnOptValBool like every other driver. Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'hw/xfree86/common')
-rw-r--r--hw/xfree86/common/xf86Opt.h2
-rw-r--r--hw/xfree86/common/xf86Option.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/hw/xfree86/common/xf86Opt.h b/hw/xfree86/common/xf86Opt.h
index 3be2a0fc7..3046fbd41 100644
--- a/hw/xfree86/common/xf86Opt.h
+++ b/hw/xfree86/common/xf86Opt.h
@@ -41,7 +41,7 @@ typedef union {
unsigned long num;
const char *str;
double realnum;
- Bool bool;
+ Bool boolean;
OptFrequency freq;
} ValueUnion;
diff --git a/hw/xfree86/common/xf86Option.c b/hw/xfree86/common/xf86Option.c
index 06973bca3..ca538cc57 100644
--- a/hw/xfree86/common/xf86Option.c
+++ b/hw/xfree86/common/xf86Option.c
@@ -213,7 +213,7 @@ LookupBoolOption(XF86OptionPtr optlist, const char *name, int deflt,
o.name = name;
o.type = OPTV_BOOLEAN;
if (ParseOptionValue(-1, optlist, &o, markUsed))
- deflt = o.value.bool;
+ deflt = o.value.boolean;
return deflt;
}
@@ -474,7 +474,7 @@ xf86ShowUnusedOptions(int scrnIndex, XF86OptionPtr opt)
static Bool
GetBoolValue(OptionInfoPtr p, const char *s)
{
- return xf86getBoolValue(&p->value.bool, s);
+ return xf86getBoolValue(&p->value.boolean, s);
}
static Bool
@@ -678,7 +678,7 @@ ParseOptionValue(int scrnIndex, XF86OptionPtr options, OptionInfoPtr p,
if (markUsed)
xf86MarkOptionUsedByName(options, newn);
if (GetBoolValue(&opt, s)) {
- p->value.bool = !opt.value.bool;
+ p->value.boolean = !opt.value.boolean;
p->found = TRUE;
}
else {
@@ -869,7 +869,7 @@ xf86GetOptValBool(const OptionInfoRec * table, int token, Bool *value)
p = xf86TokenToOptinfo(table, token);
if (p && p->found) {
- *value = p->value.bool;
+ *value = p->value.boolean;
return TRUE;
}
else
@@ -883,7 +883,7 @@ xf86ReturnOptValBool(const OptionInfoRec * table, int token, Bool def)
p = xf86TokenToOptinfo(table, token);
if (p && p->found) {
- return p->value.bool;
+ return p->value.boolean;
}
else
return def;