This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add probe for isblank() (requested by khw)
[metaconfig.git] / U / perl / d_statfs3.U
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_statfs3: \
9         d_statfs Compile rm cat i_sysparam i_sysmount i_systypes \
10         i_sysvfs i_sysstatfs Setvar
11 ?MAKE:  -pick add $@ %<
12 ?S:d_statfs3:
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_STATFS3:
17 ?C:     This symbol, if defined, indicates that the statfs routine
18 ?C:     has four arguments, not two.
19 ?C:.
20 ?H:#$d_statfs3 HAS_STATFS3              /**/
21 ?H:.
22 ?LINT:set d_statfs3
23 : Check for statfs3
24 case "$d_statfs" in
25 define)
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
47 EOCP
48         echo "Checking to see if your statfs can handle three arguments..." >&4
49         $cat >try.c <<EOCP
50 #include "try.h"
51 int main() { struct statfs sf; statfs(".", &sf, sizeof(sf)) };
52 EOCP
53         set try
54         if eval $compile; then
55                 val="$define"
56         else
57                 val="$undef"
58         fi
59         case "$val" in
60         $define) echo "Yes, it can."  ;;
61         $undef)  echo "No, it can't." ;;
62         esac
63         ;;
64 *)      val="$undef"
65         ;;
66 esac
67 set d_statfs3
68 eval $setvar
69
70 $rm -f try.* try
71