[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |