[Expat-discuss] Lots of Patches

Sam TH sam@uchicago.edu
Fri, 2 Feb 2001 11:10:44 -0600


---------------------- multipart/signed attachment

--vkogqOf2sHV7VnPd
Well, I had a little spare time, so I fixed the non-platform specific
bugs listed in the bug tracker, and made everything compile (including
the three applications). =20

Attached are a number of files. =20

beos.diff fixes expat.h so that you can compile on BeOS systems.

makefile.diff changes several Makefiles to build properly

configure.diff changes the configure script so that it only builds
	makefile for the directories that exist, and so that it builds
	makefiles for all the necessary directories.

12367.diff is an untested bugfix for that bug.  It's just using the
	diff from the webpage. If anyone has a way to test this, I
	would be grateful.

Makefile.in is for the samples/ directory.

If people have questions or comments, I'm happy to hear them. =20
          =20
	sam th		    =20
	sam@uchicago.edu
	http://www.abisource.com/~sam/
	GnuPG Key: =20
	http://www.abisource.com/~sam/key

--vkogqOf2sHV7VnPd
Index: lib/xmltok.c
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmltok.c,v
retrieving revision 1.5
diff -u -r1.5 xmltok.c
--- lib/xmltok.c	2000/10/22 19:20:23	1.5
+++ lib/xmltok.c	2001/02/02 17:05:43
@@ -1500,6 +1500,7 @@
       if (ptr + 2 == end)
 	return XML_TOK_PARTIAL;
       if ((unsigned char)ptr[2] == 0xBF) {
+	*nextTokPtr = ptr + 3;
 	*encPtr = encodingTable[UTF_8_ENC];
 	return XML_TOK_BOM;
       }

--vkogqOf2sHV7VnPd
################################################################
# Process this file with top-level configure script to produce Makefile
#
# Copyright 2000 Clark Cooper
#
#  This file is part of EXPAT.
#
#  EXPAT is free software; you can redistribute it and/or modify it
#  under the terms of the License (based on the MIT/X license) contained
#  in the file COPYING that comes with this distribution.
#
# EXPAT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN EXPAT.
#
LIBDIR =3D ../lib/.libs
INCDIR =3D ../lib

LDFLAGS =3D @LDFLAGS@ -static=20
LIBS =3D -L$(LIBDIR) -lexpat
CFLAGS =3D @CFLAGS@ -I$(INCDIR)

srcdir =3D @srcdir@
top_srcdir =3D @top_srcdir@
VPATH =3D @srcdir@


all: elements

elements: elements.o
	$(CC) -o elements elements.o $(LDFLAGS) $(LIBS)

clean:
	rm -f elements core *.o

--vkogqOf2sHV7VnPd
Index: lib/expat.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/expat/expat/lib/expat.h,v
retrieving revision 1.11
diff -u -r1.11 expat.h
--- lib/expat.h	2001/01/24 19:37:36	1.11
+++ lib/expat.h	2001/02/02 17:06:00
@@ -9,7 +9,7 @@
 #include <stdlib.h>
=20
 #ifndef XMLPARSEAPI
-#  ifdef __declspec
+#  if def(__declspec) && !defined(__BEOS__)
 #    define XMLPARSEAPI __declspec(dllimport)
 #  else
 #    define XMLPARSEAPI /* nothing */

--vkogqOf2sHV7VnPd
Index: configure.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/expat/expat/configure.in,v
retrieving revision 1.10
diff -u -r1.10 configure.in
--- configure.in	2001/01/24 19:42:05	1.10
+++ configure.in	2001/02/02 17:07:13
@@ -87,4 +87,18 @@
=20
 AC_CHECK_FUNCS(memmove bcopy)
=20
-AC_OUTPUT(Makefile lib/Makefile lib/expat.h xmlwf/Makefile examples/Makefi=
le)
+OUTPUT=3D"Makefile lib/Makefile lib/expat.h"
+
+if test -d xmlwf; then
+OUTPUT=3D$OUTPUT" xmlwf/Makefile"
+fi
+
+if test -d sample; then
+OUTPUT=3D$OUTPUT" sample/Makefile"
+fi
+
+if test -d examples; then
+OUTPUT=3D$OUTPUT" examples/Makefile"
+fi
+
+AC_OUTPUT($OUTPUT)

--vkogqOf2sHV7VnPd
Index: sample/elements.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/expat/expat/sample/elements.c,v
retrieving revision 1.3
diff -u -r1.3 elements.c
--- sample/elements.c	2000/04/21 04:20:31	1.3
+++ sample/elements.c	2001/02/02 17:06:43
@@ -4,7 +4,7 @@
 one tab stop more than their parent element. */
=20
 #include <stdio.h>
