Skip to content

Commit

Permalink
perf tools: Remove unnecessary ctype.h inclusion
Browse files Browse the repository at this point in the history
There are unnecessary #include <ctype.h> out there, and they might cause
a nasty build failure in some environment. As we already have most of
ctype macros in util.h, just get rid of them.

A few of exceptions are util/symbol.c which needs isupper() macro util.h
doesn't provide and perl scripting support code which includes ctype.h
internally.

Suggested-by: Ingo Molnar <mingo@elte.hu>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1327827356-8786-4-git-send-email-namhyung@gmail.com
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Namhyung Kim authored and Arnaldo Carvalho de Melo committed Jan 30, 2012
1 parent d1eec3e commit d30d4a0
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion tools/perf/bench/mem-memcpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*
* Written by Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
*/
#include <ctype.h>

#include "../perf.h"
#include "../util/util.h"
Expand Down
1 change: 0 additions & 1 deletion tools/perf/bench/mem-memset.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*
* Trivial clone of mem-memcpy.c.
*/
#include <ctype.h>

#include "../perf.h"
#include "../util/util.h"
Expand Down
1 change: 0 additions & 1 deletion tools/perf/util/probe-finder.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <ctype.h>
#include <dwarf-regs.h>

#include <linux/bitops.h>
Expand Down
1 change: 0 additions & 1 deletion tools/perf/util/scripting-engines/trace-event-python.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>

#include "../../perf.h"
Expand Down
1 change: 0 additions & 1 deletion tools/perf/util/trace-event-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>

#include "../perf.h"
Expand Down
1 change: 0 additions & 1 deletion tools/perf/util/trace-event-read.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <pthread.h>
#include <fcntl.h>
#include <unistd.h>
#include <ctype.h>
#include <errno.h>

#include "../perf.h"
Expand Down
1 change: 0 additions & 1 deletion tools/perf/util/trace-event-scripting.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>

#include "../perf.h"
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/ui/browsers/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#include <newt.h>
#include <inttypes.h>
#include <sys/ttydefaults.h>
#include <ctype.h>
#include <string.h>
#include <linux/bitops.h>
#include "../../util.h"
#include "../../debug.h"
#include "../../symbol.h"
#include "../browser.h"
Expand Down

0 comments on commit d30d4a0

Please sign in to comment.