mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 12:56:51 +03:00
9e1dd4594d
* acinclude.m4 (AC_GET_FS_INFO): Add a check to determine whether getmntinfo() takes struct statvfs instead of struct statfs as its first argument. Define MOUNTED_GETMNTINFO_STATVFS if it does. Add a check to determine whether struct statvfs has a field named f_fstypename. Use gl_FSTYPENAME tp determine whether struct statfs has a field named f_fstypename. * src/mountlist.c (HAVE_F_FSTYPENAME): Define when getmntinfo() is used and the struct which it fills has a field named f_fstypename. (read_filesystem_list) [MOUNTED_GETMNTINFO]: Use MOUNTED_GETMNTINFO_STATVFS to determine the type of the first argument to getmntinfo().
38 lines
962 B
Plaintext
38 lines
962 B
Plaintext
#serial 5
|
|
|
|
dnl From Jim Meyering.
|
|
dnl
|
|
dnl See if struct statfs has the f_fstypename member.
|
|
dnl If so, define HAVE_F_FSTYPENAME_IN_STATFS.
|
|
dnl
|
|
|
|
# Copyright (C) 1998, 1999, 2001, 2004 Free Software Foundation, Inc.
|
|
# This file is free software; the Free Software Foundation
|
|
# gives unlimited permission to copy and/or distribute it,
|
|
# with or without modifications, as long as this notice is preserved.
|
|
|
|
AC_DEFUN([gl_FSTYPENAME],
|
|
[
|
|
AC_CACHE_CHECK([for f_fstypename in struct statfs],
|
|
fu_cv_sys_f_fstypename_in_statfs,
|
|
[
|
|
AC_TRY_COMPILE(
|
|
[
|
|
#include <sys/param.h>
|
|
#include <sys/types.h>
|
|
#include <sys/mount.h>
|
|
],
|
|
[struct statfs s; int i = sizeof s.f_fstypename;],
|
|
fu_cv_sys_f_fstypename_in_statfs=yes,
|
|
fu_cv_sys_f_fstypename_in_statfs=no
|
|
)
|
|
]
|
|
)
|
|
|
|
if test $fu_cv_sys_f_fstypename_in_statfs = yes; then
|
|
AC_DEFINE(HAVE_F_FSTYPENAME_IN_STATFS, 1,
|
|
[Define if struct statfs has the f_fstypename member.])
|
|
fi
|
|
]
|
|
)
|