From b339a84180f1374c01a81738b892274aebe85d85 Mon Sep 17 00:00:00 2001 From: jlam Date: Wed, 5 Feb 2003 03:57:13 +0000 Subject: 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' --- doc/CHANGES | 3 +- textproc/expat/Makefile | 3 +- textproc/expat/distinfo | 3 +- textproc/expat/patches/patch-aa | 70 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+), 3 deletions(-) create mode 100644 textproc/expat/patches/patch-aa diff --git a/doc/CHANGES b/doc/CHANGES index c64e8449339..5510eef4596 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -1,4 +1,4 @@ -$NetBSD: CHANGES,v 1.1318 2003/02/04 18:06:48 skrll Exp $ +$NetBSD: CHANGES,v 1.1319 2003/02/05 03:58:10 jlam Exp $ Changes to the packages collection and infrastructure in 2003: @@ -555,3 +555,4 @@ Changes to the packages collection and infrastructure in 2003: Updated qt3-psql to 3.0.7 [skrll 2003-02-04] Updated qt3-mysql to 3.0.7 [skrll 2003-02-04] Updated qt3 to 3.0.7 [skrll 2003-02-04] + Updated expat to 1.95.6nb1 [jlam 2003-02-04] 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); -- cgit v1.2.3