From: Ian Campbell Subject: Re: [PATCH v2 4/6] tools/libxc: Introduce ARRAY_SIZE() and replace handrolled examples Date: Tue, 10 Jun 2014 14:35:10 +0100 Message-ID: <1402407310.1250.127.camel@kazak.uk.xensource.com> References: <1402328471-1126-1-git-send-email-andrew.cooper3@citrix.com> <1402328471-1126-5-git-send-email-andrew.cooper3@citrix.com> <1402404007.1250.95.camel@kazak.uk.xensource.com> <5396FFD9.1050904@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5396FFD9.1050904@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Ian Jackson , Xen-devel List-Id: xen-devel@lists.xenproject.org On Tue, 2014-06-10 at 13:53 +0100, Andrew Cooper wrote: > On 10/06/14 13:40, Ian Campbell wrote: > > On Mon, 2014-06-09 at 16:41 +0100, Andrew Cooper wrote: > >> The conditional test is needed because xc_private.h is included into minios > >> for stubdomains, where ARRAY_SIZE is already defined. > >> > >> Signed-off-by: Andrew Cooper > >> CC: Ian Campbell > >> CC: Ian Jackson > >> > >> -- > >> v2: Find more areas of the codebase which are poking at libxc private internals > >> --- > >> tools/libxc/xc_dom_arm.c | 2 +- > >> tools/libxc/xc_dom_x86.c | 4 ++-- > >> tools/libxc/xc_minios.c | 2 +- > >> tools/libxc/xc_private.h | 4 ++++ > >> tools/misc/xen-hptool.c | 2 -- > >> tools/misc/xen-mfndump.c | 2 -- > > Not tools/misc/xenpm.c too? > > No - xenpm.c is well behaved and doesn't use private headers. (and I > discovered this by ripping them all out and xenpm failed to compile) Aha! > > Or if not perhaps > > #undef ARRAY_SIZE /* We shouldn't be including xc_private.h */ > > in those so that an eventual removal of xc_private from them isn't > > blocked? (I think I slightly prefer the second option) > > This is my preferred option. Works for me then, thanks. (FYI if you are planning to I have queued patch 1-3 and 5 for applying) Ian.