From: "Charles Arnold" Subject: [PATCH] provide a variant of __RING_SIZE() that is an integer constant expression Date: Fri, 05 Mar 2010 16:28:38 -0700 Message-ID: <4B913136020000910005C816@sinclair.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part97BD40B6.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --=__Part97BD40B6.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Without this new variant, gcc 4.5 won't compile where this is being used = to specify array sizes. See also c/s 20975. Signed-off-by: Charles Arnold --=__Part97BD40B6.0__= Content-Type: text/plain; name="xen-blk-ring-size-expression.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="xen-blk-ring-size-expression.patch" diff -r b8d2a4134a68 tools/blktap/lib/blktaplib.h=0A--- a/tools/blktap/lib/= blktaplib.h Wed Mar 03 17:41:58 2010 +0000=0A+++ b/tools/blktap/lib/blk= taplib.h Thu Mar 04 13:54:52 2010 -0700=0A@@ -42,7 +42,7 @@=0A = #include =0A #include =0A =0A-#define BLK_RING_SIZE = __RING_SIZE((blkif_sring_t *)0, XC_PAGE_SIZE)=0A+#define BLK_RING_SIZE = __CONST_RING_SIZE(blkif, XC_PAGE_SIZE)=0A =0A /* size of the extra VMA = area to map in attached pages. */=0A #define BLKTAP_VMA_PAGES BLK_RING_SIZE= =0Adiff -r b8d2a4134a68 tools/blktap2/include/blktaplib.h=0A--- a/tools/blk= tap2/include/blktaplib.h Wed Mar 03 17:41:58 2010 +0000=0A+++ = b/tools/blktap2/include/blktaplib.h Thu Mar 04 13:56:09 2010 -0700=0A@@= -45,7 +45,7 @@=0A #define EPRINTF(_f, _a...) syslog(LOG_ERR, "tap-err:%s: = " _f, __func__, ##_a)=0A #define PERROR(_f, _a...) EPRINTF(_f ": %s", = ##_a, strerror(errno))=0A =0A-#define BLK_RING_SIZE __RING_SIZE((blkif_srin= g_t *)0, XC_PAGE_SIZE)=0A+#define BLK_RING_SIZE __CONST_RING_SIZE(blkif, = XC_PAGE_SIZE)=0A =0A /* size of the extra VMA area to map in attached = pages. */=0A #define BLKTAP_VMA_PAGES BLK_RING_SIZE=0A --=__Part97BD40B6.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__Part97BD40B6.0__=--