From 8dc2db0f6d61fc26fbecd27afbee5147ad358756 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 18 Apr 2010 15:39:14 +1000 Subject: build: added abi type maps for _Bool and __va_list_tag This allows us to make the signature files platform independent --- buildtools/wafsamba/samba_abi.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'buildtools/wafsamba/samba_abi.py') diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py index 6e4d8d81e0..2b6871a7ee 100644 --- a/buildtools/wafsamba/samba_abi.py +++ b/buildtools/wafsamba/samba_abi.py @@ -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): -- cgit