4 # backtrace could be in libexecinfo or in libc
5 conf
.CHECK_FUNCS_IN('backtrace', 'execinfo', checklibc
=True, headers
='execinfo.h')
7 conf
.CHECK_FUNCS('sigprocmask sigblock sigaction')
9 conf
.CHECK_FUNCS_IN('flistxattr', 'attr', checklibc
=True, headers
='sys/attributes.h attr/xattr.h sys/xattr.h')
11 conf
.CHECK_STRUCTURE_MEMBER('struct statvfs', 'f_frsize', define
='HAVE_FRSIZE', headers
='sys/statvfs.h')
13 conf
.CHECK_CODE('getxattr(NULL, NULL, NULL, 0, 0, 0)',
14 define
='XATTR_ADDITIONAL_OPTIONS')
16 if conf
.CONFIG_SET('HAVE_FLISTXATTR'):
17 conf
.DEFINE('HAVE_XATTR_SUPPORT', 1)
22 # all the different ways of doing statfs
26 'struct statvfs64 fsd; exit(statvfs64 (".", &fsd))',
31 'struct statvfs fsd; exit(statvfs(0, &fsd))',
34 ( 'STAT_STATFS3_OSF1',
35 '3-argument statfs function (DEC OSF/1)',
36 'struct statfs fsd; fsd.f_fsize = 0; exit(statfs(".", &fsd, sizeof(struct statfs)))'
37 'sys/param.h sys/mount.h' ),
39 ( 'STAT_STATFS2_BSIZE',
40 'two-argument statfs with statfs.bsize',
41 'struct statfs fsd; fsd.f_bsize = 0; exit(statfs(".", &fsd))',
42 'sys/param.h sys/mount.h sys/vfs.h' ),
45 'four-argument statfs (AIX-3.2.5, SVR3)',
46 'struct statfs fsd; exit(statfs(".", &fsd, sizeof fsd, 0))',
49 ( 'STAT_STATFS2_FSIZE',
50 'two-argument statfs with statfs.fsize',
51 'struct statfs fsd; fsd.f_fsize = 0; exit(statfs(".", &fsd))'
52 'sys/param.h sys/mount.h' ),
54 ( 'STAT_STATFS2_FS_DATA',
55 'two-argument statfs with struct fs_data (Ultrix)',
56 'struct fs_data fsd; exit(statfs(".", &fsd) != 1)',
57 'sys/param.h sys/mount.h sys/fs_types.h' )
61 for (define
, msg
, code
, headers
) in statfs_types
:
62 if conf
.CHECK_CODE(code
,
65 msg
='Checking for %s' % msg
,
71 print("FATAL: Failed to find a statfs method")
75 conf
.CHECK_CODE('struct statvfs buf; buf.f_fsid = 0',
76 define
='HAVE_FSID_INT',
77 msg
='Checking if f_fsid is an integer',
80 headers
='sys/statvfs.h')
82 # fsusage.c assumes that statvfs has an f_frsize entry. Some weird
83 # systems use f_bsize.
84 conf
.CHECK_CODE('struct statvfs buf; buf.f_frsize = 0',
86 msg
='Checking that statvfs.f_frsize works',
87 headers
='sys/statvfs.h',
91 # Some systems use f_flag in struct statvfs while others use f_flags
92 conf
.CHECK_CODE('struct statvfs buf; buf.f_flag = 0',
93 define
='HAVE_STATVFS_F_FLAG',
94 msg
='Checking whether statvfs.f_flag exists',
95 headers
='sys/statvfs.h',
99 conf
.CHECK_CODE('struct statvfs buf; buf.f_flags = 0',
100 define
='HAVE_STATVFS_F_FLAGS',
101 msg
='Checking whether statvfs.f_flags exists',
102 headers
='sys/statvfs.h',