summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-01 13:25:40 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-01 13:25:40 +0000
commit2957f88f8f8fb470ed760f9108ca0c521afd4550 (patch)
tree40528d64573deab374cce3efeb39fc8e1e62a0c4 /file.c
parentad528e85c6cd6dddb51b750b6fbf3e817468e600 (diff)
* file.c: Change AND condition to nested condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/file.c b/file.c
index 5ba3ba0a84..889c70a97e 100644
--- a/file.c
+++ b/file.c
@@ -72,6 +72,9 @@ int flock(int, int);
#ifdef HAVE_STRUCT_STATFS
typedef struct statfs statfs_t;
#define STATFS(f, s) statfs((f), (s))
+# ifdef HAVE_FSTATFS
+# define FSTATFS(f, s) fstatfs((f), (s))
+# endif
#ifdef HAVE_STRUCT_STATFS_F_FSTYPENAME
#define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1
#endif
@@ -81,6 +84,9 @@ typedef struct statfs statfs_t;
#elif defined(HAVE_STRUCT_STATVFS)
typedef struct statvfs statfs_t;
#define STATFS(f, s) statvfs((f), (s))
+# ifdef HAVE_FSTATVFS
+# define FSTATFS(f, s) fstatvfs((f), (s))
+# endif
#ifdef HAVE_STRUCT_STATVFS_F_FSTYPENAME
#define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1
#endif
@@ -92,11 +98,6 @@ typedef struct statvfs statfs_t;
#endif
#ifndef WITHOUT_STATFS
static VALUE rb_statfs_new(const statfs_t *st);
-#if defined(HAVE_FSTATFS) && defined(HAVE_STRUCT_STATFS)
-#define FSTATFS(f, s) fstatfs((f), (s))
-#elif defined(HAVE_FSTATVFS) && defined(HAVE_STRUCT_STATVFS)
-#define FSTATFS(f, s) fstatvfs((f), (s))
-#endif
#endif
#if defined(__native_client__) && defined(NACL_NEWLIB)