[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100414004115.GI5602@nowhere>
Date: Wed, 14 Apr 2010 02:41:16 +0200
From: Frederic Weisbecker <fweisbec@...il.com>
To: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>, Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] perf: Fix accidentally preprocessed snprintf callback
On Wed, Apr 14, 2010 at 02:37:48AM +0200, Frederic Weisbecker wrote:
> struct sort_entry has a callback named snprintf that turns an
> entry into a string result.
>
> But there are glibc versions that implement snprintf through a
> macro. The following expression is then going to get the snprintf
> call preprocessed:
>
> ent->snprintf(...)
>
> to finally end up in a build error:
>
> util/hist.c: Dans la fonction «hist_entry__snprintf» :
> util/hist.c:539: erreur: «struct sort_entry» has no member named «__builtin___snprintf_chk»
>
> To fix this, rename struct sort_entry::snprintf() callback to
> to_string(), assuming at least Java methods naming won't ever
> conflict with perf.
Note I'm not entirely happy with this to_string() renaming.
May be append_string() would have been better. I don't know.
snprintf() was just too good.
If you think about something else, don't hesistate to change,
or I can change it myself if you want.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists