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

ruby-changes:33709

From: ngoto <ko1@a...>
Date: Sat, 3 May 2014 00:24:12 +0900 (JST)
Subject: [ruby-changes:33709] ngoto:r45790 (trunk): * file.c (HAVE_STRUCT_STATVFS_F_BASETYPE): File::Statfs#fstypename

ngoto	2014-05-03 00:24:04 +0900 (Sat, 03 May 2014)

  New Revision: 45790

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

  Log:
    * file.c (HAVE_STRUCT_STATVFS_F_BASETYPE): File::Statfs#fstypename
      is supported on AIX, HP-UX, and Solaris, by using the value of
      struct statvfs.f_basetype.
    * configure.in (HAVE_STRUCT_STATVFS_F_BASETYPE): check struct
      statvfs.f_basetype which is available on AIX, HP-UX, and Solaris.

  Modified files:
    trunk/ChangeLog
    trunk/configure.in
    trunk/file.c
Index: configure.in
===================================================================
--- configure.in	(revision 45789)
+++ configure.in	(revision 45790)
@@ -1746,9 +1746,12 @@ AC_CHECK_MEMBERS([struct statfs.f_type, https://github.com/ruby/ruby/blob/trunk/configure.in#L1746
 @%:@ include <sys/vfs.h>
 @%:@endif])
 ])
-# NetBSD
+# AIX, HP-UX, NetBSD, Solaris
 AC_CHECK_TYPES([struct statvfs], [], [], [@%:@ include <sys/statvfs.h>])
+# NetBSD
 AC_CHECK_MEMBERS([struct statvfs.f_fstypename], [], [], [@%:@ include <sys/statvfs.h>])
+# AIX, HP-UX, Solaris
+AC_CHECK_MEMBERS([struct statvfs.f_basetype], [], [], [@%:@ include <sys/statvfs.h>])
 
 AC_CHECK_TYPES([clockid_t], [], [], [@%:@ifdef HAVE_TIME_H
 @%:@ include <time.h>
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 45789)
+++ ChangeLog	(revision 45790)
@@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat May  3 00:06:30 2014  Naohisa Goto  <ngotogenome@g...>
+
+	* file.c (HAVE_STRUCT_STATVFS_F_BASETYPE): File::Statfs#fstypename
+	  is supported on AIX, HP-UX, and Solaris, by using the value of
+	  struct statvfs.f_basetype.
+
+	* configure.in (HAVE_STRUCT_STATVFS_F_BASETYPE): check struct
+	  statvfs.f_basetype which is available on AIX, HP-UX, and Solaris.
+
 Fri May  2 21:04:02 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* parse.y (next_id): no reason to set ID_STATIC_SYM here, as ID
Index: file.c
===================================================================
--- file.c	(revision 45789)
+++ file.c	(revision 45790)
@@ -87,8 +87,11 @@ typedef struct statvfs statfs_t; https://github.com/ruby/ruby/blob/trunk/file.c#L87
 # ifdef HAVE_FSTATVFS
 #  define FSTATFS(f, s) fstatvfs((f), (s))
 # endif
-# ifdef HAVE_STRUCT_STATVFS_F_FSTYPENAME
+# if defined(HAVE_STRUCT_STATVFS_F_FSTYPENAME) /* NetBSD */
 #  define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1
+# elif defined(HAVE_STRUCT_STATVFS_F_BASETYPE) /* AIX, HP-UX, Solaris */
+#  define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1
+#  define f_fstypename f_basetype
 # endif
 # ifdef HAVE_STRUCT_STATVFS_F_TYPE
 #  define HAVE_STRUCT_STATFS_T_F_TYPE 1

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

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