-#include "xmlparse.h"
+#include "expat.h"
=20
 void startElement(void *userData, const char *name, const char **atts)
 {
Index: Makefile.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/expat/expat/Makefile.in,v
retrieving revision 1.6
diff -u -r1.6 Makefile.in
--- Makefile.in	2000/12/27 18:08:15	1.6
+++ Makefile.in	2001/02/02 17:06:43
@@ -76,13 +76,15 @@
 RANLIB =3D @RANLIB@
 VERSION =3D @VERSION@
=20
-SUBDIRS =3D lib
+SUBDIRS =3D lib examples sample xmlwf
 ACLOCAL_M4 =3D $(top_srcdir)/aclocal.m4
 CONFIG_HEADERS =3D config.h:config.hin
=20
 DISTDIR =3D $(PACKAGE)-$(VERSION)
 DISTRIBUTION =3D $(DISTDIR).tar.gz
=20
+buildlib: lib
+
 all: $(SUBDIRS)
=20
 .PHONY: all $(SUBDIRS) clean distclean maintainer-clean dist install \
@@ -119,7 +121,7 @@
 	@list=3D'$(SUBDIRS)'; for dir in $$list; do \
 	  cd $$dir; $(MAKE) distclean; cd ..; \
 	done
-	rm -f config.h config.status config.log libtool examples/Makefile xmlwf/M=
akefile
+	rm -f config.h config.status config.log libtool examples/Makefile xmlwf/M=
akefile sample/Makefile=20
=20
 maintainer-clean: distclean
 	rm -f $(DISTRIBUTION)
Index: examples/Makefile.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/expat/expat/examples/Makefile.in,v
retrieving revision 1.1
diff -u -r1.1 Makefile.in
--- examples/Makefile.in	2000/09/18 16:26:21	1.1
+++ examples/Makefile.in	2001/02/02 17:06:43
@@ -18,12 +18,23 @@
 # SOFTWARE OR THE USE OR OTHER DEALINGS IN EXPAT.
 #
=20
+LIBDIR =3D ../lib/.libs
+INCDIR =3D ../lib
+
 CPPFLAGS =3D @CPPFLAGS@
-LDFLAGS =3D @LDFLAGS@
-LIBS =3D -lexpat
-CFLAGS =3D @CFLAGS@
+LDFLAGS =3D @LDFLAGS@ -static
+LIBS =3D -L$(LIBDIR) -lexpat=20
+CFLAGS =3D @CFLAGS@ -I$(INCDIR)
+
+srcdir =3D @srcdir@
+top_srcdir =3D @top_srcdir@
+VPATH =3D @srcdir@
=20
+
 all: outline
=20
 outline: outline.o
-	$(CC) -o outline outline.o $(LDFLAGS) $(LIBS)
\ No newline at end of file
+	$(CC) -o outline outline.o $(LDFLAGS) $(LIBS)
+
+clean:
+	rm -f outline core *.o
Index: xmlwf/Makefile.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/expat/expat/xmlwf/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- xmlwf/Makefile.in	2000/09/28 19:47:34	1.2
+++ xmlwf/Makefile.in	2001/02/02 17:06:43
@@ -1,15 +1,41 @@
+################################################################
+# Process this file with top-level configure script to produce Makefile
+#
+# Copyright 2000 Clark Cooper
+#
+#  This file is part of EXPAT.
+#
+#  EXPAT is free software; you can redistribute it and/or modify it
+#  under the terms of the License (based on the MIT/X license) contained
+#  in the file COPYING that comes with this distribution.
+#
+# EXPAT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN EXPAT.
+#
+
 LIBDIR=3D ../lib/.libs
 INCDIR=3D ../lib
=20
-LDFLAGS=3D @LDFLAGS@
+LDFLAGS=3D @LDFLAGS@ -static
 CFLAGS=3D @CFLAGS@ -I$(INCDIR)
=20
 FILEMAP_OBJ=3D @FILEMAP_OBJ@
 OBJS=3D xmlwf.o xmlfile.o codepage.o $(FILEMAP_OBJ)
 LIBS=3D -L$(LIBDIR) -lexpat
=20
+srcdir =3D @srcdir@
+top_srcdir =3D @top_srcdir@
+VPATH =3D @srcdir@
+
+
 xmlwf: $(OBJS)
 	$(CC) -o xmlwf $(LDFLAGS) $(OBJS) $(LIBS)
=20
 clean:
-	rm -f xmlwf core *.o
\ No newline at end of file
+	rm -f xmlwf core *.o
+

--vkogqOf2sHV7VnPd--

---------------------- multipart/signed attachment
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://mail.libexpat.org/pipermail-21/expat-discuss/attachments/20010202/47da376d/attachment.bin

---------------------- multipart/signed attachment--