[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-5aa75a0fd4bc6402899e06fdb853cab024d65055@git.kernel.org>
Date: Wed, 17 Jun 2009 17:27:57 GMT
From: tip-bot for Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, acme@...hat.com, paulus@...ba.org,
hpa@...or.com, mingo@...hat.com, a.p.zijlstra@...llo.nl,
efault@....de, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:perfcounters/core] perf_counter tools: Replace isprint() with issane()
Commit-ID: 5aa75a0fd4bc6402899e06fdb853cab024d65055
Gitweb: http://git.kernel.org/tip/5aa75a0fd4bc6402899e06fdb853cab024d65055
Author: Peter Zijlstra <a.p.zijlstra@...llo.nl>
AuthorDate: Mon, 15 Jun 2009 20:11:41 +0200
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Wed, 17 Jun 2009 19:23:53 +0200
perf_counter tools: Replace isprint() with issane()
The Git utils came with a ctype replacement that doesn't provide
isprint(). Add a replacement.
Solves a build bug on certain distros.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Mike Galbraith <efault@....de>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
tools/perf/builtin-report.c | 2 +-
tools/perf/util/util.h | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index cd74b2e..707f60c 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -1266,7 +1266,7 @@ static void trace_event(event_t *event)
for (j = 0; j < 15-(i & 15); j++)
cdprintf(" ");
for (j = 0; j < (i & 15); j++) {
- if (isprint(raw_event[i-15+j]))
+ if (issane(raw_event[i-15+j]))
cdprintf("%c", raw_event[i-15+j]);
else
cdprintf(".");
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 76590a1..ce9b514 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -343,6 +343,7 @@ extern unsigned char sane_ctype[256];
#define isdigit(x) sane_istest(x,GIT_DIGIT)
#define isalpha(x) sane_istest(x,GIT_ALPHA)
#define isalnum(x) sane_istest(x,GIT_ALPHA | GIT_DIGIT)
+#define issane(x) sane_istest(x,GIT_SPACE | GIT_DIGIT | GIT_ALPHA | GIT_GLOB_SPECIAL | GIT_REGEX_SPECIAL)
#define is_glob_special(x) sane_istest(x,GIT_GLOB_SPECIAL)
#define is_regex_special(x) sane_istest(x,GIT_GLOB_SPECIAL | GIT_REGEX_SPECIAL)
#define tolower(x) sane_case((unsigned char)(x), 0x20)
--
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