WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XEN] Wrap compat XLAT_ macros in "do { }

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] Wrap compat XLAT_ macros in "do { } while (0)".
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 01 Feb 2007 13:35:06 -0800
Delivery-date: Thu, 01 Feb 2007 13:35:39 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1170335683 0
# Node ID 7b72e2536065ac4181ac9f95d124686ac421f9c5
# Parent  588dd80b56b5411bd9d1860e9e19da39a64e2f5d
[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@xxxxxxxxxxxxx>
---
 xen/tools/get-fields.sh |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r 588dd80b56b5 -r 7b72e2536065 xen/tools/get-fields.sh
--- a/xen/tools/get-fields.sh   Wed Jan 31 19:37:44 2007 +0000
+++ b/xen/tools/get-fields.sh   Thu Feb 01 13:14:43 2007 +0000
@@ -227,7 +227,7 @@ handle_array() {
 
 build_body() {
        echo
-       echo -n "#define XLAT_$1(_d_, _s_)"
+       echo -n "#define XLAT_$1(_d_, _s_) do {"
        local level=1 fields= id= array= arrlvl=1 array_type= type= token
        for token in $2
        do
@@ -303,6 +303,8 @@ build_body() {
                esac
                test -z "$fields" || fields="$fields $token"
        done
+       echo " \\"
+       echo "} while (0)"
        echo ""
 }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEN] Wrap compat XLAT_ macros in "do { } while (0)"., Xen patchbot-unstable <=