This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix .gitignore: only ignore 'perl' in root of repo, not U/perl subdir
[metaconfig.git] / U / perl / d_statfs4.U
CommitLineData
5423c915
JH
1?RCS: $Id$
2?RCS:
3?RCS: Copyright (c) 1999 Jarkko Hietaniemi
4?RCS:
5?RCS: You may distribute under the terms of either the GNU General Public
6?RCS: License or the Artistic License, as specified in the README file.
7?RCS:
8?MAKE:d_statfs4: \
e2044f28 9 d_statfs Compile rm_try cat i_sysparam i_sysmount i_systypes \
14ed9e9a 10 i_sysvfs i_sysstatfs Setvar
5423c915
JH
11?MAKE: -pick add $@ %<
12?S:d_statfs4:
13?S: This variable conditionally defines the HAS_STATFS symbol, which
14?S: indicates to the C program that the statfs() has four arguments.
15?S:.
16?C:HAS_STATFS4:
17?C: This symbol, if defined, indicates that the statfs routine
18?C: has four arguments, not two.
19?C:.
20?H:#$d_statfs4 HAS_STATFS4 /**/
21?H:.
22?LINT:set d_statfs4
2f125bce 23: Check for statfs4
5423c915
JH
24case "$d_statfs" in
25define)
26 $cat >try.h <<EOCP
27#define HAS_SYS_TYPES $i_systypes
28#define HAS_SYS_PARAM $i_sysparam
29#define HAS_SYS_MOUNT $i_sysmount
30#define HAS_SYS_VFS $i_sysvfs
31#define HAS_SYS_STATFS $i_sysstatfs
32#ifdef HAS_SYS_TYPES
33# include <sys/types.h>
34#endif
35#ifdef HAS_SYS_PARAM
36# include <sys/param.h>
37#endif
38#ifdef HAS_SYS_MOUNT
39# include <sys/mount.h>
40#endif
41#ifdef HAS_SYS_VFS
42# include <sys/vfs.h>
43#endif
44#ifdef HAS_SYS_STATFS
45# include <sys/statfs.h>
46#endif
47EOCP
14ed9e9a 48 echo "Checking to see if your statfs can handle four arguments..." >&4
5423c915
JH
49 $cat >try.c <<EOCP
50#include "try.h"
51int main() { struct statfs sf; statfs(".", &sf, sizeof(sf), 0) };
52EOCP
53 set try
54 if eval $compile; then
55 val="$define"
56 else
57 val="$undef"
58 fi
59 case "$val" in
6c094af6 60 $define) echo "Yes, it can." ;;
df7b35c0 61 $undef) echo "No, it can't." ;;
5423c915 62 esac
e2044f28 63 $rm_try
5423c915
JH
64 ;;
65*) val="$undef"
66 ;;
67esac
68set d_statfs4
69eval $setvar
70