glib r6939 - in trunk: . gio



Author: simonz
Date: Tue May 27 07:51:13 2008
New Revision: 6939
URL: http://svn.gnome.org/viewvc/glib?rev=6939&view=rev

Log:
2008-05-27  simon.zheng  <simon zheng sun com>

	* configure.in: Fix #533369. Check whether memeber statvfs.f_basetype 
        available or not.
	* gio/glocalfile.c: (g_local_file_query_filesystem_info):
        Fix #533369. Make G_FILE_ATTRIBUTE_FILESYSTEM_TYPE work on Solaris.



Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/gio/ChangeLog
   trunk/gio/glocalfile.c

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Tue May 27 07:51:13 2008
@@ -837,6 +837,8 @@
 #ifdef HAVE_SYS_MOUNT_H
 #include <sys/mount.h>
 #endif])
+# struct statvfs.f_basetype is available on Solaris but not for Linux. 
+AC_CHECK_MEMBERS([struct statvfs.f_basetype],,, [#include <sys/statvfs.h>])
 
 # Checks for libcharset
 AM_LANGINFO_CODESET

Modified: trunk/gio/glocalfile.c
==============================================================================
--- trunk/gio/glocalfile.c	(original)
+++ trunk/gio/glocalfile.c	Tue May 27 07:51:13 2008
@@ -916,9 +916,9 @@
   gboolean no_size;
 #ifndef G_OS_WIN32
   guint64 block_size;
+  const char *fstype;
 #ifdef USE_STATFS
   struct statfs statfs_buffer;
-  const char *fstype;
 #elif defined(USE_STATVFS)
   struct statvfs statfs_buffer;
 #endif
@@ -1008,6 +1008,12 @@
 #else
   fstype = get_fs_type (statfs_buffer.f_type);
 #endif
+
+#elif defined(USE_STATVFS) && defined(HAVE_STRUCT_STATVFS_F_BASETYPE)
+  fstype = g_strdup(statfs_buffer.f_basetype); 
+#endif
+
+#ifndef G_OS_WIN32
   if (fstype &&
       g_file_attribute_matcher_matches (attribute_matcher,
 					G_FILE_ATTRIBUTE_FILESYSTEM_TYPE))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]