? dist.log
? gnome-vfs-2.5.1.tar.gz
? gnome-vfs-mime.c
? gnome25.diff
? head.diff
? intltool-modules
? portability.diff
? show_bug.cgi?id=132652
? showattachment.cgi?attach_id=23797
? showattachment.cgi?attach_id=23943
? showattachment.cgi?attach_id=24373
? showattachment.cgi?attach_id=24374
? showattachment.cgi?attach_id=24375
? showattachment.cgi?attach_id=24525
? showattachment.cgi?attach_id=24907
? volume.diff
? volume.h
? xdg.diff
? daemon/vfs-daemon
? doc/xml
? doc/tmpl/gnome-vfs-2.0-unused.sgml
? doc/tmpl/gnome-vfs.sgml
? gtk/Makefile
? gtk/Makefile.in
? libgnomevfs/gnome-vfs-enum-types.c
? libgnomevfs/gnome-vfs-enum-types.h
? libgnomevfs/mime.diff
? libgnomevfs/s-enum-types-c
? libgnomevfs/s-enum-types-h
? modules/leaks2.diff
Index: configure.in
===================================================================
RCS file: /cvs/gnome/gnome-vfs/configure.in,v
retrieving revision 1.288
diff -u -r1.288 configure.in
--- configure.in	9 Mar 2004 20:21:41 -0000	1.288
+++ configure.in	9 Mar 2004 20:28:34 -0000
@@ -103,7 +103,6 @@
 GNOME_COMPILE_WARNINGS
 VFS_CFLAGS="$warnCFLAGS $complCFLAGS"
 
-GNOME_PTHREAD_CHECK
 dnl semaphore functions are in librt.so on solaris
 AC_SEARCH_LIBS(sem_wait, rt)
 
@@ -208,7 +207,62 @@
 AC_SUBST(VFS_SIZE_PRINTF)
 AC_SUBST(VFS_OFFSET_PRINTF)
 
-AC_CHECK_HEADERS(sys/param.h sys/resource.h sys/vfs.h sys/mount.h sys/statvfs.h wctype.h)
+AC_CHECK_HEADERS(sys/param.h sys/resource.h sys/vfs.h sys/mount.h sys/statfs.h sys/statvfs.h wctype.h)
+
+dnl
+dnl file system type member in statfs struct
+dnl
+AC_CHECK_MEMBERS([struct statfs.f_type], ,[
+  AC_CHECK_MEMBERS([struct statfs.f_fstyp], , , [#ifdef HAVE_SYS_VFS_H
+#include <sys/vfs.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+#ifdef HAVE_SYS_STATFS_H
+#include <sys/statfs.h>
+#endif])], [#ifdef HAVE_SYS_VFS_H
+#include <sys/vfs.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+#ifdef HAVE_SYS_STATFS_H
+#include <sys/statfs.h>
+#endif])
+ 
+dnl
+dnl if statfs() takes 2 arguments or 4 (Solaris)
+dnl
+AC_MSG_CHECKING([number of arguments to statfs()])
+AC_TRY_COMPILE([#include <unistd.h>
+#ifdef HAVE_SYS_VFS_H
+#include <sys/vfs.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+#ifdef HAVE_SYS_STATFS_H
+#include <sys/statfs.h>
+#endif], [struct statfs st;
+statfs(NULL, &st);],[
+  AC_MSG_RESULT([2])
+  AC_DEFINE(STATFS_ARGS, 2, [Number of arguments to statfs()])],[
+  AC_TRY_COMPILE([#include <unistd.h>
+#ifdef HAVE_SYS_VFS_H
+#include <sys/vfs.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+#ifdef HAVE_SYS_STATFS_H
+#include <sys/statfs.h>
+#endif], [struct statfs st;
+statfs(NULL, &st, sizeof (st), 0);],[
+    AC_MSG_RESULT([4])
+    AC_DEFINE(STATFS_ARGS, 4, [Number of arguments to statfs()])],[
+    AC_MSG_RESULT(unknown)
+    AC_MSG_ERROR([unable to determine number of arguments to statfs()])])])
 
 AC_TYPE_MBSTATE_T
 
Index: libgnomevfs/gnome-vfs-utils.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-utils.c,v
retrieving revision 1.78
diff -u -r1.78 gnome-vfs-utils.c
--- libgnomevfs/gnome-vfs-utils.c	7 Mar 2004 21:08:20 -0000	1.78
+++ libgnomevfs/gnome-vfs-utils.c	9 Mar 2004 20:28:35 -0000
@@ -798,7 +798,12 @@
 #if HAVE_STATVFS
 	statfs_result = statvfs (unescaped_path, &statfs_buffer);
 #else
+#if STATFS_ARGS == 2
 	statfs_result = statfs (unescaped_path, &statfs_buffer);   
+#elif STATFS_ARGS == 4
+	statfs_result = statfs (unescaped_path, &statfs_buffer,
+				sizeof (statfs_buffer), 0);
+#endif
 #endif  
 
 	if (statfs_result != 0) {
@@ -806,9 +811,14 @@
 		return gnome_vfs_result_from_errno ();
 	}
 
+
+/* CF: I assume ncpfs is linux specific, if you are on a non-linux platform
+ * where ncpfs is available, please file a bug about it on bugzilla.gnome.org
+ * (2004-03-08)
+ */
+#if defined(__linux__)
 	/* ncpfs does not know the amount of available and free space */
 	if (statfs_buffer.f_bavail == 0 && statfs_buffer.f_bfree == 0) {
-#if defined(__linux__)
 		/* statvfs does not contain an f_type field, we try again
 		 * with statfs.
 		 */
@@ -822,14 +832,11 @@
 		
 		/* linux/ncp_fs.h: NCP_SUPER_MAGIC == 0x564c */
 		if (statfs_buffer2.f_type == 0x564c)
-#elif defined(__sun)
-		g_free (unescaped_path);
-		if (strcmp(statfs_buffer.f_basetype, "ncpfs") == 0)
-#endif
 		{
 			return GNOME_VFS_ERROR_NOT_SUPPORTED;
 		}
 	}
+#endif
 
 	block_size = statfs_buffer.f_bsize; 
 	free_blocks = statfs_buffer.f_bavail;
