[前][次][番号順一覧][スレッド一覧]

ruby-changes:33653

From: naruse <ko1@a...>
Date: Mon, 28 Apr 2014 21:46:34 +0900 (JST)
Subject: [ruby-changes:33653] naruse:r45734 (trunk): * configure.in (HAVE_STRUCT_STATFS_F_TYPE): check struct statfs.f_type

naruse	2014-04-28 21:46:23 +0900 (Mon, 28 Apr 2014)

  New Revision: 45734

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45734

  Log:
    * configure.in (HAVE_STRUCT_STATFS_F_TYPE): check struct statfs.f_type
      to support OpenBSD.
    
    * file.c (statfs_type): use above macro to switch.
    
    * file.c (statfs_inspect): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/configure.in
    trunk/file.c
Index: configure.in
===================================================================
--- configure.in	(revision 45733)
+++ configure.in	(revision 45734)
@@ -1736,7 +1736,7 @@ AC_CHECK_TYPES([struct statfs], [], [], https://github.com/ruby/ruby/blob/trunk/configure.in#L1736
 @%:@ include <sys/vfs.h>
 @%:@endif])
 AS_IF([test "$ac_cv_type_struct_statfs" = yes], [
-AC_CHECK_MEMBERS([struct statfs.f_fstypename], [], [], [@%:@ifdef HAVE_SYS_PARAM_H
+AC_CHECK_MEMBERS([struct statfs.f_type, struct statfs.f_fstypename], [], [], [@%:@ifdef HAVE_SYS_PARAM_H
 @%:@ include <sys/param.h>
 @%:@endif
 @%:@ifdef HAVE_SYS_MOUNT_H
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 45733)
+++ ChangeLog	(revision 45734)
@@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Apr 28 21:40:27 2014  NARUSE, Yui  <naruse@r...>
+
+	* configure.in (HAVE_STRUCT_STATFS_F_TYPE): check struct statfs.f_type
+	  to support OpenBSD.
+
+	* file.c (statfs_type): use above macro to switch.
+
+	* file.c (statfs_inspect): ditto.
+
 Mon Apr 28 18:06:08 2014  NARUSE, Yui  <naruse@r...>
 
 	* configure.in: check struct statvfs and struct statvfs.f_fstypename.
Index: file.c
===================================================================
--- file.c	(revision 45733)
+++ file.c	(revision 45734)
@@ -5439,7 +5439,7 @@ rb_statfs_init_copy(VALUE copy, VALUE or https://github.com/ruby/ruby/blob/trunk/file.c#L5439
     return copy;
 }
 
-#ifdef HAVE_STRUCT_STATFS
+#ifdef HAVE_STRUCT_STATFS_F_TYPE
 /*
  *  call-seq:
  *     st.type    -> fixnum
@@ -5587,7 +5587,7 @@ statfs_inspect(VALUE self) https://github.com/ruby/ruby/blob/trunk/file.c#L5587
 {
     statfs_t *st = get_statfs(self);
     return rb_sprintf("#<%"PRIsVALUE" "
-#ifdef HAVE_STRUCT_STATFS
+#ifdef HAVE_STRUCT_STATFS_F_TYPE
 		      "type=%ld"
 #endif
 #if defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) || defined(HAVE_STRUCT_STATVFS_F_FSTYPENAME)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]