Commit | Line | Data |
---|---|---|
959f3c4c 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: | |
5423c915 JH |
8 | ?MAKE:d_statfs d_statfs_s d_fs_data_s d_statfs_f_flags: \ |
9 | Inlibc Hasstruct Hasfield i_sysparam i_sysmount i_systypes \ | |
10 | i_sysvfs i_sysstatfs Setvar Inhdr | |
959f3c4c JH |
11 | ?MAKE: -pick add $@ %< |
12 | ?S:d_statfs: | |
13 | ?S: This variable conditionally defines the HAS_STATFS symbol, which | |
14 | ?S: indicates to the C program that the statfs() routine is available. | |
15 | ?S:. | |
5423c915 JH |
16 | ?S:d_statfs_s: |
17 | ?S: This variable conditionally defines the HAS_STRUCT_STATFS symbol, | |
18 | ?S: which indicates that the struct statfs is supported. | |
959f3c4c | 19 | ?S:. |
5423c915 JH |
20 | ?S:d_fs_data_s: |
21 | ?S: This variable conditionally defines the HAS_STRUCT_FS_DATA symbol, | |
22 | ?S: which indicates that the struct fs_data is supported. | |
23 | ?S:. | |
24 | ?S:d_statfs_f_flags: | |
25 | ?S: This variable conditionally defines the HAS_STRUCT_STATFS_F_FLAGS | |
959f3c4c JH |
26 | ?S: symbol, which indicates to struct statfs from has f_flags member. |
27 | ?S: This kind of struct statfs is coming from sys/mount.h (BSD), | |
28 | ?S: not from sys/statfs.h (SYSV). | |
29 | ?S:. | |
30 | ?C:HAS_STATFS: | |
31 | ?C: This symbol, if defined, indicates that the statfs routine is | |
7c636e07 | 32 | ?C: available to stat filesystems by filenames. |
959f3c4c | 33 | ?C:. |
5423c915 JH |
34 | ?C:HAS_STRUCT_STATFS: |
35 | ?C: This symbol, if defined, indicates that the struct statfs | |
36 | ?C: to do statfs() is supported. | |
37 | ?C:. | |
38 | ?C:HAS_STRUCT_FS_DATA: | |
39 | ?C: This symbol, if defined, indicates that the struct fs_data | |
40 | ?C: to do statfs() is supported. | |
959f3c4c | 41 | ?C:. |
5423c915 | 42 | ?C:HAS_STRUCT_STATFS_F_FLAGS: |
959f3c4c JH |
43 | ?C: This symbol, if defined, indicates that the struct statfs |
44 | ?C: does have the f_flags member containing the mount flags of | |
5423c915 | 45 | ?C: the filesystem containing the file. |
7c636e07 JH |
46 | ?C: This kind of struct statfs is coming from <sys/mount.h> (BSD 4.3), |
47 | ?C: not from <sys/statfs.h> (SYSV). Older BSDs (like Ultrix) do not | |
5423c915 JH |
48 | ?C: have statfs() and struct statfs, they have ustat() and statfs() |
49 | ?C: with struct fs_data. | |
959f3c4c JH |
50 | ?C:. |
51 | ?H:#$d_statfs HAS_STATFS /**/ | |
5423c915 JH |
52 | ?H:#$d_statfs_s HAS_STRUCT_STATFS /**/ |
53 | ?H:#$d_fs_data_s HAS_STRUCT_FS_DATA /**/ | |
54 | ?H:#$d_statfs_f_flags HAS_STRUCT_STATFS_F_FLAGS /**/ | |
959f3c4c JH |
55 | ?H:. |
56 | ?LINT:set d_statfs | |
5423c915 JH |
57 | ?LINT:set d_statfs_s |
58 | ?LINT:set d_fs_data_s | |
59 | ?LINT:set d_statfs_f_flags | |
959f3c4c JH |
60 | |
61 | : see if statfs exists | |
62 | set statfs d_statfs | |
63 | eval $inlibc | |
64 | ||
5423c915 JH |
65 | echo "Checking to see if your system supports struct statfs..." >&4 |
66 | set d_statfs_s statfs $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h $i_sysvfs sys/vfs.h $i_sysstatfs sys/statfs.h | |
67 | eval $hasstruct | |
68 | case "$d_statfs_s" in | |
69 | "$define") echo "Yup, it does." >&4 ;; | |
70 | *) echo "Nope, it doesn't." >&4 ;; | |
71 | esac | |
959f3c4c | 72 | |
5423c915 JH |
73 | : see if struct statfs knows about f_flags |
74 | case "$d_statfs_s" in | |
75 | define) | |
76 | echo "Checking to see if your struct statfs has f_flags field..." >&4 | |
77 | set d_statfs_f_flags statfs f_flags $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h $i_sysvfs sys/vfs.h $i_sysstatfs sys/statfs.h | |
ba0df5e9 JH |
78 | eval $hasfield |
79 | ;; | |
80 | *) val="$undef" | |
5423c915 | 81 | set d_statfs_f_flags |
ba0df5e9 JH |
82 | eval $setvar |
83 | ;; | |
84 | esac | |
5423c915 JH |
85 | case "$d_statfs_f_flags" in |
86 | "$define") echo "Yup, it does." >&4 ;; | |
87 | *) echo "Nope, it doesn't." >&4 ;; | |
88 | esac | |
89 | ||
90 | echo "Checking to see if your system supports struct fs_data..." >&4 | |
91 | set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h | |
92 | eval $hasstruct | |
93 | case "$d_fs_data_s" in | |
94 | "$define") echo "Yup, it does." >&4 ;; | |
95 | *) echo "Nope, it doesn't." >&4 ;; | |
96 | esac | |
959f3c4c | 97 |