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-devel

Re: [Xen-devel] libxl: build fix

On Monday 08 November 2010 18:01:54 Ian Jackson wrote:
> Look at the code and you will see that it assumes that basename does
> not modify its argument.  I'm about to push a const-correctness fix
> which will make this more obvious and cause your broken attempt at a
> fix not to compile :-).

I rebased my source tree and yes, it does not compile.

> > > 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 agree that the current code is a mistake.  The POSIX basename is
> irritating and we shouldn't use it.  Simply open coding a search for a
> '/' will be fine.

Attached patch replaces basename with strrchr(3).

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>


-- 
---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

Attachment: xen_buildxl.diff
Description: xen_buildxl.diff

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>