ia64/xen-unstable

changeset 13802:7b72e2536065

[XEN] Wrap compat XLAT_ macros in "do { } while (0)".
This unbreaks code like

if ( !IS_COMPAT(dom) )
memcpy();
else
XLAT_foo();

Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Thu Feb 01 13:14:43 2007 +0000 (2007-02-01)
parents 588dd80b56b5
children 6e81102d29be
files xen/tools/get-fields.sh
line diff
     1.1 --- a/xen/tools/get-fields.sh	Wed Jan 31 19:37:44 2007 +0000
     1.2 +++ b/xen/tools/get-fields.sh	Thu Feb 01 13:14:43 2007 +0000
     1.3 @@ -227,7 +227,7 @@ handle_array() {
     1.4  
     1.5  build_body() {
     1.6  	echo
     1.7 -	echo -n "#define XLAT_$1(_d_, _s_)"
     1.8 +	echo -n "#define XLAT_$1(_d_, _s_) do {"
     1.9  	local level=1 fields= id= array= arrlvl=1 array_type= type= token
    1.10  	for token in $2
    1.11  	do
    1.12 @@ -303,6 +303,8 @@ build_body() {
    1.13  		esac
    1.14  		test -z "$fields" || fields="$fields $token"
    1.15  	done
    1.16 +	echo " \\"
    1.17 +	echo "} while (0)"
    1.18  	echo ""
    1.19  }
    1.20