mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 01:54:24 +03:00
Use #ifdef for autoconf provided marcos (continue).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
57452f656b
commit
e3a3424c28
@ -43,22 +43,20 @@ AC_INCLUDES_DEFAULT
|
|||||||
"
|
"
|
||||||
statfs_includes="\
|
statfs_includes="\
|
||||||
AC_INCLUDES_DEFAULT
|
AC_INCLUDES_DEFAULT
|
||||||
#if HAVE_SYS_VFS_H
|
#ifdef HAVE_SYS_VFS_H
|
||||||
# include <sys/vfs.h>
|
# include <sys/vfs.h>
|
||||||
#elif HAVE_SYS_MOUNT_H && HAVE_SYS_PARAM_H
|
#elif defined HAVE_SYS_MOUNT_H && defined HAVE_SYS_PARAM_H
|
||||||
# include <sys/param.h>
|
# include <sys/param.h>
|
||||||
# include <sys/mount.h>
|
# include <sys/mount.h>
|
||||||
# if HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H
|
# if defined HAVE_NETINET_IN_H && defined HAVE_NFS_NFS_CLNT_H && defined HAVE_NFS_VFS_H
|
||||||
# include <netinet/in.h>
|
# include <netinet/in.h>
|
||||||
# include <nfs/nfs_clnt.h>
|
# include <nfs/nfs_clnt.h>
|
||||||
# include <nfs/vfs.h>
|
# include <nfs/vfs.h>
|
||||||
# endif
|
# endif
|
||||||
#elif HAVE_OS_H
|
#elif defined HAVE_OS_H
|
||||||
# include <fs_info.h>
|
# include <fs_info.h>
|
||||||
#endif
|
#endif
|
||||||
"
|
"
|
||||||
dnl Keep this long conditional in sync with the USE_STATVFS conditional
|
|
||||||
dnl in src/filemanager/filegui.c.
|
|
||||||
if case "$fu_cv_sys_stat_statvfs$fu_cv_sys_stat_statvfs64" in
|
if case "$fu_cv_sys_stat_statvfs$fu_cv_sys_stat_statvfs64" in
|
||||||
*yes*) ;; *) false;; esac &&
|
*yes*) ;; *) false;; esac &&
|
||||||
{ AC_CHECK_MEMBERS([struct statvfs.f_basetype],,, [$statvfs_includes])
|
{ AC_CHECK_MEMBERS([struct statvfs.f_basetype],,, [$statvfs_includes])
|
||||||
|
@ -52,7 +52,6 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
/* Keep this conditional in sync with the similar conditional in m4.include/mc-get-fs-info. */
|
|
||||||
#if ((defined STAT_STATVFS || defined STAT_STATVFS64) \
|
#if ((defined STAT_STATVFS || defined STAT_STATVFS64) \
|
||||||
&& (defined HAVE_STRUCT_STATVFS_F_BASETYPE || defined HAVE_STRUCT_STATVFS_F_FSTYPENAME \
|
&& (defined HAVE_STRUCT_STATVFS_F_BASETYPE || defined HAVE_STRUCT_STATVFS_F_FSTYPENAME \
|
||||||
|| (! defined HAVE_STRUCT_STATFS_F_FSTYPENAME)))
|
|| (! defined HAVE_STRUCT_STATFS_F_FSTYPENAME)))
|
||||||
@ -70,16 +69,16 @@
|
|||||||
|
|
||||||
#if USE_STATVFS
|
#if USE_STATVFS
|
||||||
#include <sys/statvfs.h>
|
#include <sys/statvfs.h>
|
||||||
#elif HAVE_SYS_VFS_H
|
#elif defined HAVE_SYS_VFS_H
|
||||||
#include <sys/vfs.h>
|
#include <sys/vfs.h>
|
||||||
#elif HAVE_SYS_MOUNT_H && HAVE_SYS_PARAM_H
|
#elif defined HAVE_SYS_MOUNT_H && defined HAVE_SYS_PARAM_H
|
||||||
/* NOTE: freebsd5.0 needs sys/param.h and sys/mount.h for statfs.
|
/* NOTE: freebsd5.0 needs sys/param.h and sys/mount.h for statfs.
|
||||||
It does have statvfs.h, but shouldn't use it, since it doesn't
|
It does have statvfs.h, but shouldn't use it, since it doesn't
|
||||||
HAVE_STRUCT_STATVFS_F_BASETYPE. So find a clean way to fix it. */
|
HAVE_STRUCT_STATVFS_F_BASETYPE. So find a clean way to fix it. */
|
||||||
/* NetBSD 1.5.2 needs these, for the declaration of struct statfs. */
|
/* NetBSD 1.5.2 needs these, for the declaration of struct statfs. */
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/mount.h>
|
#include <sys/mount.h>
|
||||||
#if HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H
|
#if defined HAVE_NFS_NFS_CLNT_H && defined HAVE_NFS_VFS_H
|
||||||
/* Ultrix 4.4 needs these for the declaration of struct statfs. */
|
/* Ultrix 4.4 needs these for the declaration of struct statfs. */
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <nfs/nfs_clnt.h>
|
#include <nfs/nfs_clnt.h>
|
||||||
@ -90,7 +89,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if USE_STATVFS
|
#if USE_STATVFS
|
||||||
#if ! STAT_STATVFS && STAT_STATVFS64
|
#if ! defined STAT_STATVFS && defined STAT_STATVFS64
|
||||||
#define STRUCT_STATVFS struct statvfs64
|
#define STRUCT_STATVFS struct statvfs64
|
||||||
#define STATFS statvfs64
|
#define STATFS statvfs64
|
||||||
#else
|
#else
|
||||||
@ -107,7 +106,7 @@
|
|||||||
#else
|
#else
|
||||||
#define STATFS statfs
|
#define STATFS statfs
|
||||||
#define STRUCT_STATVFS struct statfs
|
#define STRUCT_STATVFS struct statfs
|
||||||
#if HAVE_OS_H /* BeOS */
|
#ifdef HAVE_OS_H /* BeOS */
|
||||||
/* BeOS has a statvfs function, but it does not return sensible values
|
/* BeOS has a statvfs function, but it does not return sensible values
|
||||||
for f_files, f_ffree and f_favail, and lacks f_type, f_basetype and
|
for f_files, f_ffree and f_favail, and lacks f_type, f_basetype and
|
||||||
f_fstypename. Use 'struct fs_info' instead. */
|
f_fstypename. Use 'struct fs_info' instead. */
|
||||||
|
Loading…
Reference in New Issue
Block a user