diff options
author | jlam <jlam@pkgsrc.org> | 2003-02-05 03:57:13 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2003-02-05 03:57:13 +0000 |
commit | e73435b077c16136903284654159524effa6b9b4 (patch) | |
tree | 2220e88c9bb516a88dbe97348a6ea6f22041ca06 /textproc/expat | |
parent | 611871b0ba3fea90798d05171361c74cf60f7029 (diff) | |
download | pkgsrc-e73435b077c16136903284654159524effa6b9b4.tar.gz |
Bump PKGREVISION of textproc/expat to 1: fix an obvious C bug where types
should be declared/defined before they are used. This should fix errors
of the form:
.../expat.h:657: use of enum `XML_Status' without previous declaration
.../expat.h:736: multiple definition of `enum XML_Status'
Diffstat (limited to 'textproc/expat')
-rw-r--r-- | textproc/expat/Makefile | 3 | ||||
-rw-r--r-- | textproc/expat/distinfo | 3 | ||||
-rw-r--r-- | textproc/expat/patches/patch-aa | 70 |
3 files changed, 74 insertions, 2 deletions
diff --git a/textproc/expat/Makefile b/textproc/expat/Makefile index e3cbfa980f9..3178731ebef 100644 --- a/textproc/expat/Makefile +++ b/textproc/expat/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.8 2003/01/30 10:49:13 drochner Exp $ +# $NetBSD: Makefile,v 1.9 2003/02/05 03:57:13 jlam Exp $ # DISTNAME= expat-1.95.6 +PKGREVISION= 1 CATEGORIES= textproc MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=expat/} diff --git a/textproc/expat/distinfo b/textproc/expat/distinfo index 802f137a7a6..3e02d7cd24c 100644 --- a/textproc/expat/distinfo +++ b/textproc/expat/distinfo @@ -1,4 +1,5 @@ -$NetBSD: distinfo,v 1.9 2003/01/30 11:20:49 drochner Exp $ +$NetBSD: distinfo,v 1.10 2003/02/05 03:57:13 jlam Exp $ SHA1 (expat-1.95.6.tar.gz) = 1f062c91c6e51d3a91f9fdeacf202bb5b2b53d27 Size (expat-1.95.6.tar.gz) = 291876 bytes +SHA1 (patch-aa) = ece8cc6856144c27e680822f3c419a449dabbefc diff --git a/textproc/expat/patches/patch-aa b/textproc/expat/patches/patch-aa new file mode 100644 index 00000000000..e585da54a61 --- /dev/null +++ b/textproc/expat/patches/patch-aa @@ -0,0 +1,70 @@ +$NetBSD: patch-aa,v 1.3 2003/02/05 03:57:14 jlam Exp $ + +--- lib/expat.h.orig Thu Jan 16 14:03:42 2003 ++++ lib/expat.h +@@ -57,6 +57,32 @@ typedef unsigned char XML_Bool; + #define XML_TRUE ((XML_Bool) 1) + #define XML_FALSE ((XML_Bool) 0) + ++/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is ++ 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. ++*/ ++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, +@@ -712,32 +738,6 @@ XML_GetSpecifiedAttributeCount(XML_Parse + */ + XMLPARSEAPI(int) + XML_GetIdAttributeIndex(XML_Parser parser); +- +-/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is +- 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. +-*/ +-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); |