From: Andrew Tridgell Date: Sun, 7 Mar 2010 06:20:22 +0000 (+1100) Subject: build: check immediate structures X-Git-Tag: samba-3.6.0pre1~3658 X-Git-Url: http://git.samba.org/samba.git/?p=nivanova%2Fsamba-autobuild%2F.git;a=commitdiff_plain;h=5882c44c8149c6db529055ae9f082de30ad80820 build: check immediate structures --- diff --git a/lib/replace/wscript b/lib/replace/wscript index e999c02eef5..d10a70342e3 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -193,6 +193,20 @@ def configure(conf): execute=True): break + conf.CHECK_CODE(''' + typedef struct {unsigned x;} FOOBAR; + #define X_FOOBAR(x) ((FOOBAR) { x }) + #define FOO_ONE X_FOOBAR(1) + FOOBAR f = FOO_ONE; + static const struct { + FOOBAR y; + } f2[] = { + {FOO_ONE} + }; + static const FOOBAR f3[] = {FOO_ONE}; + ''', + define='HAVE_IMMEDIATE_STRUCTURES') + def build(bld):