summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-01 14:57:57 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-01 18:55:19 +1100
commit0a703c7fd10d8adc57f5703c697eb80a7a7202bc (patch)
treed1d0e368230a766db19b5779415576fde7f32415 /buildtools/wafsamba
parent014a90f6eff99ab84ad916391e40d63b51196036 (diff)
downloadsamba-0a703c7fd10d8adc57f5703c697eb80a7a7202bc.tar.gz
samba-0a703c7fd10d8adc57f5703c697eb80a7a7202bc.tar.bz2
samba-0a703c7fd10d8adc57f5703c697eb80a7a7202bc.zip
waf: added automatic prototyping of static module init functions
this avoids the need to manually list all our static init functions in the code Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r--buildtools/wafsamba/samba_deps.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py
index 7471118722..bf19656496 100644
--- a/buildtools/wafsamba/samba_deps.py
+++ b/buildtools/wafsamba/samba_deps.py
@@ -210,6 +210,8 @@ def add_init_functions(self):
if modules == []:
cflags.append('-DSTATIC_%s_MODULES=%s' % (sname.replace('-','_'), sentinal))
+ if sentinal == 'NULL':
+ cflags.append('-DSTATIC_%s_MODULES_PROTO' % sname.replace('-','_'))
self.ccflags = cflags
return
@@ -222,8 +224,14 @@ def add_init_functions(self):
init_fn_list.append(d['INIT_FUNCTION'])
if init_fn_list == []:
cflags.append('-DSTATIC_%s_MODULES=%s' % (m, sentinal))
+ if sentinal == 'NULL':
+ cflags.append('-DSTATIC_%s_MODULES_PROTO' % m)
else:
cflags.append('-DSTATIC_%s_MODULES=%s' % (m, ','.join(init_fn_list) + ',' + sentinal))
+ proto=''
+ for f in init_fn_list:
+ proto = proto + '_MODULE_PROTO(%s)' % f
+ cflags.append('-DSTATIC_%s_MODULES_PROTO=%s' % (m, proto))
self.ccflags = cflags