diff -Naurp libxml-1.8.17/Makefile.in libxml-1.8.17-cygwin/Makefile.in --- libxml-1.8.17/Makefile.in Wed Jan 23 22:49:28 2002 +++ libxml-1.8.17-cygwin/Makefile.in Thu Jan 31 12:33:49 2002 @@ -61,7 +61,7 @@ host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CC = @CC@ -CFLAGS = @CFLAGS@ +CFLAGS = @CFLAGS@ $(DLL_CFLAGS) CORBA_CFLAGS = @CORBA_CFLAGS@ CPP = @CPP@ DLLTOOL = @DLLTOOL@ @@ -305,6 +305,9 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIE if test -f $$p; then \ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + echo "install -D --mode=755 .libs/$$dll $(DESTDIR)$(bindir)/$$dll"; \ + install -D --mode=755 .libs/$$dll $(DESTDIR)$(bindir)/$$dll; \ else :; fi; \ done @@ -312,6 +315,8 @@ uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) list='$(lib_LTLIBRARIES)'; for p in $$list; do \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + rm -f $(DESTDIR)$(bindir)/$$dll; \ done .c.o: @@ -358,8 +363,10 @@ distclean-libtool: maintainer-clean-libtool: +libxml.la: DLL_CFLAGS = -DLIBXML_BUILD_DLL libxml.la: $(libxml_la_OBJECTS) $(libxml_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libxml_la_LDFLAGS) $(libxml_la_OBJECTS) $(libxml_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../mkdll.sh $@ $(liblibxml_la_LIBADD) $(LIBS) -lz mostlyclean-noinstPROGRAMS: diff -Naurp libxml-1.8.17/configure libxml-1.8.17-cygwin/configure --- libxml-1.8.17/configure Wed Jan 23 22:49:17 2002 +++ libxml-1.8.17-cygwin/configure Thu Jan 31 12:33:49 2002 @@ -3249,7 +3249,8 @@ EOF else $CC -o impgen impgen.c ; fi)~ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' - old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' +# old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' +old_archive_from_expsyms_cmds= # cygwin and mingw dlls have different entry points and sets of symbols # to exclude. @@ -4946,7 +4947,8 @@ old_postuninstall_cmds=$lt_old_postunins old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds +# old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds +old_archive_from_expsyms_cmds= # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds diff -Naurp libxml-1.8.17/mkdll.sh libxml-1.8.17-cygwin/mkdll.sh --- libxml-1.8.17/mkdll.sh Thu Jan 1 00:00:00 1970 +++ libxml-1.8.17-cygwin/mkdll.sh Thu Jan 31 12:33:49 2002 @@ -0,0 +1,59 @@ +#!/bin/sh + +# script to generate dll from libtool-generated static archive (.la file) +# invoke in .libs directory with: +# mkdll.sh +# eg: +# mkdll.sh libtest.la -L/usr/local/lib -llocal + +# defaults to using gcc for libraries written in C. +# set the CC env var to use a different compiler driver: eg +# export CC=g++ +# for C++ libraries + +# defaults to using /usr/local as the installation PREFIX +# override this by setting the PREFIX env var: eg +# export PREFIX=/opt/gnome + +archive=$1 +module=$(echo $(basename $archive) | sed -e 's,^lib\(.*\).la$,\1,') + +shift +dependency_libs="$@" + +test -n "$CC" || CC=gcc +test -n "$PREFIX" || prefix=/usr/local + +# get the static library name +old_lib=$(sed -ne '/^old_library=/ s,^old_library='\''\(.*\)'\''.*$,\1,p' $archive) + +# update the archive with the dll and import lib name. +if sed -e 's,^dlname='\'\'',dlname='\'cyg${module}.dll\'',;s,^library_names='\'\'',library_names='\'lib${module}.dll.a\'',' $archive > ${archive}.tmp +then cat ${archive}.tmp > ${archive} +fi +rm -f ${archive}.tmp + +# update the install archive if it exists +if [ -f ${archive}i ] ; then + if sed -e 's,^dlname='\'\'',dlname='\'../bin/cyg${module}.dll\'',;s,^library_names='\'\'',library_names='\'lib${module}.dll.a\'',' ${archive}i > ${archive}i.tmp + then cat ${archive}i.tmp > ${archive}i + fi + rm -f ${archive}i.tmp +fi + +# update the archive with the install dir if not already set +libdir=${prefix}/lib +if sed -e '/^libdir=/ s,='\'\'',='\'$libdir\'',' $archive > ${archive}.tmp +then cat ${archive}.tmp > $archive +fi +rm -f ${archive}.tmp + + +# report the link command to stdout +eval echo $CC -shared -o cyg${module}.dll -Wl,--out-implib=lib${module}.dll.a \ +-Wl,--export-all-symbols -Wl,--whole-archive $old_lib -Wl,--no-whole-archive ${dependency_libs} + +# do the link command +eval $CC -shared -o cyg${module}.dll -Wl,--out-implib=lib${module}.dll.a -Wl,--export-all-symbols \ +-Wl,--whole-archive $old_lib -Wl,--no-whole-archive ${dependency_libs} + diff -Naurp libxml-1.8.17/parser.h libxml-1.8.17-cygwin/parser.h --- libxml-1.8.17/parser.h Sun Mar 25 00:14:16 2001 +++ libxml-1.8.17-cygwin/parser.h Thu Jan 31 12:33:49 2002 @@ -14,6 +14,15 @@ #include "xmlIO.h" #include "entities.h" +/* CYGWIN auto-import fix for multiword data exports */ +/* Note: auto-export is assumed (no __declspec(dllexport)) */ +#undef LIBXML_IMPORT +#if (defined(_WIN32) || defined(__CYGWIN__)) && !(defined(LIBXML_BUILD_DLL) || defined(LIBXML_STATIC)) +#define LIBXML_IMPORT __declspec(dllimport) +#else +#define LIBXML_IMPORT +#endif + #ifdef __cplusplus extern "C" { @@ -302,9 +311,9 @@ typedef xmlParserInputPtr (*xmlExternalE */ extern const char *xmlParserVersion; -extern xmlSAXLocator xmlDefaultSAXLocator; -extern xmlSAXHandler xmlDefaultSAXHandler; -extern xmlSAXHandler htmlDefaultSAXHandler; +extern LIBXML_IMPORT xmlSAXLocator xmlDefaultSAXLocator; +extern LIBXML_IMPORT xmlSAXHandler xmlDefaultSAXHandler; +extern LIBXML_IMPORT xmlSAXHandler htmlDefaultSAXHandler; /** * entity substitution default behaviour.