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 xattr_headers
='sys/attributes.h attr/xattr.h sys/xattr.h'
10 conf
.CHECK_FUNCS_IN('flistxattr', 'attr', checklibc
=True, headers
=xattr_headers
)
12 conf
.CHECK_CODE('getxattr(NULL, NULL, NULL, 0, 0, 0)',
13 headers
=xattr_headers
, local_include
=False,
14 define
='XATTR_ADDITIONAL_OPTIONS',
15 msg
='Checking for darwin xattr api')
17 if conf
.CONFIG_SET('HAVE_FLISTXATTR'):
18 conf
.DEFINE('HAVE_XATTR_SUPPORT', 1)
22 conf
.CHECK_STRUCTURE_MEMBER('struct statvfs', 'f_frsize', define
='HAVE_FRSIZE', headers
='sys/statvfs.h')
24 # all the different ways of doing statfs
28 'struct statvfs64 fsd; exit(statvfs64 (".", &fsd))',
33 'struct statvfs fsd; exit(statvfs(0, &fsd))',
36 ( 'STAT_STATFS3_OSF1',
37 '3-argument statfs function (DEC OSF/1)',
38 'struct statfs fsd; fsd.f_fsize = 0; exit(statfs(".", &fsd, sizeof(struct statfs)))'
39 'sys/param.h sys/mount.h' ),
41 ( 'STAT_STATFS2_BSIZE',
42 'two-argument statfs with statfs.bsize',
43 'struct statfs fsd; fsd.f_bsize = 0; exit(statfs(".", &fsd))',
44 'sys/param.h sys/mount.h sys/vfs.h' ),
47 'four-argument statfs (AIX-3.2.5, SVR3)',
48 'struct statfs fsd; exit(statfs(".", &fsd, sizeof fsd, 0))',
51 ( 'STAT_STATFS2_FSIZE',
52 'two-argument statfs with statfs.fsize',
53 'struct statfs fsd; fsd.f_fsize = 0; exit(statfs(".", &fsd))'
54 'sys/param.h sys/mount.h' ),
56 ( 'STAT_STATFS2_FS_DATA',
57 'two-argument statfs with struct fs_data (Ultrix)',
58 'struct fs_data fsd; exit(statfs(".", &fsd) != 1)',
59 'sys/param.h sys/mount.h sys/fs_types.h' )
63 for (define
, msg
, code
, headers
) in statfs_types
:
64 if conf
.CHECK_CODE(code
,
67 msg
='Checking for %s' % msg
,
73 print("FATAL: Failed to find a statfs method")
77 conf
.CHECK_CODE('struct statvfs buf; buf.f_fsid = 0',
78 define
='HAVE_FSID_INT',
79 msg
='Checking if f_fsid is an integer',
82 headers
='sys/statvfs.h')
84 # fsusage.c assumes that statvfs has an f_frsize entry. Some weird
85 # systems use f_bsize.
86 conf
.CHECK_CODE('struct statvfs buf; buf.f_frsize = 0',
88 msg
='Checking that statvfs.f_frsize works',
89 headers
='sys/statvfs.h',
93 # Some systems use f_flag in struct statvfs while others use f_flags
94 conf
.CHECK_CODE('struct statvfs buf; buf.f_flag = 0',
95 define
='HAVE_STATVFS_F_FLAG',
96 msg
='Checking whether statvfs.f_flag exists',
97 headers
='sys/statvfs.h',
101 conf
.CHECK_CODE('struct statvfs buf; buf.f_flags = 0',
102 define
='HAVE_STATVFS_F_FLAGS',
103 msg
='Checking whether statvfs.f_flags exists',
104 headers
='sys/statvfs.h',