diff -Naurp gnome-vfs-1.0.5/configure gnome-vfs-1.0.5-cygwin/configure --- gnome-vfs-1.0.5/configure 2002-03-15 06:57:18.000000000 +0000 +++ gnome-vfs-1.0.5-cygwin/configure 2003-02-26 08:30:14.000000000 +0000 @@ -3337,7 +3337,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. @@ -5154,7 +5155,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 @@ -8869,7 +8871,7 @@ EOF fi -for ac_func in getdtablesize open64 lseek64 statvfs +for ac_func in getdtablesize statvfs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:8876: checking for $ac_func" >&5 @@ -9124,8 +9126,8 @@ $ac_cv_sizeof_long_long) VFS_OFFSET="long long" VFS_SIZE_IS="UNSIGNED_LONG_LONG" VFS_OFFSET_IS="LONG_LONG" - VFS_SIZE_PRINTF="Lu" - VFS_OFFSET_PRINTF="Ld" + VFS_SIZE_PRINTF="qu" + VFS_OFFSET_PRINTF="qd" ;; esac diff -Naurp gnome-vfs-1.0.5/libgnomevfs/Makefile.in gnome-vfs-1.0.5-cygwin/libgnomevfs/Makefile.in --- gnome-vfs-1.0.5/libgnomevfs/Makefile.in Fri Mar 15 20:51:17 2002 +++ gnome-vfs-1.0.5-cygwin/libgnomevfs/Makefile.in Wed May 8 10:04:50 2002 @@ -65,7 +65,7 @@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ -CFLAGS = @CFLAGS@ +CFLAGS = @CFLAGS@ $(DLL_CFLAGS) CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ DATADIRNAME = @DATADIRNAME@ @@ -294,6 +294,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 @@ -301,6 +304,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: @@ -347,8 +352,10 @@ distclean-libtool: maintainer-clean-libtool: +libgnomevfs.la: DLL_CFLAGS = -DGNOME_VFS_BUILD_DLL libgnomevfs.la: $(libgnomevfs_la_OBJECTS) $(libgnomevfs_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libgnomevfs_la_LDFLAGS) $(libgnomevfs_la_OBJECTS) $(libgnomevfs_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ $$(gnome-config --libs oaf) $$(gconf-config --libs gconf-gtk) -liconv -lextras -lintl install-libgnomevfsincludeHEADERS: $(libgnomevfsinclude_HEADERS) @$(NORMAL_INSTALL) diff -Naurp gnome-vfs-1.0.5/libgnomevfs/gnome-vfs-backend.c gnome-vfs-1.0.5-cygwin/libgnomevfs/gnome-vfs-backend.c --- gnome-vfs-1.0.5/libgnomevfs/gnome-vfs-backend.c Sun Nov 25 00:48:21 2001 +++ gnome-vfs-1.0.5-cygwin/libgnomevfs/gnome-vfs-backend.c Wed May 8 10:04:50 2002 @@ -69,7 +69,11 @@ gnome_vfs_backend_loadinit (gpointer app backend_lower = g_strdup (backend); g_strdown (backend_lower); +#ifndef __CYGWIN__ short_name = g_strdup_printf ("gnomevfs-%s", backend); +#else + short_name = g_strdup_printf ("cyggnomevfs-%s.dll", backend); +#endif backend_filename = g_module_build_path (NULL, short_name); gmod = g_module_open (backend_filename, G_MODULE_BIND_LAZY); diff -Naurp gnome-vfs-1.0.5/libgnomevfs/gnome-vfs-init.h gnome-vfs-1.0.5-cygwin/libgnomevfs/gnome-vfs-init.h --- gnome-vfs-1.0.5/libgnomevfs/gnome-vfs-init.h Mon Jul 16 19:21:06 2001 +++ gnome-vfs-1.0.5-cygwin/libgnomevfs/gnome-vfs-init.h Wed May 8 10:04:50 2002 @@ -30,7 +30,19 @@ #include #endif +/* CYGWIN auto-import fix for multiword data exports */ +/* Note: auto-export is assumed (no __declspec(dllexport)) */ +#undef GNOME_VFS_IMPORT +#if (defined(_WIN32) || defined(__CYGWIN__)) && !(defined(GNOME_VFS_BUILD_DLL) || defined(GNOME_VFS_STATIC)) +#define GNOME_VFS_IMPORT __declspec(dllimport) +#else +#define GNOME_VFS_IMPORT +#endif + + + gboolean gnome_vfs_init (void); + gboolean gnome_vfs_initialized (void); void gnome_vfs_shutdown (void); @@ -43,7 +55,7 @@ void gnome_vfs_postinit (gpointer gpointer modinfo); #ifdef POPT_AUTOHELP -extern struct poptOption gnome_vfs_options[]; +extern GNOME_VFS_IMPORT struct poptOption gnome_vfs_options[]; #endif #endif diff -Naurp gnome-vfs-1.0.5/libgnomevfs/gnome-vfs-method.c gnome-vfs-1.0.5-cygwin/libgnomevfs/gnome-vfs-method.c --- gnome-vfs-1.0.5/libgnomevfs/gnome-vfs-method.c Tue Sep 4 23:24:22 2001 +++ gnome-vfs-1.0.5-cygwin/libgnomevfs/gnome-vfs-method.c Wed May 8 10:04:50 2002 @@ -261,10 +261,17 @@ load_module_in_path_list (const gchar *b for (p = module_path_list; p != NULL; p = p->next) { const gchar *path; gchar *name; +#ifdef __CYGWIN__ + gchar* mod_name = g_strdup_printf ("cyg%s.dll", base_name); +#endif path = p->data; +#ifndef __CYGWIN__ name = g_module_build_path (path, base_name); - +#else + name = g_module_build_path (path, mod_name); + g_free(mod_name); +#endif load_module (name, method_name, args, method, transform); g_free (name); diff -Naurp gnome-vfs-1.0.5/libgnomevfs/gnome-vfs-uri.c gnome-vfs-1.0.5-cygwin/libgnomevfs/gnome-vfs-uri.c --- gnome-vfs-1.0.5/libgnomevfs/gnome-vfs-uri.c Tue Sep 11 08:19:30 2001 +++ gnome-vfs-1.0.5-cygwin/libgnomevfs/gnome-vfs-uri.c Wed May 8 10:04:50 2002 @@ -89,7 +89,7 @@ typedef struct { char bv[32]; } UriStrspnSet; -UriStrspnSet uri_strspn_sets[] = { +static UriStrspnSet uri_strspn_sets[] = { {":@" GNOME_VFS_URI_PATH_STR, FALSE, ""}, {"@" GNOME_VFS_URI_PATH_STR, FALSE, ""}, {":" GNOME_VFS_URI_PATH_STR, FALSE, ""} diff -Naurp gnome-vfs-1.0.5/libgnomevfs-pthread/Makefile.in gnome-vfs-1.0.5-cygwin/libgnomevfs-pthread/Makefile.in --- gnome-vfs-1.0.5/libgnomevfs-pthread/Makefile.in Fri Mar 15 20:51:20 2002 +++ gnome-vfs-1.0.5-cygwin/libgnomevfs-pthread/Makefile.in Wed May 8 10:04:50 2002 @@ -65,7 +65,7 @@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ -CFLAGS = @CFLAGS@ +CFLAGS = @CFLAGS@ $(DLL_CFLAGS) CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ DATADIRNAME = @DATADIRNAME@ @@ -256,6 +256,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 @@ -263,6 +266,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: @@ -309,8 +314,10 @@ distclean-libtool: maintainer-clean-libtool: +libgnomevfs-pthread.la: DLL_CFLAGS = -DGNOME_VFS_PTHREAD_BUILD_DLL libgnomevfs-pthread.la: $(libgnomevfs_pthread_la_OBJECTS) $(libgnomevfs_pthread_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libgnomevfs_pthread_la_LDFLAGS) $(libgnomevfs_pthread_la_OBJECTS) $(libgnomevfs_pthread_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ ../../libgnomevfs/.libs/libgnomevfs.dll.a $$(gnome-config --libs oaf) $$(gconf-config --libs gconf-gtk) -lgthread -lextras -lintl tags: TAGS diff -Naurp gnome-vfs-1.0.5/libgnomevfs-pthread/gnome-vfs-job.h gnome-vfs-1.0.5-cygwin/libgnomevfs-pthread/gnome-vfs-job.h --- gnome-vfs-1.0.5/libgnomevfs-pthread/gnome-vfs-job.h Fri Mar 15 20:45:46 2002 +++ gnome-vfs-1.0.5-cygwin/libgnomevfs-pthread/gnome-vfs-job.h Wed May 8 10:04:50 2002 @@ -38,7 +38,16 @@ typedef struct GnomeVFSJob GnomeVFSJob; #include -extern GStaticMutex debug_mutex; +/* CYGWIN auto-import fix for multiword data exports */ +/* Note: auto-export is assumed (no __declspec(dllexport)) */ +#undef GNOME_VFS_PTHREAD_IMPORT +#if (defined(_WIN32) || defined(__CYGWIN__)) && !(defined(GNOME_VFS_PTHREAD_BUILD_DLL) || defined(GNOME_VFS_PTHREAD_STATIC)) +#define GNOME_VFS_PTHREAD_IMPORT __declspec(dllimport) +#else +#define GNOME_VFS_PTHREAD_IMPORT +#endif + +extern GNOME_VFS_PTHREAD_IMPORT GStaticMutex debug_mutex; #define JOB_DEBUG_PRINT(x) \ G_STMT_START{ \ diff -Naurp gnome-vfs-1.0.5/ltmain.sh gnome-vfs-1.0.5-cygwin/ltmain.sh --- gnome-vfs-1.0.5/ltmain.sh Fri Mar 15 06:57:11 2002 +++ gnome-vfs-1.0.5-cygwin/ltmain.sh Wed May 8 10:04:50 2002 @@ -3161,8 +3161,8 @@ EOF case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; + *":$bindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$bindir";; esac ;; esac diff -Naurp gnome-vfs-1.0.5/mkdll.sh gnome-vfs-1.0.5-cygwin/mkdll.sh --- gnome-vfs-1.0.5/mkdll.sh Thu Jan 1 00:00:00 1970 +++ gnome-vfs-1.0.5-cygwin/mkdll.sh Wed May 8 10:04:50 2002 @@ -0,0 +1,50 @@ +#!/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 + +archive=$1 +module=$(echo $(basename $archive) | sed -e 's,^lib\(.*\).la$,\1,') + +shift +dependency_libs="$@" + +test -n "$CC" || CC=gcc + +# 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='\'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 +# (/usr/local/lib is hard-coded here - edit it if necessary) +libdir=/usr/local/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,--enable-auto-import \ +-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,--enable-auto-import \ +-Wl,--whole-archive $old_lib -Wl,--no-whole-archive ${dependency_libs} + diff -Naurp gnome-vfs-1.0.5/modules/Makefile.in gnome-vfs-1.0.5-cygwin/modules/Makefile.in --- gnome-vfs-1.0.5/modules/Makefile.in Fri Mar 15 20:51:22 2002 +++ gnome-vfs-1.0.5-cygwin/modules/Makefile.in Wed May 8 10:04:50 2002 @@ -65,7 +65,7 @@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ -CFLAGS = @CFLAGS@ +CFLAGS = @CFLAGS@ $(DLL_CLAGS) CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ DATADIRNAME = @DATADIRNAME@ @@ -377,6 +377,9 @@ install-modulesLTLIBRARIES: $(modules_LT if test -f $$p; then \ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(modulesdir)/$$p"; \ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(modulesdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + echo "install -D --mode=755 .libs/$$dll $(DESTDIR)$(modulesdir)/$$dll"; \ + install -D --mode=755 .libs/$$dll $(DESTDIR)$(modulesdir)/$$dll; \ else :; fi; \ done @@ -384,6 +387,8 @@ uninstall-modulesLTLIBRARIES: @$(NORMAL_UNINSTALL) list='$(modules_LTLIBRARIES)'; for p in $$list; do \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(modulesdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + rm -f $(DESTDIR)$(modulesdir)/$$dll; \ done .c.o: @@ -432,39 +437,51 @@ maintainer-clean-libtool: libcdda.la: $(libcdda_la_OBJECTS) $(libcdda_la_DEPENDENCIES) $(LINK) -rpath $(modulesdir) $(libcdda_la_LDFLAGS) $(libcdda_la_OBJECTS) $(libcdda_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ libextfs.la: $(libextfs_la_OBJECTS) $(libextfs_la_DEPENDENCIES) $(LINK) -rpath $(modulesdir) $(libextfs_la_LDFLAGS) $(libextfs_la_OBJECTS) $(libextfs_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ ../../libgnomevfs/.libs/libgnomevfs.dll.a $$(gnome-config --libs oaf) $$(gconf-config --libs gconf-gtk) -lgthread -lextras -lintl libfile.la: $(libfile_la_OBJECTS) $(libfile_la_DEPENDENCIES) $(LINK) -rpath $(modulesdir) $(libfile_la_LDFLAGS) $(libfile_la_OBJECTS) $(libfile_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ ../../libgnomevfs/.libs/libgnomevfs.dll.a $$(gnome-config --libs glib) -lintl libvfs-test.la: $(libvfs_test_la_OBJECTS) $(libvfs_test_la_DEPENDENCIES) $(LINK) -rpath $(modulesdir) $(libvfs_test_la_LDFLAGS) $(libvfs_test_la_OBJECTS) $(libvfs_test_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ ../../libgnomevfs/.libs/libgnomevfs.dll.a $$(gnome-config --libs xml glib) -lintl libhttp.la: $(libhttp_la_OBJECTS) $(libhttp_la_DEPENDENCIES) $(LINK) -rpath $(modulesdir) $(libhttp_la_LDFLAGS) $(libhttp_la_OBJECTS) $(libhttp_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ ../../libgnomevfs-pthread/.libs/libgnomevfs-pthread.dll.a ../../libgnomevfs/.libs/libgnomevfs.dll.a $$(gconf-config --libs gconf-gtk) $$(gnome-config --libs xml glib) -lintl libbzip2.la: $(libbzip2_la_OBJECTS) $(libbzip2_la_DEPENDENCIES) $(LINK) -rpath $(modulesdir) $(libbzip2_la_LDFLAGS) $(libbzip2_la_OBJECTS) $(libbzip2_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ ../../libgnomevfs/.libs/libgnomevfs.dll.a $$(gconf-config --libs gconf-gtk) -lbz2 -lintl libgzip.la: $(libgzip_la_OBJECTS) $(libgzip_la_DEPENDENCIES) $(LINK) -rpath $(modulesdir) $(libgzip_la_LDFLAGS) $(libgzip_la_OBJECTS) $(libgzip_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ ../../libgnomevfs/.libs/libgnomevfs.dll.a $$(gconf-config --libs gconf-gtk) -lz -lintl libftp.la: $(libftp_la_OBJECTS) $(libftp_la_DEPENDENCIES) $(LINK) -rpath $(modulesdir) $(libftp_la_LDFLAGS) $(libftp_la_OBJECTS) $(libftp_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ ../../libgnomevfs/.libs/libgnomevfs.dll.a $$(gconf-config --libs gconf-gtk) -lintl libnntp.la: $(libnntp_la_OBJECTS) $(libnntp_la_DEPENDENCIES) $(LINK) -rpath $(modulesdir) $(libnntp_la_LDFLAGS) $(libnntp_la_OBJECTS) $(libnntp_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ ../../libgnomevfs/.libs/libgnomevfs.dll.a $$(gconf-config --libs gconf-gtk) -lintl libvfs-pipe.la: $(libvfs_pipe_la_OBJECTS) $(libvfs_pipe_la_DEPENDENCIES) $(LINK) -rpath $(modulesdir) $(libvfs_pipe_la_LDFLAGS) $(libvfs_pipe_la_OBJECTS) $(libvfs_pipe_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ ../../libgnomevfs/.libs/libgnomevfs.dll.a $$(gconf-config --libs gconf-gtk) -lintl libvfs-translate.la: $(libvfs_translate_la_OBJECTS) $(libvfs_translate_la_DEPENDENCIES) $(LINK) -rpath $(modulesdir) $(libvfs_translate_la_LDFLAGS) $(libvfs_translate_la_OBJECTS) $(libvfs_translate_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ ../../libgnomevfs/.libs/libgnomevfs.dll.a $$(gconf-config --libs gconf-gtk) -lintl libdesktop.la: $(libdesktop_la_OBJECTS) $(libdesktop_la_DEPENDENCIES) $(LINK) -rpath $(modulesdir) $(libdesktop_la_LDFLAGS) $(libdesktop_la_OBJECTS) $(libdesktop_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ ../../libgnomevfs/.libs/libgnomevfs.dll.a $$(gnome-config --libs gnome) $$(gconf-config --libs gconf-gtk) -lintl install-modulesconfDATA: $(modulesconf_DATA) @$(NORMAL_INSTALL) diff -Naurp gnome-vfs-1.0.5/modules/default-modules.conf gnome-vfs-1.0.5-cygwin/modules/default-modules.conf --- gnome-vfs-1.0.5/modules/default-modules.conf Fri Mar 15 03:33:01 2002 +++ gnome-vfs-1.0.5-cygwin/modules/default-modules.conf Wed May 8 10:02:20 2002 @@ -34,9 +34,9 @@ ssh: ssh a ar arj cpio deb hp48 lha mailfs patchfs rar rpm rpms trpm zip zoo: extfs # and the desktop module -preferences: libdesktop.so -system-settings: libdesktop.so -server-settings: libdesktop.so -favorites: libdesktop.so -start-here: libdesktop.so -programs: libdesktop.so +preferences: cygdesktop.dll +system-settings: cygdesktop.dll +server-settings: cygdesktop.dll +favorites: cygdesktop.dll +start-here: cygdesktop.dll +programs: cygdesktop.dll diff -Naurp gnome-vfs-1.0.5/modules/file-method.c gnome-vfs-1.0.5-cygwin/modules/file-method.c --- gnome-vfs-1.0.5/modules/file-method.c Fri Mar 15 03:33:01 2002 +++ gnome-vfs-1.0.5-cygwin/modules/file-method.c Wed May 8 10:04:50 2002 @@ -478,7 +478,9 @@ typedef struct { DIR *dir; GnomeVFSFileInfoOptions options; +#ifndef __CYGWIN__ struct dirent *current_entry; +#endif gchar *name_buffer; gchar *name_ptr; @@ -501,8 +503,10 @@ directory_handle_new (GnomeVFSURI *uri, result->uri = gnome_vfs_uri_ref (uri); result->dir = dir; +#ifndef __CYGWIN__ /* Reserve extra space for readdir_r, see man page */ result->current_entry = g_malloc (sizeof (struct dirent) + GET_PATH_MAX() + 1); +#endif full_name = get_path_from_uri (uri); g_assert (full_name != NULL); /* already done by caller */ @@ -529,7 +533,9 @@ directory_handle_destroy (DirectoryHandl { gnome_vfs_uri_unref (directory_handle->uri); g_free (directory_handle->name_buffer); +#ifndef __CYGWIN__ g_free (directory_handle->current_entry); +#endif g_free (directory_handle); } @@ -767,13 +773,19 @@ read_directory (DirectoryHandle *handle, filter_needs = GNOME_VFS_DIRECTORY_FILTER_NEEDS_NOTHING; } +#ifndef __CYGWIN__ if (readdir_r (handle->dir, handle->current_entry, &result) != 0) { return gnome_vfs_result_from_errno (); } - if (result == NULL) { return GNOME_VFS_ERROR_EOF; } +#else + errno = 0; + if ((result = readdir(handle->dir)) == NULL) { + return (errno == 0 ? GNOME_VFS_ERROR_EOF : gnome_vfs_result_from_errno ()); + } +#endif info->name = g_strdup (result->d_name); @@ -1097,12 +1109,21 @@ find_trash_in_one_hierarchy_level (const return NULL; } +#ifndef __CYGWIN__ item_buffer = g_malloc (sizeof (struct dirent) + GET_PATH_MAX() + 1); +#endif + for (;;) { +#ifndef __CYGWIN__ if (readdir_r (directory, item_buffer, &item) != 0 || item == NULL) { break; } +#else + if ((item = readdir(directory)) == NULL) { + break; + } +#endif if (gnome_vfs_context_check_cancellation (context)) break; @@ -1128,7 +1149,9 @@ find_trash_in_one_hierarchy_level (const closedir (directory); +#ifndef __CYGWIN__ g_free (item_buffer); +#endif return NULL; } diff -Naurp gnome-vfs-1.0.5/test/Makefile.in gnome-vfs-1.0.5-cygwin/test/Makefile.in --- gnome-vfs-1.0.5/test/Makefile.in Fri Mar 15 20:51:30 2002 +++ gnome-vfs-1.0.5-cygwin/test/Makefile.in Wed May 8 10:04:50 2002 @@ -73,7 +73,7 @@ DB2HTML = @DB2HTML@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ ENABLE_PROFILER = @ENABLE_PROFILER@ -EXEEXT = @EXEEXT@ +#EXEEXT = @EXEEXT@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_CONFIG = @GCONF_CONFIG@ GCONF_LIBS = @GCONF_LIBS@ @@ -202,10 +202,10 @@ test_files = test.input test.cmds te @HAVE_LIBEFS_FALSE@auto_tests = # Set up the environment so the tests can find the back end and modules -TESTS_ENVIRONMENT = LD_LIBRARY_PATH=$(top_builddir)/libgnomevfs-pthread/.libs/ GNOME_VFS_MODULE_PATH=$(top_builddir)/modules/.libs GNOME_VFS_MODULE_CONFIG_PATH=$(top_srcdir)/modules +TESTS_ENVIRONMENT = LD_LIBRARY_PATH=$(top_builddir)/libgnomevfs-pthread/.libs GNOME_VFS_MODULE_PATH=$(top_builddir)/modules/.libs GNOME_VFS_MODULE_CONFIG_PATH=$(top_srcdir)/modules PATH="$(top_builddir)/libgnomevfs-pthread/.libs:$(top_builddir)/libgnomevfs/.libs:$(top_builddir)/modules/.libs:$$PATH" TESTS = test-async-cancel test-escape test-uri $(auto_tests) -libraries = $(top_builddir)/libgnomevfs/libgnomevfs.la $(VFS_GNOMEGNORBA_LIBS) $(GCONF_LIBS) $(LIBEFS_LIBS) +libraries = $(top_builddir)/libgnomevfs/libgnomevfs.la $(VFS_GNOMEGNORBA_LIBS) $(GCONF_LIBS) $(LIBEFS_LIBS) -lextras test_async_SOURCES = test-async.c diff -Naurp gnome-vfs-1.0.5/test/test-async-cancel.c gnome-vfs-1.0.5-cygwin/test/test-async-cancel.c --- gnome-vfs-1.0.5/test/test-async-cancel.c Fri Mar 15 20:45:47 2002 +++ gnome-vfs-1.0.5-cygwin/test/test-async-cancel.c Wed May 8 10:04:50 2002 @@ -73,7 +73,11 @@ get_free_file_descriptor_count (void) int fd; list = NULL; +#ifndef __CYGWIN__ for (count = 0; ; count++) { +#else + for (count = 0; count < OPEN_MAX; count++) { +#endif fd = open ("/dev/null", O_RDONLY); if (fd == -1) { break; diff -Naurp gnome-vfs-1.0.5/test/test-module-selftest.c gnome-vfs-1.0.5-cygwin/test/test-module-selftest.c --- gnome-vfs-1.0.5/test/test-module-selftest.c Mon Jul 16 19:22:33 2001 +++ gnome-vfs-1.0.5-cygwin/test/test-module-selftest.c Wed May 8 10:04:50 2002 @@ -41,7 +41,7 @@ /* List of modules that have self-test code */ static const char *self_test_modules[] = { - "http", + "cyghttp.dll", NULL }; @@ -82,14 +82,16 @@ main (int argc, char **argv) TestFunc test_func; gboolean result; gboolean running_result; - +#ifdef __CYGWIN__ + char* cyg_module_path; +#endif make_asserts_break ("GLib"); make_asserts_break ("GnomeVFS"); /* Initialize the libraries we use. */ g_thread_init (NULL); gnome_vfs_init (); - + running_result = TRUE; for (i=0 ; self_test_modules[i] != NULL ; i++) { char *module_path; @@ -97,7 +99,15 @@ main (int argc, char **argv) GnomeVFSURI *uri; printf ("Module self-test: '%s'\n", self_test_modules[i]); +#ifdef __CYGWIN__ + cyg_module_path = getenv("MODULES_PATH"); + if (!cyg_module_path) { + cyg_module_path = MODULES_PATH; + } + module_path = g_module_build_path (cyg_module_path, self_test_modules[i]); +#else module_path = g_module_build_path (MODULES_PATH, self_test_modules[i]); +#endif module = g_module_open (module_path, G_MODULE_BIND_LAZY); g_free (module_path); module_path = NULL;