diff options
author | kuriyama <kuriyama@FreeBSD.org> | 2003-02-06 09:25:48 +0800 |
---|---|---|
committer | kuriyama <kuriyama@FreeBSD.org> | 2003-02-06 09:25:48 +0800 |
commit | 21b34fcfb4d7ef6f5b0ab1f9359e53904223ccf6 (patch) | |
tree | 4fcd4c7bf188ef3e81402f697d022c3feedd0d68 /textproc/expat2 | |
parent | 7db756e28135e1d1ef2c8b23534458aea4319713 (diff) | |
download | freebsd-ports-gnome-21b34fcfb4d7ef6f5b0ab1f9359e53904223ccf6.tar.gz freebsd-ports-gnome-21b34fcfb4d7ef6f5b0ab1f9359e53904223ccf6.tar.zst freebsd-ports-gnome-21b34fcfb4d7ef6f5b0ab1f9359e53904223ccf6.zip |
Move declaration of enum XML_Status to more earlier place.
This patch is already included in expat repository and will be removed
after next version is released.
Pointed out by: Jordanas Kriauciunas <joskis@xxx.lt>
Diffstat (limited to 'textproc/expat2')
-rw-r--r-- | textproc/expat2/Makefile | 1 | ||||
-rw-r--r-- | textproc/expat2/files/patch-expat.h | 62 |
2 files changed, 63 insertions, 0 deletions
diff --git a/textproc/expat2/Makefile b/textproc/expat2/Makefile index b6f684994d80..4840403904f3 100644 --- a/textproc/expat2/Makefile +++ b/textproc/expat2/Makefile @@ -7,6 +7,7 @@ PORTNAME= expat PORTVERSION= 1.95.6 +PORTREVISION= 1 CATEGORIES= textproc MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= expat diff --git a/textproc/expat2/files/patch-expat.h b/textproc/expat2/files/patch-expat.h new file mode 100644 index 000000000000..1399f19289ec --- /dev/null +++ b/textproc/expat2/files/patch-expat.h @@ -0,0 +1,62 @@ +--- lib/expat.h.orig Fri Jan 17 07:03:42 2003 ++++ lib/expat.h Thu Feb 6 10:19:21 2003 +@@ -57,6 +57,26 @@ + #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 @@ + 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); + |