build: added abi type maps for _Bool and __va_list_tag
authorAndrew Tridgell <tridge@samba.org>
Sun, 18 Apr 2010 05:39:14 +0000 (15:39 +1000)
committerAndrew Tridgell <tridge@samba.org>
Sun, 18 Apr 2010 05:39:14 +0000 (15:39 +1000)
This allows us to make the signature files platform independent

buildtools/wafsamba/samba_abi.py

index 6e4d8d81e0852c729ce37a5201b54a3a44789cfc..2b6871a7eea1fcc2997b32c76de6eb7f66d4fedd 100644 (file)
@@ -3,12 +3,22 @@
 import Options, Utils, os, Logs, samba_utils, sys, Task, fnmatch, re
 from TaskGen import feature, before, after
 
+# these type maps cope with platform specific names for common types
+# please add new type mappings into the list below
+abi_type_maps = {
+    '_Bool' : 'bool',
+    '__va_list_tag' : 'va_list'
+    }
+
 def normalise_signature(sig):
     '''normalise a signature from gdb'''
     sig = sig.strip()
     sig = re.sub('^\$[0-9]+\s=\s\{*', '', sig)
     sig = re.sub('\}(\s0x[0-9a-f]+\s<\w+>)?$', '', sig)
     sig = re.sub('0x[0-9a-f]+', '0xXXXX', sig)
+
+    for t in abi_type_maps:
+        sig = re.sub('\\b%s\\b' % t, abi_type_maps[t], sig)
     return sig
 
 def normalise_varargs(sig):