Skip to content

Commit d30d4a0

Browse files
namhyungacmel
authored andcommitted
perf tools: Remove unnecessary ctype.h inclusion
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>
1 parent d1eec3e commit d30d4a0

8 files changed

Lines changed: 1 addition & 8 deletions

File tree

‎tools/perf/bench/mem-memcpy.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*
66
* Written by Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
77
*/
8-
#include <ctype.h>
98

109
#include "../perf.h"
1110
#include "../util/util.h"

‎tools/perf/bench/mem-memset.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*
66
* Trivial clone of mem-memcpy.c.
77
*/
8-
#include <ctype.h>
98

109
#include "../perf.h"
1110
#include "../util/util.h"

‎tools/perf/util/probe-finder.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include <stdlib.h>
3131
#include <string.h>
3232
#include <stdarg.h>
33-
#include <ctype.h>
3433
#include <dwarf-regs.h>
3534

3635
#include <linux/bitops.h>

‎tools/perf/util/scripting-engines/trace-event-python.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <stdio.h>
2525
#include <stdlib.h>
2626
#include <string.h>
27-
#include <ctype.h>
2827
#include <errno.h>
2928

3029
#include "../../perf.h"

‎tools/perf/util/trace-event-parse.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include <stdio.h>
2626
#include <stdlib.h>
2727
#include <string.h>
28-
#include <ctype.h>
2928
#include <errno.h>
3029

3130
#include "../perf.h"

‎tools/perf/util/trace-event-read.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#include <pthread.h>
3434
#include <fcntl.h>
3535
#include <unistd.h>
36-
#include <ctype.h>
3736
#include <errno.h>
3837

3938
#include "../perf.h"

‎tools/perf/util/trace-event-scripting.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include <stdio.h>
2323
#include <stdlib.h>
2424
#include <string.h>
25-
#include <ctype.h>
2625
#include <errno.h>
2726

2827
#include "../perf.h"

‎tools/perf/util/ui/browsers/map.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
#include <newt.h>
44
#include <inttypes.h>
55
#include <sys/ttydefaults.h>
6-
#include <ctype.h>
76
#include <string.h>
87
#include <linux/bitops.h>
8+
#include "../../util.h"
99
#include "../../debug.h"
1010
#include "../../symbol.h"
1111
#include "../browser.h"

0 commit comments

Comments
 (0)