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

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

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 irina.tir...@gmail.com wrote: From: Irina Tirdea irina.tir...@intel.com 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

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 libgen.h 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