diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-28 12:46:23 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-28 12:46:23 +0000 |
commit | 19fac4432fce8aa6b8f37bf1991912f94c08bcce (patch) | |
tree | a7a02ff5357614e11821c7aa2136ece0dad82bdb | |
parent | 559d689ca6518bac42d241a2420a51439901d731 (diff) | |
download | ruby-19fac4432fce8aa6b8f37bf1991912f94c08bcce.tar.gz |
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | file.c | 4 |
3 files changed, 12 insertions, 3 deletions
@@ -1,3 +1,12 @@ +Mon Apr 28 21:40:27 2014 NARUSE, Yui <naruse@ruby-lang.org> + + * 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@ruby-lang.org> * configure.in: check struct statvfs and struct statvfs.f_fstypename. diff --git a/configure.in b/configure.in index ad226151b0..29ae4f6c37 100644 --- a/configure.in +++ b/configure.in @@ -1736,7 +1736,7 @@ AC_CHECK_TYPES([struct statfs], [], [], [@%:@ifdef HAVE_SYS_PARAM_H @%:@ 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 @@ -5439,7 +5439,7 @@ rb_statfs_init_copy(VALUE copy, VALUE orig) 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) { 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) |