summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Heinecke <aheinecke@intevation.de>2011-03-07 11:43:23 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-03-07 13:50:38 +0000
commite0fc90bdf2c60a4c77fffaf490d6f06b2bd6999d (patch)
tree3fe6f065398d1fcb55243e81ae96acbfc69d1669
parentf1ba52066cadb90edb192ea93d55ba775bdb73d7 (diff)
Do not use the name ELEMENT_TYPE
On Windows Systems ELEMENT_TYPE is already defined in Winioctl.h this header is included indirectly in dbus-sysdeps.h. By avoiding the use of the Name ELEMENT_TYPE it is ensured that config-parser-common.h can be included together with dbus-sysdeps.h Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r--bus/config-parser-common.c4
-rw-r--r--bus/config-parser-common.h3
-rw-r--r--bus/config-parser.c8
3 files changed, 8 insertions, 7 deletions
diff --git a/bus/config-parser-common.c b/bus/config-parser-common.c
index f8d75be7..c522ff49 100644
--- a/bus/config-parser-common.c
+++ b/bus/config-parser-common.c
@@ -49,7 +49,7 @@ bus_config_parser_element_name_to_type (const char *name)
}
else if (strcmp (name, "type") == 0)
{
- return ELEMENT_TYPE;
+ return ELEMENT_CONFIGTYPE;
}
else if (strcmp (name, "fork") == 0)
{
@@ -169,7 +169,7 @@ bus_config_parser_element_type_to_name (ElementType type)
return "servicehelper";
case ELEMENT_INCLUDEDIR:
return "includedir";
- case ELEMENT_TYPE:
+ case ELEMENT_CONFIGTYPE:
return "type";
case ELEMENT_SELINUX:
return "selinux";
diff --git a/bus/config-parser-common.h b/bus/config-parser-common.h
index da745606..186bf4cf 100644
--- a/bus/config-parser-common.h
+++ b/bus/config-parser-common.h
@@ -41,7 +41,8 @@ typedef enum
ELEMENT_SERVICEDIR,
ELEMENT_SERVICEHELPER,
ELEMENT_INCLUDEDIR,
- ELEMENT_TYPE,
+ /* this is really <type>, but winioctl.h defines ELEMENT_TYPE */
+ ELEMENT_CONFIGTYPE,
ELEMENT_SELINUX,
ELEMENT_ASSOCIATE,
ELEMENT_STANDARD_SESSION_SERVICEDIRS,
diff --git a/bus/config-parser.c b/bus/config-parser.c
index 9808d732..2543162f 100644
--- a/bus/config-parser.c
+++ b/bus/config-parser.c
@@ -690,12 +690,12 @@ start_busconfig_child (BusConfigParser *parser,
return TRUE;
}
- else if (element_type == ELEMENT_TYPE)
+ else if (element_type == ELEMENT_CONFIGTYPE)
{
if (!check_no_attributes (parser, "type", attribute_names, attribute_values, error))
return FALSE;
- if (push_element (parser, ELEMENT_TYPE) == NULL)
+ if (push_element (parser, ELEMENT_CONFIGTYPE) == NULL)
{
BUS_SET_OOM (error);
return FALSE;
@@ -2002,7 +2002,7 @@ bus_config_parser_end_element (BusConfigParser *parser,
case ELEMENT_INCLUDE:
case ELEMENT_USER:
- case ELEMENT_TYPE:
+ case ELEMENT_CONFIGTYPE:
case ELEMENT_LISTEN:
case ELEMENT_PIDFILE:
case ELEMENT_AUTH:
@@ -2472,7 +2472,7 @@ bus_config_parser_content (BusConfigParser *parser,
}
break;
- case ELEMENT_TYPE:
+ case ELEMENT_CONFIGTYPE:
{
char *s;