summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2004-09-22 21:36:16 +0000
committerespie <espie@openbsd.org>2004-09-22 21:36:16 +0000
commit779ec672af1df21ce3e80fafb75ff45f5a6ac592 (patch)
treeafb605f3b2c62709febc17ce3d40f8847089311e
parentsay goodbye to valid-xhtml icon (what do we care, and it's a binary file). (diff)
downloadwireguard-openbsd-779ec672af1df21ce3e80fafb75ff45f5a6ac592.tar.xz
wireguard-openbsd-779ec672af1df21ce3e80fafb75ff45f5a6ac592.zip
from port:
fix expat.h (from expat CVS) breakage reported by naddy@: http://sourceforge.net/tracker/index.php?func=detail&aid=676844&group_id=10127&atid=110127
-rw-r--r--lib/libexpat/lib/expat.h45
1 files changed, 24 insertions, 21 deletions
diff --git a/lib/libexpat/lib/expat.h b/lib/libexpat/lib/expat.h
index 0b70302dbf9..5322bea77e3 100644
--- a/lib/libexpat/lib/expat.h
+++ b/lib/libexpat/lib/expat.h
@@ -57,6 +57,26 @@ typedef unsigned char XML_Bool;
#define XML_TRUE ((XML_Bool) 1)
#define XML_FALSE ((XML_Bool) 0)
+/* The XML_Status enum gives the possible return values for several
+ API functions. The preprocessor #defines are included so this
+ stanza can be added to code that still needs to support older
+ versions of Expat 1.95.x:
+
+ #ifndef XML_STATUS_OK
+ #define XML_STATUS_OK 1
+ #define XML_STATUS_ERROR 0
+ #endif
+
+ Otherwise, the #define hackery is quite ugly and would have been
+ dropped.
+*/
+enum XML_Status {
+ XML_STATUS_ERROR = 0,
+#define XML_STATUS_ERROR XML_STATUS_ERROR
+ XML_STATUS_OK = 1
+#define XML_STATUS_OK XML_STATUS_OK
+};
+
enum XML_Error {
XML_ERROR_NONE,
XML_ERROR_NO_MEMORY,
@@ -717,28 +737,11 @@ XML_GetIdAttributeIndex(XML_Parser parser);
detected. The last call to XML_Parse must have isFinal true; len
may be zero for this call (or any other).
- The XML_Status enum gives the possible return values for the
- XML_Parse and XML_ParseBuffer functions. Though the return values
- for these functions has always been described as a Boolean value,
- the implementation, at least for the 1.95.x series, has always
- returned exactly one of these values. The preprocessor #defines
- are included so this stanza can be added to code that still needs
- to support older versions of Expat 1.95.x:
-
- #ifndef XML_STATUS_OK
- #define XML_STATUS_OK 1
- #define XML_STATUS_ERROR 0
- #endif
-
- Otherwise, the #define hackery is quite ugly and would have been dropped.
+ Though the return values for these functions has always been
+ described as a Boolean value, the implementation, at least for the
+ 1.95.x series, has always returned exactly one of the XML_Status
+ values.
*/
-enum XML_Status {
- XML_STATUS_ERROR = 0,
-#define XML_STATUS_ERROR XML_STATUS_ERROR
- XML_STATUS_OK = 1
-#define XML_STATUS_OK XML_STATUS_OK
-};
-
XMLPARSEAPI(enum XML_Status)
XML_Parse(XML_Parser parser, const char *s, int len, int isFinal);