From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: Re: libxl: build fix Date: Mon, 8 Nov 2010 17:53:00 +0100 Message-ID: <201011081753.00581.Christoph.Egger@amd.com> References: <201011051608.47100.Christoph.Egger@amd.com> <19672.10106.765818.153896@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <19672.10106.765818.153896@mariner.uk.xensource.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Monday 08 November 2010 17:38:18 Ian Jackson wrote: > Christoph Egger writes ("[Xen-devel] libxl: build fix"): > > Attached patch fixes libxl build. > > libgen.h is needed for basename(). > > Nacked-by: Ian Jackson > > Did you test this change ? Sure. W/o that patch, compiling fails with "implicit declaration" on NetBSD. > Looking at the manpage I have here, How does it differ to mine [1] ? > and the xl code, the version of > basename() expected by the libxl cpuid code is the GNU one, > not the POSIX one, and they have different semantics. I think we will have > to open code an implementation of basename. Can you imagine to make Xen tools prefer POSIX over GNU in general, please? > I see that there is a lot of const-correctness misssing; if filename > had been declared const char* as it should your compiler would have > spotted the problem. The compiler is pretty quiet w/o -Wconst-char -Wwrite-strings in respect to const-correctness. [1] http://netbsd.gw.com/cgi-bin/man-cgi?basename+3+NetBSD-current Christoph -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632