Re: [PATCH v2 05/12] perf tools: include basename for non-glibc systems

2012-09-08 Thread David Ahern
On 9/8/12 3:09 AM, Pekka Enberg wrote: It's safe to include on glibc Linux systems as well, no? So there's no need to check for __BIONIC__. Theoretically, yes. In reality compile fails in multiple places. basename can modify the string passed to it and several places in perf are passing a st

Re: [PATCH v2 05/12] perf tools: include basename for non-glibc systems

2012-09-08 Thread Pekka Enberg
On Sat, Sep 8, 2012 at 3:43 AM, Irina Tirdea wrote: > From: Irina Tirdea > > perf uses the glibc version of basename(), by defining _GNU_SOURCE, including > string.h and not including libgen.h. The glibc version of basename is better > than the POSIX version since it does not modify its argument.

[PATCH v2 05/12] perf tools: include basename for non-glibc systems

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea perf uses the glibc version of basename(), by defining _GNU_SOURCE, including string.h and not including libgen.h. The glibc version of basename is better than the POSIX version since it does not modify its argument. Android has only one version of basename which is defined in