From 5882c44c8149c6db529055ae9f082de30ad80820 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 7 Mar 2010 17:20:22 +1100 Subject: build: check immediate structures --- lib/replace/wscript | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/replace/wscript b/lib/replace/wscript index e999c02eef..d10a70342e 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): -- cgit