diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-03-07 15:19:37 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-06 20:26:42 +1000 |
commit | cfb4f55a7be13660377ec80fe1444c41dd4065d4 (patch) | |
tree | 3a71af016a0979abc2c089c92388a82bbe200b14 /buildtools | |
parent | d5560482ea06d11969447dcfb13f88cc6f285e58 (diff) | |
download | samba-cfb4f55a7be13660377ec80fe1444c41dd4065d4.tar.gz samba-cfb4f55a7be13660377ec80fe1444c41dd4065d4.tar.bz2 samba-cfb4f55a7be13660377ec80fe1444c41dd4065d4.zip |
build: check size of types
allow name of SIZEOF test to be specified
Diffstat (limited to 'buildtools')
-rw-r--r-- | buildtools/wafsamba/samba_autoconf.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index c61a55f14b..fef44ea95b 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -115,7 +115,7 @@ def CHECK_FUNCS(conf, list): return ret @conf -def CHECK_SIZEOF(conf, vars, headers=None): +def CHECK_SIZEOF(conf, vars, headers=None, define=None): hdrs='' if headers is not None: hlist = to_list(headers) @@ -124,6 +124,10 @@ def CHECK_SIZEOF(conf, vars, headers=None): for h in hlist: hdrs += '#include <%s>\n' % h for v in to_list(vars): + if define is None: + define_name = 'SIZEOF_%s' % string.replace(v.upper(), ' ', '_') + else: + define_name = define conf.check(fragment= ''' %s @@ -134,7 +138,7 @@ def CHECK_SIZEOF(conf, vars, headers=None): ''' % (hdrs, v), execute=1, define_ret=True, - define_name='SIZEOF_%s' % v.upper(), + define_name=define_name, quote=False, msg="Checking size of %s" % v) |