debuggers.hg
changeset 21051:0d85c05b1554
blktap: provide a variant of __RING_SIZE() that is an integer constant expression
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 <carnold@novell.com>
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 <carnold@novell.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Sat Mar 06 13:31:03 2010 +0000 (2010-03-06) |
parents | b82dd03944e0 |
children | 8dada4c897c9 |
files | tools/blktap/lib/blktaplib.h tools/blktap2/include/blktaplib.h |
line diff
1.1 --- a/tools/blktap/lib/blktaplib.h Fri Mar 05 14:42:25 2010 +0000 1.2 +++ b/tools/blktap/lib/blktaplib.h Sat Mar 06 13:31:03 2010 +0000 1.3 @@ -42,7 +42,7 @@ 1.4 #include <sys/types.h> 1.5 #include <unistd.h> 1.6 1.7 -#define BLK_RING_SIZE __RING_SIZE((blkif_sring_t *)0, XC_PAGE_SIZE) 1.8 +#define BLK_RING_SIZE __CONST_RING_SIZE(blkif, XC_PAGE_SIZE) 1.9 1.10 /* size of the extra VMA area to map in attached pages. */ 1.11 #define BLKTAP_VMA_PAGES BLK_RING_SIZE
2.1 --- a/tools/blktap2/include/blktaplib.h Fri Mar 05 14:42:25 2010 +0000 2.2 +++ b/tools/blktap2/include/blktaplib.h Sat Mar 06 13:31:03 2010 +0000 2.3 @@ -45,7 +45,7 @@ 2.4 #define EPRINTF(_f, _a...) syslog(LOG_ERR, "tap-err:%s: " _f, __func__, ##_a) 2.5 #define PERROR(_f, _a...) EPRINTF(_f ": %s", ##_a, strerror(errno)) 2.6 2.7 -#define BLK_RING_SIZE __RING_SIZE((blkif_sring_t *)0, XC_PAGE_SIZE) 2.8 +#define BLK_RING_SIZE __CONST_RING_SIZE(blkif, XC_PAGE_SIZE) 2.9 2.10 /* size of the extra VMA area to map in attached pages. */ 2.11 #define BLKTAP_VMA_PAGES BLK_RING_SIZE