?RCS: $Id$ ?RCS: ?RCS: Copyright (c) 1999 Jarkko Hietaniemi ?RCS: ?RCS: You may distribute under the terms of either the GNU General Public ?RCS: License or the Artistic License, as specified in the README file. ?RCS: ?MAKE:d_statfs d_statfs_s d_fs_data_s d_statfs_f_flags: \ Inlibc Hasstruct Hasfield i_sysparam i_sysmount i_systypes \ i_sysvfs i_sysstatfs Setvar Inhdr ?MAKE: -pick add $@ %< ?S:d_statfs: ?S: This variable conditionally defines the HAS_STATFS symbol, which ?S: indicates to the C program that the statfs() routine is available. ?S:. ?S:d_statfs_s: ?S: This variable conditionally defines the HAS_STRUCT_STATFS symbol, ?S: which indicates that the struct statfs is supported. ?S:. ?S:d_fs_data_s: ?S: This variable conditionally defines the HAS_STRUCT_FS_DATA symbol, ?S: which indicates that the struct fs_data is supported. ?S:. ?S:d_statfs_f_flags: ?S: This variable conditionally defines the HAS_STRUCT_STATFS_F_FLAGS ?S: symbol, which indicates to struct statfs from has f_flags member. ?S: This kind of struct statfs is coming from sys/mount.h (BSD), ?S: not from sys/statfs.h (SYSV). ?S:. ?C:HAS_STATFS: ?C: This symbol, if defined, indicates that the statfs routine is ?C: available to stat filesystems by filenames. ?C:. ?C:HAS_STRUCT_STATFS: ?C: This symbol, if defined, indicates that the struct statfs ?C: to do statfs() is supported. ?C:. ?C:HAS_STRUCT_FS_DATA: ?C: This symbol, if defined, indicates that the struct fs_data ?C: to do statfs() is supported. ?C:. ?C:HAS_STRUCT_STATFS_F_FLAGS: ?C: This symbol, if defined, indicates that the struct statfs ?C: does have the f_flags member containing the mount flags of ?C: the filesystem containing the file. ?C: This kind of struct statfs is coming from (BSD 4.3), ?C: not from (SYSV). Older BSDs (like Ultrix) do not ?C: have statfs() and struct statfs, they have ustat() and statfs() ?C: with struct fs_data. ?C:. ?H:#$d_statfs HAS_STATFS /**/ ?H:#$d_statfs_s HAS_STRUCT_STATFS /**/ ?H:#$d_fs_data_s HAS_STRUCT_FS_DATA /**/ ?H:#$d_statfs_f_flags HAS_STRUCT_STATFS_F_FLAGS /**/ ?H:. ?LINT:set d_statfs ?LINT:set d_statfs_s ?LINT:set d_fs_data_s ?LINT:set d_statfs_f_flags : see if statfs exists set statfs d_statfs eval $inlibc echo "Checking to see if your system supports struct statfs..." >&4 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 eval $hasstruct case "$d_statfs_s" in "$define") echo "Yup, it does." >&4 ;; *) echo "Nope, it doesn't." >&4 ;; esac : see if struct statfs knows about f_flags case "$d_statfs_s" in define) echo "Checking to see if your struct statfs has f_flags field..." >&4 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 eval $hasfield ;; *) val="$undef" set d_statfs_f_flags eval $setvar ;; esac case "$d_statfs_f_flags" in "$define") echo "Yup, it does." >&4 ;; *) echo "Nope, it doesn't." >&4 ;; esac echo "Checking to see if your system supports struct fs_data..." >&4 set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h eval $hasstruct case "$d_fs_data_s" in "$define") echo "Yup, it does." >&4 ;; *) echo "Nope, it doesn't." >&4 ;; esac