diff options
Diffstat (limited to 'gl/m4/fsusage.m4')
| -rw-r--r-- | gl/m4/fsusage.m4 | 45 |
1 files changed, 6 insertions, 39 deletions
diff --git a/gl/m4/fsusage.m4 b/gl/m4/fsusage.m4 index bb7b6e43..db6e0e3b 100644 --- a/gl/m4/fsusage.m4 +++ b/gl/m4/fsusage.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # fsusage.m4 | 1 | # fsusage.m4 |
| 2 | # serial 35 | 2 | # serial 37 |
| 3 | dnl Copyright (C) 1997-1998, 2000-2001, 2003-2025 Free Software Foundation, | 3 | dnl Copyright (C) 1997-1998, 2000-2001, 2003-2026 Free Software Foundation, |
| 4 | dnl Inc. | 4 | dnl Inc. |
| 5 | dnl This file is free software; the Free Software Foundation | 5 | dnl This file is free software; the Free Software Foundation |
| 6 | dnl gives unlimited permission to copy and/or distribute it, | 6 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -48,16 +48,12 @@ AC_DEFUN([gl_FILE_SYSTEM_USAGE], | |||
| 48 | # is what it gets when this test fails. | 48 | # is what it gets when this test fails. |
| 49 | if test $ac_fsusage_space = no; then | 49 | if test $ac_fsusage_space = no; then |
| 50 | # glibc/{Hurd,kFreeBSD}, FreeBSD >= 5.0, NetBSD >= 3.0, | 50 | # glibc/{Hurd,kFreeBSD}, FreeBSD >= 5.0, NetBSD >= 3.0, |
| 51 | # OpenBSD >= 4.4, AIX, HP-UX, IRIX, Solaris, Cygwin, Interix, BeOS. | 51 | # OpenBSD >= 4.4, AIX, HP-UX, Solaris, Cygwin, Interix, BeOS. |
| 52 | AC_CACHE_CHECK([for statvfs function (SVR4)], | 52 | AC_CACHE_CHECK([for statvfs function (SVR4)], |
| 53 | [fu_cv_sys_stat_statvfs], | 53 | [fu_cv_sys_stat_statvfs], |
| 54 | [AC_LINK_IFELSE( | 54 | [AC_LINK_IFELSE( |
| 55 | [AC_LANG_PROGRAM([[ | 55 | [AC_LANG_PROGRAM([[ |
| 56 | #include <sys/types.h> | 56 | #include <sys/types.h> |
| 57 | #ifdef __osf__ | ||
| 58 | "Do not use Tru64's statvfs implementation" | ||
| 59 | #endif | ||
| 60 | |||
| 61 | #include <sys/statvfs.h> | 57 | #include <sys/statvfs.h> |
| 62 | 58 | ||
| 63 | struct statvfs fsd; | 59 | struct statvfs fsd; |
| @@ -79,7 +75,7 @@ int check_f_blocks_size[sizeof fsd.f_blocks * CHAR_BIT <= 32 ? -1 : 1]; | |||
| 79 | if test $fu_cv_sys_stat_statvfs = yes; then | 75 | if test $fu_cv_sys_stat_statvfs = yes; then |
| 80 | ac_fsusage_space=yes | 76 | ac_fsusage_space=yes |
| 81 | # AIX >= 5.2 has statvfs64 that has a wider f_blocks field than statvfs. | 77 | # AIX >= 5.2 has statvfs64 that has a wider f_blocks field than statvfs. |
| 82 | # glibc, HP-UX, IRIX, Solaris have statvfs64 as well, but on these systems | 78 | # glibc, HP-UX, Solaris have statvfs64 as well, but on these systems |
| 83 | # statvfs with large-file support is already equivalent to statvfs64. | 79 | # statvfs with large-file support is already equivalent to statvfs64. |
| 84 | AC_CACHE_CHECK([whether to use statvfs64], | 80 | AC_CACHE_CHECK([whether to use statvfs64], |
| 85 | [fu_cv_sys_stat_statvfs64], | 81 | [fu_cv_sys_stat_statvfs64], |
| @@ -141,37 +137,9 @@ int check_f_blocks_size[sizeof fsd.f_blocks * CHAR_BIT <= 32 ? -1 : 1]; | |||
| 141 | fi | 137 | fi |
| 142 | 138 | ||
| 143 | if test $ac_fsusage_space = no; then | 139 | if test $ac_fsusage_space = no; then |
| 144 | # DEC Alpha running OSF/1 | ||
| 145 | AC_CACHE_CHECK([for 3-argument statfs function (DEC OSF/1)], | ||
| 146 | [fu_cv_sys_stat_statfs3_osf1], | ||
| 147 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[ | ||
| 148 | #include <sys/param.h> | ||
| 149 | #include <sys/types.h> | ||
| 150 | #include <sys/mount.h> | ||
| 151 | int | ||
| 152 | main () | ||
| 153 | { | ||
| 154 | struct statfs fsd; | ||
| 155 | fsd.f_fsize = 0; | ||
| 156 | return statfs (".", &fsd, sizeof (struct statfs)) != 0; | ||
| 157 | }]])], | ||
| 158 | [fu_cv_sys_stat_statfs3_osf1=yes], | ||
| 159 | [fu_cv_sys_stat_statfs3_osf1=no], | ||
| 160 | [fu_cv_sys_stat_statfs3_osf1=no]) | ||
| 161 | ]) | ||
| 162 | if test $fu_cv_sys_stat_statfs3_osf1 = yes; then | ||
| 163 | ac_fsusage_space=yes | ||
| 164 | AC_DEFINE([STAT_STATFS3_OSF1], [1], | ||
| 165 | [Define if statfs takes 3 args. (DEC Alpha running OSF/1)]) | ||
| 166 | fi | ||
| 167 | fi | ||
| 168 | |||
| 169 | if test $ac_fsusage_space = no; then | ||
| 170 | # glibc/Linux, Mac OS X, FreeBSD < 5.0, NetBSD < 3.0, OpenBSD < 4.4. | 140 | # glibc/Linux, Mac OS X, FreeBSD < 5.0, NetBSD < 3.0, OpenBSD < 4.4. |
| 171 | # (glibc/{Hurd,kFreeBSD}, FreeBSD >= 5.0, NetBSD >= 3.0, | 141 | # (glibc/{Hurd,kFreeBSD}, FreeBSD >= 5.0, NetBSD >= 3.0, |
| 172 | # OpenBSD >= 4.4, AIX, HP-UX, OSF/1, Cygwin already handled above.) | 142 | # OpenBSD >= 4.4, AIX, HP-UX, Cygwin already handled above.) |
| 173 | # (On IRIX you need to include <sys/statfs.h>, not only <sys/mount.h> and | ||
| 174 | # <sys/vfs.h>.) | ||
| 175 | # (On Solaris, statfs has 4 arguments.) | 143 | # (On Solaris, statfs has 4 arguments.) |
| 176 | AC_CACHE_CHECK([for two-argument statfs with statfs.f_bsize member (AIX, 4.3BSD)], | 144 | AC_CACHE_CHECK([for two-argument statfs with statfs.f_bsize member (AIX, 4.3BSD)], |
| 177 | [fu_cv_sys_stat_statfs2_bsize], | 145 | [fu_cv_sys_stat_statfs2_bsize], |
| @@ -225,13 +193,12 @@ int check_f_blocks_size[sizeof fsd.f_blocks * CHAR_BIT <= 32 ? -1 : 1]; | |||
| 225 | if test $fu_cv_sys_stat_statfs4 = yes; then | 193 | if test $fu_cv_sys_stat_statfs4 = yes; then |
| 226 | ac_fsusage_space=yes | 194 | ac_fsusage_space=yes |
| 227 | AC_DEFINE([STAT_STATFS4], [1], | 195 | AC_DEFINE([STAT_STATFS4], [1], |
| 228 | [Define if statfs takes 4 args. (SVR3, old Irix)]) | 196 | [Define if statfs takes 4 args. (SVR3)]) |
| 229 | fi | 197 | fi |
| 230 | fi | 198 | fi |
| 231 | 199 | ||
| 232 | if test $ac_fsusage_space = no; then | 200 | if test $ac_fsusage_space = no; then |
| 233 | # 4.4BSD and older NetBSD | 201 | # 4.4BSD and older NetBSD |
| 234 | # (OSF/1 already handled above.) | ||
| 235 | # (On AIX, you need to include <sys/statfs.h>, not only <sys/mount.h>.) | 202 | # (On AIX, you need to include <sys/statfs.h>, not only <sys/mount.h>.) |
| 236 | # (On Solaris, statfs has 4 arguments and 'struct statfs' is not declared in | 203 | # (On Solaris, statfs has 4 arguments and 'struct statfs' is not declared in |
| 237 | # <sys/mount.h>.) | 204 | # <sys/mount.h>.) |
