summaryrefslogtreecommitdiff
path: root/textproc/tclExpat
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2002-09-29 08:01:05 +0000
committerKris Kennaway <kris@FreeBSD.org>2002-09-29 08:01:05 +0000
commit3b663578f7f4fadc03c93424b74df4b217f91c8f (patch)
treebfcd7572446d0159a35fa740fca14170e05c8e37 /textproc/tclExpat
parentFix build (remove bogus *alloc declarations) (diff)
Fix build on -stable and -current
Reviewed by: mi (maintainer)
Notes
Notes: svn path=/head/; revision=67235
Diffstat (limited to 'textproc/tclExpat')
-rw-r--r--textproc/tclExpat/files/Makefile2
-rw-r--r--textproc/tclExpat/files/patch-aa226
2 files changed, 200 insertions, 28 deletions
diff --git a/textproc/tclExpat/files/Makefile b/textproc/tclExpat/files/Makefile
index f7f5c2c2f12c..10566440ecce 100644
--- a/textproc/tclExpat/files/Makefile
+++ b/textproc/tclExpat/files/Makefile
@@ -9,7 +9,7 @@ LIBDIR= ${LOCALBASE}/lib
TCL_VERSION?= 8.3
TCL_DVER?= ${TCL_VERSION:S/.//}
-CFLAGS= -I${LOCALBASE}/include/tcl${TCL_VERSION} -I${LOCALBASE}/include -Wall -Werror
+CFLAGS+= -I${LOCALBASE}/include/tcl${TCL_VERSION} -I${LOCALBASE}/include -Wall
LDADD+= -L${LOCALBASE}/lib -lexpat
USE_STUBS!= . ${LOCALBASE}/lib/tcl${TCL_VERSION}/tclConfig.sh; echo $$TCL_SUPPORTS_STUBS
diff --git a/textproc/tclExpat/files/patch-aa b/textproc/tclExpat/files/patch-aa
index fc02fab82863..43398217cc00 100644
--- a/textproc/tclExpat/files/patch-aa
+++ b/textproc/tclExpat/files/patch-aa
@@ -1,10 +1,19 @@
-This are mostly fixes for warnings, which show up when built with -Wall...
-
- -mi
-
---- tclexpat.c Wed Nov 15 20:13:35 2000
-+++ tclexpat.c Wed Nov 15 20:53:43 2000
-@@ -74,14 +74,14 @@
+--- tclexpat.c.orig Sat Aug 22 00:35:44 1998
++++ tclexpat.c Fri Aug 23 14:18:22 2002
+@@ -18,8 +18,9 @@
+ *
+ */
+
++#include <string.h>
+ #include <tcl.h>
+-#include "xmlparse.h"
++#include "expat.h"
+
+ /*
+ * The structure below is used to refer to an expat parser object.
+@@ -72,32 +73,32 @@
+ int objc,
+ Tcl_Obj *CONST objv[]));
-static void * (TclExpatElementStartHandler) _ANSI_ARGS_((void *userdata,
+static void (TclExpatElementStartHandler) _ANSI_ARGS_((void *userdata,
@@ -24,7 +33,8 @@ This are mostly fixes for warnings, which show up when built with -Wall...
-static void * (TclExpatExternalEntityRefHandler) _ANSI_ARGS_((XML_Parser parser,
+static int (TclExpatExternalEntityRefHandler) _ANSI_ARGS_((XML_Parser parser,
const XML_Char *openEntityNames,
-@@ -90,6 +90,6 @@
+ const XML_Char *base,
+ const XML_Char *systemId,
const XML_Char *publicId));
-static void * (TclExpatDefaultHandler) _ANSI_ARGS_ ((void *userData,
+static void (TclExpatDefaultHandler) _ANSI_ARGS_ ((void *userData,
@@ -33,21 +43,44 @@ This are mostly fixes for warnings, which show up when built with -Wall...
-static void * (TclExpatUnparsedDeclHandler) _ANSI_ARGS_ ((void *userData,
+static void (TclExpatUnparsedDeclHandler) _ANSI_ARGS_ ((void *userData,
const XML_Char *entityname,
-@@ -99,3 +99,3 @@
+ const XML_Char *base,
+ const XML_Char *systemId,
+ const XML_Char *publicId,
const XML_Char *notationName));
-static void * (TclExpatNotationDeclHandler) _ANSI_ARGS_ ((void *userData,
+static void (TclExpatNotationDeclHandler) _ANSI_ARGS_ ((void *userData,
const XML_Char *notationName,
-@@ -108,3 +108,3 @@
+ const XML_Char *base,
+ const XML_Char *systemId,
+@@ -106,7 +107,7 @@
+ const XML_Char *name,
+ XML_Encoding *info));
-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0)
-+#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) && !defined(Tcl_GetString)
++#if (TCL_MAJOR_VERSION >= 8) && !defined(Tcl_GetString)
-@@ -269,3 +269,2 @@
+ /*
+ *----------------------------------------------------------------------------
+@@ -134,7 +135,7 @@
+ s = Tcl_GetStringFromObj(obj, &i);
+ return s;
+ }
+-#endif /* TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0 */
++#endif /* TCL_MAJOR_VERSION >= 8 */
+
+ /*
+ *----------------------------------------------------------------------------
+@@ -267,7 +268,6 @@
+ Tcl_Interp *interp;
+ TclExpatInfo *expat;
{
- int len;
-@@ -286,18 +285,18 @@
+ if (!(expat->parser = XML_ParserCreate(NULL))) {
+ Tcl_SetResult(interp, "unable to create expat parser", NULL);
+@@ -284,22 +284,22 @@
+ */
+
XML_SetElementHandler(expat->parser,
- (XML_StartElementHandler) TclExpatElementStartHandler,
- (XML_EndElementHandler) TclExpatElementEndHandler);
@@ -75,51 +108,154 @@ This are mostly fixes for warnings, which show up when built with -Wall...
- (XML_UnknownEncodingHandler) TclExpatUnknownEncodingHandler,
+ TclExpatUnknownEncodingHandler,
(void *) expat);
-@@ -329,3 +328,2 @@
+ XML_SetUserData(expat->parser,
+ (void *) expat);
+@@ -327,7 +327,6 @@
+ TclExpatFreeParser(expat)
+ TclExpatInfo *expat;
{
- int len;
-@@ -359,3 +357,3 @@
+ XML_ParserFree(expat->parser);
+ expat->parser = NULL;
+@@ -357,7 +356,7 @@
+ Tcl_Obj *CONST objv[];
+ {
TclExpatInfo *expat = (TclExpatInfo *) clientData;
- char *method, *data;
+ char *data;
int len, index, result = TCL_OK;
-@@ -797,3 +795,3 @@
+ static char *options[] = {
+ "configure", "cget", "parse", "reset", NULL
+@@ -795,7 +794,7 @@
+ *----------------------------------------------------------------------------
+ */
-static void *
+static void
TclExpatElementStartHandler(userData, name, atts)
-@@ -879,3 +877,3 @@
+ void *userData;
+ const char *name;
+@@ -847,7 +846,7 @@
+ * It would be desirable to be able to terminate parsing
+ * if the return result is TCL_ERROR or TCL_BREAK.
+ */
+-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0)
++#if (TCL_MAJOR_VERSION >= 8)
+ result = Tcl_GlobalEvalObj(expat->interp, cmdPtr);
+ #else
+ result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL);
+@@ -877,7 +876,7 @@
+ *----------------------------------------------------------------------------
+ */
-static void *
+static void
TclExpatElementEndHandler(userData, name)
-@@ -949,3 +947,3 @@
+ void *userData;
+ CONST char *name;
+@@ -917,7 +916,7 @@
+ * It would be desirable to be able to terminate parsing
+ * if the return result is TCL_ERROR or TCL_BREAK.
+ */
+-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0)
++#if (TCL_MAJOR_VERSION >= 8)
+ result = Tcl_GlobalEvalObj(expat->interp, cmdPtr);
+ #else
+ result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL);
+@@ -947,7 +946,7 @@
+ *----------------------------------------------------------------------------
+ */
-static void *
+static void
TclExpatCharacterDataHandler(userData, s, len)
-@@ -1008,3 +1006,3 @@
+ void *userData;
+ CONST char *s;
+@@ -976,7 +975,7 @@
+ * It would be desirable to be able to terminate parsing
+ * if the return result is TCL_ERROR or TCL_BREAK.
+ */
+-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0)
++#if (TCL_MAJOR_VERSION >= 8)
+ result = Tcl_GlobalEvalObj(expat->interp, cmdPtr);
+ #else
+ result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL);
+@@ -1006,7 +1005,7 @@
+ *----------------------------------------------------------------------------
+ */
-static void *
+static void
TclExpatProcessingInstructionHandler(userData, target, data)
-@@ -1068,3 +1066,3 @@
+ void *userData;
+ CONST char *target;
+@@ -1036,7 +1035,7 @@
+ * It would be desirable to be able to terminate parsing
+ * if the return result is TCL_ERROR or TCL_BREAK.
+ */
+-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0)
++#if (TCL_MAJOR_VERSION >= 8)
+ result = Tcl_GlobalEvalObj(expat->interp, cmdPtr);
+ #else
+ result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL);
+@@ -1066,7 +1065,7 @@
+ *----------------------------------------------------------------------------
+ */
-static void *
+static void
TclExpatDefaultHandler(userData, s, len)
-@@ -1127,3 +1125,3 @@
+ void *userData;
+ CONST char *s;
+@@ -1095,7 +1094,7 @@
+ * It would be desirable to be able to terminate parsing
+ * if the return result is TCL_ERROR or TCL_BREAK.
+ */
+-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0)
++#if (TCL_MAJOR_VERSION >= 8)
+ result = Tcl_GlobalEvalObj(expat->interp, cmdPtr);
+ #else
+ result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL);
+@@ -1125,7 +1124,7 @@
+ *----------------------------------------------------------------------------
+ */
-static void *
+static void
TclExpatUnparsedDeclHandler(userData, entityname, base, systemId, publicId, notationName)
-@@ -1201,3 +1199,3 @@
+ void *userData;
+ CONST char *entityname;
+@@ -1169,7 +1168,7 @@
+ * It would be desirable to be able to terminate parsing
+ * if the return result is TCL_ERROR or TCL_BREAK.
+ */
+-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0)
++#if (TCL_MAJOR_VERSION >= 8)
+ result = Tcl_GlobalEvalObj(expat->interp, cmdPtr);
+ #else
+ result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL);
+@@ -1199,7 +1198,7 @@
+ *----------------------------------------------------------------------------
+ */
-static void *
+static void
TclExpatNotationDeclHandler(userData, notationName, base, systemId, publicId)
-@@ -1281,11 +1279,14 @@
+ void *userData;
+ CONST char *notationName;
+@@ -1241,7 +1240,7 @@
+ * It would be desirable to be able to terminate parsing
+ * if the return result is TCL_ERROR or TCL_BREAK.
+ */
+-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0)
++#if (TCL_MAJOR_VERSION >= 8)
+ result = Tcl_GlobalEvalObj(expat->interp, cmdPtr);
+ #else
+ result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL);
+@@ -1279,15 +1278,18 @@
+ XML_Encoding *info;
+ {
TclExpatInfo *expat = (TclExpatInfo *) encodingHandlerData;
+#if 0
Tcl_Obj *cmdPtr;
@@ -136,24 +272,60 @@ This are mostly fixes for warnings, which show up when built with -Wall...
- return;
+ return 1;
}
-@@ -1319,3 +1320,4 @@
+
+ /*
+@@ -1306,7 +1308,7 @@
+ * It would be desirable to be able to terminate parsing
+ * if the return result is TCL_ERROR or TCL_BREAK.
+ */
+-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0)
++#if (TCL_MAJOR_VERSION >= 8)
+ result = Tcl_GlobalEvalObj(expat->interp, cmdPtr);
+ #else
+ result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL);
+@@ -1317,7 +1319,8 @@
+
+ TclExpatHandlerResult(expat, result);
- return;
+ return 0;
+#endif
}
-@@ -1338,3 +1340,3 @@
+
+ /*
+@@ -1336,7 +1339,7 @@
+ *----------------------------------------------------------------------------
+ */
-static void *
+static int
TclExpatExternalEntityRefHandler(parser, openEntityNames, base, systemId, publicId)
-@@ -1352,3 +1354,3 @@
+ XML_Parser parser;
+ CONST char *openEntityNames;
+@@ -1350,7 +1353,7 @@
+
+ if (expat->externalentitycommand == NULL ||
expat->status != TCL_OK) {
- return;
+ return 0;
}
-@@ -1383,3 +1385,3 @@
+
+ /*
+@@ -1370,7 +1373,7 @@
+ * It would be desirable to be able to terminate parsing
+ * if the return result is TCL_ERROR or TCL_BREAK.
+ */
+-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0)
++#if (TCL_MAJOR_VERSION >= 8)
+ result = Tcl_GlobalEvalObj(expat->interp, cmdPtr);
+ #else
+ result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL);
+@@ -1381,7 +1384,7 @@
+
+ TclExpatHandlerResult(expat, result);
- return;
+ return 1;
}
+
+ /*