diff -Naurp libole2-0.2.4/configure libole2-0.2.4-cygwin/configure --- libole2-0.2.4/configure Sun Nov 4 06:05:13 2001 +++ libole2-0.2.4-cygwin/configure Wed May 15 11:55:56 2002 @@ -4188,7 +4188,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. @@ -6135,7 +6136,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 libole2-0.2.4/libole2/Makefile.in libole2-0.2.4-cygwin/libole2/Makefile.in --- libole2-0.2.4/libole2/Makefile.in Sun Nov 4 06:05:34 2001 +++ libole2-0.2.4-cygwin/libole2/Makefile.in Wed May 15 11:13:04 2002 @@ -219,6 +219,7 @@ maintainer-clean-libtool: libgnomeole2.la: $(libgnomeole2_la_OBJECTS) $(libgnomeole2_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libgnomeole2_la_LDFLAGS) $(libgnomeole2_la_OBJECTS) $(libgnomeole2_la_LIBADD) $(LIBS) + PREFIX=$(prefix) sh $(top_srcdir)/mkdll.sh $@ $$(glib-config --libs) install-libgnomeole2includeHEADERS: $(libgnomeole2include_HEADERS) @$(NORMAL_INSTALL) diff -Naurp libole2-0.2.4/mkdll.sh libole2-0.2.4-cygwin/mkdll.sh --- libole2-0.2.4/mkdll.sh Thu Jan 1 00:00:00 1970 +++ libole2-0.2.4-cygwin/mkdll.sh Wed May 15 11:56:27 2002 @@ -0,0 +1,68 @@ +#!/bin/sh + +# script to generate dll from libtool-generated static archive (.la file) +# invoke 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 +test -f $archive || { echo $(basename $0): $archive not found; exit 1; } + +module=$(echo $(basename $archive) | sed -e 's,^lib\(.*\).la$,\1,') + +shift +dependency_libs="$@" + +test -n "$CC" || CC=gcc +prefix=${PREFIX:=/usr/local} + +# get the static library name +# first look in the .la archive +old_lib=$(sed -ne '/^old_library=/ s,^old_library='\''\(.*\)'\''.*$,\1,p' .libs/$archive) +# if not there, use default name +test -n "$old_lib" || old_lib=lib${module}.a + + + +# update the archive with the dll and import lib name; fix install dir; remove relink command +# (${prefix}/lib is hard-coded here - edit it if necessary) +libdir=${prefix}/lib +if sed -e 's,^dlname='\'\'',dlname='\'cyg${module}.dll\'',' \ + -e 's,^library_names='\'\'',library_names='\'lib${module}.dll.a\'',' \ + -e '/^libdir=/ s,='\'\'',='\'$libdir\'',' \ + -e '/^relink_command=/ s,^$,,' \ + .libs/$archive > .libs/${archive}.tmp +then cat .libs/${archive}.tmp > .libs/${archive} +fi +rm -f .libs/${archive}.tmp + +# update the install archive if it exists +if [ -f .libs/${archive}i ] ; then + if sed -e 's,^dlname='\'\'',dlname='\'../bin/cyg${module}.dll\'',' \ + -e 's,^library_names='\'\'',library_names='\'lib${module}.dll.a\'',' \ + -e '/^relink_command=/ s,^$,,' \ + .libs/${archive}i > .libs/${archive}i.tmp + then cat .libs/${archive}i.tmp > .libs/${archive}i + fi + rm -f .libs/${archive}i.tmp +fi + + +# 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 - if it fails, remove archive so make knows to re-build it +eval $CC -shared -o .libs/cyg${module}.dll -Wl,--out-implib=.libs/lib${module}.dll.a -Wl,--export-all-symbols \ +-Wl,--whole-archive .libs/$old_lib -Wl,--no-whole-archive ${dependency_libs} || { rm -f $archive; false; } + diff -Naurp ibole2-0.2.4/libole2/ms-ole.c libole2-0.2.4-cygwin/libole2/ms-ole.c --- libole2-0.2.4/libole2/ms-ole.c Wed Oct 31 00:45:25 2001 +++ libole2-0.2.4-cygwin/libole2/ms-ole.c Thu May 16 18:08:52 2002 @@ -1678,7 +1678,7 @@ ms_ole_open_vfs (MsOle **fs, const char f->mem = g_new (guint8, BB_BLOCK_SIZE); if (!f->mem || - f->syswrap->read (file, f->mem, BB_BLOCK_SIZE == -1)) { + f->syswrap->read (file, f->mem, BB_BLOCK_SIZE) == -1) { g_warning ("Error reading header\n"); f->syswrap->close (file) ; g_free (f);