summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-07 15:52:45 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:43 +1000
commit001068d26f4fcc8e16e460e8c9d2910271ca7156 (patch)
tree157f67667de79aca0abc3d2c7dd9aeb23b312c0c
parent0d34e811734f4f154a81100462b263f1300cc03b (diff)
downloadsamba-001068d26f4fcc8e16e460e8c9d2910271ca7156.tar.gz
samba-001068d26f4fcc8e16e460e8c9d2910271ca7156.tar.bz2
samba-001068d26f4fcc8e16e460e8c9d2910271ca7156.zip
build: check for volatile
-rw-r--r--buildtools/wafsamba/samba_autoconf.py13
-rw-r--r--lib/replace/wscript1
2 files changed, 10 insertions, 4 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index fef44ea95b..7eac7d955f 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -48,11 +48,16 @@ def CHECK_TYPE_IN(conf, t, hdr):
return False
@conf
-def CHECK_TYPE(conf, t, alternate):
- if not conf.check(type_name=t, header_name=conf.env.hlist):
+def CHECK_TYPE(conf, t, alternate=None, headers=None, define=None):
+ if headers is None:
+ headers = conf.env.hlist
+ if define is not None:
+ ret = conf.check(type_name=t, header_name=headers, define_name=define)
+ else:
+ ret = conf.check(type_name=t, header_name=headers)
+ if not ret and alternate is not None:
conf.DEFINE(t, alternate)
- return True
- return False
+ return ret
@conf
def CHECK_VARIABLE(conf, v, define=None, always=False, headers=None):
diff --git a/lib/replace/wscript b/lib/replace/wscript
index b5a01d6a81..ef8972924b 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -100,6 +100,7 @@ def configure(conf):
conf.CHECK_TYPE('loff_t', 'off_t')
conf.CHECK_TYPE('bool', 'off_t')
conf.CHECK_TYPE('offset_t', 'loff_t')
+ conf.CHECK_TYPE('volatile int', define='HAVE_VOLATILE')
conf.CHECK_TYPE_IN('struct ifaddrs', 'ifaddrs.h')
conf.CHECK_TYPE_IN('struct addrinfo', 'netdb.h')