fix build with gcc3

This commit is contained in:
naddy 2004-03-06 22:11:08 +00:00
parent 0389ade289
commit 50bace2360
2 changed files with 107 additions and 0 deletions

View File

@ -0,0 +1,48 @@
$OpenBSD: patch-grove_Node_cxx,v 1.1 2004/03/06 22:11:08 naddy Exp $
--- grove/Node.cxx.orig 2004-03-06 22:09:29.000000000 +0100
+++ grove/Node.cxx 2004-03-06 22:10:06.000000000 +0100
@@ -477,7 +477,7 @@ AccessResult Node::property(ComponentNam
ret = getEntityType(type);
if (ret == accessOK) {
switch (type) {
-#define ENUM(e, E) case EntityType::##e: value.set(ComponentName::id##E); break;
+#define ENUM(e, E) case EntityType::e: value.set(ComponentName::id##E); break;
ENUM(text, Text)
ENUM(cdata, Cdata)
ENUM(sdata, Sdata)
@@ -497,7 +497,7 @@ AccessResult Node::property(ComponentNam
ret = getDeclValueType(type);
if (ret == accessOK) {
switch (type) {
-#define ENUM(e, E) case DeclValueType::##e: value.set(ComponentName::id##E); break;
+#define ENUM(e, E) case DeclValueType::e: value.set(ComponentName::id##E); break;
ENUM(cdata, Cdata)
ENUM(entity, Entity)
ENUM(entities, Entities)
@@ -527,7 +527,7 @@ AccessResult Node::property(ComponentNam
ret = getDefaultValueType(type);
if (ret == accessOK) {
switch (type) {
-#define ENUM(e, E) case DefaultValueType::##e: value.set(ComponentName::id##E); break;
+#define ENUM(e, E) case DefaultValueType::e: value.set(ComponentName::id##E); break;
ENUM(value, Value)
ENUM(fixed, Fixed)
ENUM(required, Required)
@@ -547,7 +547,7 @@ AccessResult Node::property(ComponentNam
ret = getContentType(type);
if (ret == accessOK) {
switch (type) {
-#define ENUM(e, E) case ContentType::##e: value.set(ComponentName::id##E); break;
+#define ENUM(e, E) case ContentType::e: value.set(ComponentName::id##E); break;
ENUM(cdata, Cdata)
ENUM(rcdata, Rcdata)
ENUM(empty, Empty)
@@ -566,7 +566,7 @@ AccessResult Node::property(ComponentNam
ret = getConnector(type);
if (ret == accessOK) {
switch (type) {
-#define ENUM(e, E) case Connector::##e: value.set(ComponentName::id##E); break;
+#define ENUM(e, E) case Connector::e: value.set(ComponentName::id##E); break;
ENUM(and_, And)
ENUM(or_, Or)
ENUM(seq, Seq)

View File

@ -0,0 +1,59 @@
$OpenBSD: patch-include_Attribute_h,v 1.1 2004/03/06 22:11:08 naddy Exp $
--- include/Attribute.h.orig 1999-05-02 17:36:36.000000000 +0200
+++ include/Attribute.h 2004-03-06 21:59:55.000000000 +0100
@@ -31,6 +31,27 @@ class AttributeSemantics;
class AttributeContext;
class Syntax;
+class SP_API AttributeValue : public Resource {
+public:
+ enum Type {
+ implied,
+ cdata,
+ tokenized
+ };
+ AttributeValue();
+ virtual ~AttributeValue();
+ virtual AttributeSemantics *makeSemantics(const DeclaredValue *,
+ AttributeContext &,
+ const StringC &,
+ unsigned &,
+ unsigned &) const;
+ virtual Type info(const Text *&, const StringC *&) const = 0;
+ virtual const Text *text() const;
+ virtual Boolean recoverUnquoted(const StringC &, const Location &,
+ AttributeContext &, const StringC &);
+ static Boolean handleAsUnterminated(const Text &, AttributeContext &);
+};
+
class SP_API AttributeDefinitionDesc {
public:
AttributeDefinitionDesc() { }
@@ -373,27 +394,6 @@ private:
ConstPtr<Notation> notation_;
};
-class SP_API AttributeValue : public Resource {
-public:
- enum Type {
- implied,
- cdata,
- tokenized
- };
- AttributeValue();
- virtual ~AttributeValue();
- virtual AttributeSemantics *makeSemantics(const DeclaredValue *,
- AttributeContext &,
- const StringC &,
- unsigned &,
- unsigned &) const;
- virtual Type info(const Text *&, const StringC *&) const = 0;
- virtual const Text *text() const;
- virtual Boolean recoverUnquoted(const StringC &, const Location &,
- AttributeContext &, const StringC &);
- static Boolean handleAsUnterminated(const Text &, AttributeContext &);
-};
-
class SP_API ImpliedAttributeValue : public AttributeValue {
public:
ImpliedAttributeValue();