summaryrefslogtreecommitdiff
path: root/lib/replace
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-07 23:27:50 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:45 +1000
commit690b08fa0ad27d1fc7b9564c8c216c2ff00f944e (patch)
tree695338d3fb06487b9b95ff3617d68a4bcf8ec6f5 /lib/replace
parent5bf0b5c72fde178643675352a91efaf6afae0690 (diff)
downloadsamba-690b08fa0ad27d1fc7b9564c8c216c2ff00f944e.tar.gz
samba-690b08fa0ad27d1fc7b9564c8c216c2ff00f944e.tar.bz2
samba-690b08fa0ad27d1fc7b9564c8c216c2ff00f944e.zip
build: fixed _Bool va_copy and VA_ARGS tests
Diffstat (limited to 'lib/replace')
-rw-r--r--lib/replace/wscript25
1 files changed, 11 insertions, 14 deletions
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 6743078451..9e10cd9904 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -86,6 +86,7 @@ def configure(conf):
conf.CHECK_TYPES('"long long" intptr_t uintptr_t ptrdiff_t')
conf.CHECK_TYPES('comparison_fn_t socklen_t bool')
+ conf.CHECK_TYPE('_Bool', define='HAVE__Bool')
conf.CHECK_TYPE('int8_t', 'char')
conf.CHECK_TYPE('int16_t', 'short')
@@ -151,20 +152,16 @@ def configure(conf):
conf.CHECK_SIZEOF('void*', define='SIZEOF_VOID_P')
if conf.CONFIG_SET('HAVE_EPOLL_CREATE') and conf.CONFIG_SET('HAVE_SYS_EPOLL_H'):
- conf.define('HAVE_EPOLL', 1)
-
- conf.check_cc(fragment='''
- #include <stdarg.h>
- va_list ap1,ap2;
- va_copy(ap1,ap2);
- int main(void)
- { return 0; }''',
- define_name="HAVE_VA_COPY",
- execute=0,
- link=0,
- define_ret=0,
- quote=0,
- msg="Checking for va_copy")
+ conf.DEFINE('HAVE_EPOLL', 1)
+
+ conf.CHECK_CODE('va_list ap1,ap2; va_copy(ap1,ap2)',
+ define="HAVE_VA_COPY",
+ msg="Checking for va_copy")
+
+ conf.CHECK_CODE('''
+ #define eprintf(...) fprintf(stderr, __VA_ARGS__)
+ eprintf("bla", "bar")
+ ''', define='HAVE__VA_ARGS__MACRO')
conf.CHECK_CODE('gettimeofday(NULL, NULL)', 'HAVE_GETTIMEOFDAY_TZ', execute=False)