summaryrefslogtreecommitdiff
path: root/textproc/expat
diff options
context:
space:
mode:
authorjlam <jlam>2003-02-05 03:57:13 +0000
committerjlam <jlam>2003-02-05 03:57:13 +0000
commitbd3c3c0a745ef91ebdc5c52f85fe60ed12ef883b (patch)
tree2220e88c9bb516a88dbe97348a6ea6f22041ca06 /textproc/expat
parent2204c4eba90609b2d9fb453da8cae5a943e35f2c (diff)
downloadpkgsrc-bd3c3c0a745ef91ebdc5c52f85fe60ed12ef883b.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/Makefile3
-rw-r--r--textproc/expat/distinfo3
-rw-r--r--textproc/expat/patches/patch-aa70
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);