aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--file.c11
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index eb1fbe90fd..48d0350f40 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu May 1 22:19:34 2014 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * file.c: Change AND condition to nested condition.
+
Thu May 1 00:36:26 2014 Naohisa Goto <ngotogenome@gmail.com>
* file.c (FSTATFS): check availability of struct statfs and
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)