52
52
53
53
#include <config.h>
54
54
55
- #if ((defined STAT_STATVFS || defined STAT_STATVFS64 ) \
56
- && (defined HAVE_STRUCT_STATVFS_F_BASETYPE || defined HAVE_STRUCT_STATVFS_F_FSTYPENAME \
57
- || (!defined HAVE_STRUCT_STATFS_F_FSTYPENAME )))
58
- #define USE_STATVFS 1
59
- #else
60
- #define USE_STATVFS 0
61
- #endif
62
-
63
55
#include <errno.h>
64
56
#include <ctype.h>
65
57
#include <limits.h> // INT_MAX
68
60
#include <sys/types.h>
69
61
#include <sys/stat.h>
70
62
71
- #if USE_STATVFS
63
+ #if defined( USE_STATVFS )
72
64
#include <sys/statvfs.h>
73
65
#elif defined HAVE_SYS_VFS_H
74
66
#include <sys/vfs.h>
83
75
#include <fs_info.h>
84
76
#endif
85
77
86
- #if USE_STATVFS
78
+ #if defined( USE_STATVFS )
87
79
#if !defined STAT_STATVFS && defined STAT_STATVFS64
88
80
#define STRUCT_STATVFS struct statvfs64
89
81
#define STATFS statvfs64
@@ -261,7 +253,7 @@ static struct
261
253
preceding entries in /proc/mounts; that makes df hang if even one
262
254
of the corresponding file systems is hard-mounted but not available. */
263
255
264
- #if USE_STATVFS && !(!defined STAT_STATVFS && defined STAT_STATVFS64 )
256
+ #if defined( USE_STATVFS ) && !(!defined STAT_STATVFS && defined STAT_STATVFS64 )
265
257
static int
266
258
statvfs_works (void )
267
259
{
@@ -285,16 +277,16 @@ filegui__check_attrs_on_fs (const char *fs_path)
285
277
{
286
278
STRUCT_STATVFS stfs ;
287
279
288
- #if USE_STATVFS && defined(STAT_STATVFS )
280
+ #if defined( USE_STATVFS ) && defined(STAT_STATVFS )
289
281
if (statvfs_works () && statvfs (fs_path , & stfs ) != 0 )
290
282
return TRUE;
291
283
#else
292
284
if (STATFS (fs_path , & stfs ) != 0 )
293
285
return TRUE;
294
286
#endif
295
287
296
- #if (USE_STATVFS && defined(HAVE_STRUCT_STATVFS_F_TYPE )) \
297
- || (!USE_STATVFS && defined(HAVE_STRUCT_STATFS_F_TYPE ))
288
+ #if (defined( USE_STATVFS ) && defined(HAVE_STRUCT_STATVFS_F_TYPE )) \
289
+ || (!defined( USE_STATVFS ) && defined(HAVE_STRUCT_STATFS_F_TYPE ))
298
290
switch ((filegui_nonattrs_fs_t ) stfs .f_type )
299
291
{
300
292
case MSDOS_SUPER_MAGIC :
0 commit comments