diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-04-03 09:19:26 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-04-03 09:19:26 -0400 |
commit | e206d556c5793ac5e28c0aaba2e07432e5f9a098 (patch) | |
tree | 7042affb6737531f757c0753aa3d32b3494c396b /tools/perf | |
parent | 2aefa4f733f2c5ce51dd2316ffecb258463fde71 (diff) |
perf tools: Move the prototypes in util/string.h to util.h
So that we avoid conflict with libc's string.h header.
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Suggested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/Makefile | 1 | ||||
-rw-r--r-- | tools/perf/bench/mem-memcpy.c | 1 | ||||
-rw-r--r-- | tools/perf/builtin-annotate.c | 1 | ||||
-rw-r--r-- | tools/perf/builtin-record.c | 1 | ||||
-rw-r--r-- | tools/perf/builtin-report.c | 1 | ||||
-rw-r--r-- | tools/perf/builtin-timechart.c | 1 | ||||
-rw-r--r-- | tools/perf/perf.c | 1 | ||||
-rw-r--r-- | tools/perf/util/string.h | 16 | ||||
-rw-r--r-- | tools/perf/util/util.h | 12 |
9 files changed, 12 insertions, 23 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 93029c09cd65..9f5a47e5c07e 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -385,7 +385,6 @@ LIB_H += util/header.h | |||
385 | LIB_H += util/help.h | 385 | LIB_H += util/help.h |
386 | LIB_H += util/session.h | 386 | LIB_H += util/session.h |
387 | LIB_H += util/strbuf.h | 387 | LIB_H += util/strbuf.h |
388 | LIB_H += util/string.h | ||
389 | LIB_H += util/strlist.h | 388 | LIB_H += util/strlist.h |
390 | LIB_H += util/svghelper.h | 389 | LIB_H += util/svghelper.h |
391 | LIB_H += util/run-command.h | 390 | LIB_H += util/run-command.h |
diff --git a/tools/perf/bench/mem-memcpy.c b/tools/perf/bench/mem-memcpy.c index 89773178e894..52e646e3e873 100644 --- a/tools/perf/bench/mem-memcpy.c +++ b/tools/perf/bench/mem-memcpy.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include "../perf.h" | 10 | #include "../perf.h" |
11 | #include "../util/util.h" | 11 | #include "../util/util.h" |
12 | #include "../util/parse-options.h" | 12 | #include "../util/parse-options.h" |
13 | #include "../util/string.h" | ||
14 | #include "../util/header.h" | 13 | #include "../util/header.h" |
15 | #include "bench.h" | 14 | #include "bench.h" |
16 | 15 | ||
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 887e8e04a6f9..ee0d91726991 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include "util/cache.h" | 14 | #include "util/cache.h" |
15 | #include <linux/rbtree.h> | 15 | #include <linux/rbtree.h> |
16 | #include "util/symbol.h" | 16 | #include "util/symbol.h" |
17 | #include "util/string.h" | ||
18 | 17 | ||
19 | #include "perf.h" | 18 | #include "perf.h" |
20 | #include "util/debug.h" | 19 | #include "util/debug.h" |
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 80dc444031df..dc61f1b68b40 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include "util/util.h" | 15 | #include "util/util.h" |
16 | #include "util/parse-options.h" | 16 | #include "util/parse-options.h" |
17 | #include "util/parse-events.h" | 17 | #include "util/parse-events.h" |
18 | #include "util/string.h" | ||
19 | 18 | ||
20 | #include "util/header.h" | 19 | #include "util/header.h" |
21 | #include "util/event.h" | 20 | #include "util/event.h" |
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index b13a7e2f839e..6615e09e336f 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include "util/cache.h" | 14 | #include "util/cache.h" |
15 | #include <linux/rbtree.h> | 15 | #include <linux/rbtree.h> |
16 | #include "util/symbol.h" | 16 | #include "util/symbol.h" |
17 | #include "util/string.h" | ||
18 | #include "util/callchain.h" | 17 | #include "util/callchain.h" |
19 | #include "util/strlist.h" | 18 | #include "util/strlist.h" |
20 | #include "util/values.h" | 19 | #include "util/values.h" |
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 0d4d8ff7914b..266e7aa996d3 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include "util/cache.h" | 21 | #include "util/cache.h" |
22 | #include <linux/rbtree.h> | 22 | #include <linux/rbtree.h> |
23 | #include "util/symbol.h" | 23 | #include "util/symbol.h" |
24 | #include "util/string.h" | ||
25 | #include "util/callchain.h" | 24 | #include "util/callchain.h" |
26 | #include "util/strlist.h" | 25 | #include "util/strlist.h" |
27 | 26 | ||
diff --git a/tools/perf/perf.c b/tools/perf/perf.c index 2826e702986e..d4be55b6cd34 100644 --- a/tools/perf/perf.c +++ b/tools/perf/perf.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include "util/quote.h" | 13 | #include "util/quote.h" |
14 | #include "util/run-command.h" | 14 | #include "util/run-command.h" |
15 | #include "util/parse-events.h" | 15 | #include "util/parse-events.h" |
16 | #include "util/string.h" | ||
17 | #include "util/debugfs.h" | 16 | #include "util/debugfs.h" |
18 | 17 | ||
19 | bool use_browser; | 18 | bool use_browser; |
diff --git a/tools/perf/util/string.h b/tools/perf/util/string.h deleted file mode 100644 index 700582416664..000000000000 --- a/tools/perf/util/string.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #ifndef __PERF_STRING_H_ | ||
2 | #define __PERF_STRING_H_ | ||
3 | |||
4 | #include <stdbool.h> | ||
5 | #include "types.h" | ||
6 | |||
7 | s64 perf_atoll(const char *str); | ||
8 | char **argv_split(const char *str, int *argcp); | ||
9 | void argv_free(char **argv); | ||
10 | bool strglobmatch(const char *str, const char *pat); | ||
11 | bool strlazymatch(const char *str, const char *pat); | ||
12 | |||
13 | #define _STR(x) #x | ||
14 | #define STR(x) _STR(x) | ||
15 | |||
16 | #endif /* __PERF_STRING_H */ | ||
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 52701087ce04..fbf45d1b26f7 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h | |||
@@ -42,12 +42,14 @@ | |||
42 | #define _ALL_SOURCE 1 | 42 | #define _ALL_SOURCE 1 |
43 | #define _GNU_SOURCE 1 | 43 | #define _GNU_SOURCE 1 |
44 | #define _BSD_SOURCE 1 | 44 | #define _BSD_SOURCE 1 |
45 | #define HAS_BOOL | ||
45 | 46 | ||
46 | #include <unistd.h> | 47 | #include <unistd.h> |
47 | #include <stdio.h> | 48 | #include <stdio.h> |
48 | #include <sys/stat.h> | 49 | #include <sys/stat.h> |
49 | #include <sys/statfs.h> | 50 | #include <sys/statfs.h> |
50 | #include <fcntl.h> | 51 | #include <fcntl.h> |
52 | #include <stdbool.h> | ||
51 | #include <stddef.h> | 53 | #include <stddef.h> |
52 | #include <stdlib.h> | 54 | #include <stdlib.h> |
53 | #include <stdarg.h> | 55 | #include <stdarg.h> |
@@ -78,6 +80,7 @@ | |||
78 | #include <pwd.h> | 80 | #include <pwd.h> |
79 | #include <inttypes.h> | 81 | #include <inttypes.h> |
80 | #include "../../../include/linux/magic.h" | 82 | #include "../../../include/linux/magic.h" |
83 | #include "types.h" | ||
81 | 84 | ||
82 | 85 | ||
83 | #ifndef NO_ICONV | 86 | #ifndef NO_ICONV |
@@ -415,4 +418,13 @@ void git_qsort(void *base, size_t nmemb, size_t size, | |||
415 | int mkdir_p(char *path, mode_t mode); | 418 | int mkdir_p(char *path, mode_t mode); |
416 | int copyfile(const char *from, const char *to); | 419 | int copyfile(const char *from, const char *to); |
417 | 420 | ||
421 | s64 perf_atoll(const char *str); | ||
422 | char **argv_split(const char *str, int *argcp); | ||
423 | void argv_free(char **argv); | ||
424 | bool strglobmatch(const char *str, const char *pat); | ||
425 | bool strlazymatch(const char *str, const char *pat); | ||
426 | |||
427 | #define _STR(x) #x | ||
428 | #define STR(x) _STR(x) | ||
429 | |||
418 | #endif | 430 | #endif |