diff options
Diffstat (limited to 'tools/perf/util/cache.h')
-rw-r--r-- | tools/perf/util/cache.h | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h index ab1769426541..2bd51370ad28 100644 --- a/tools/perf/util/cache.h +++ b/tools/perf/util/cache.h | |||
@@ -33,39 +33,41 @@ extern int pager_use_color; | |||
33 | 33 | ||
34 | extern int use_browser; | 34 | extern int use_browser; |
35 | 35 | ||
36 | #if defined(NO_NEWT_SUPPORT) && defined(NO_GTK2_SUPPORT) | 36 | #if defined(NEWT_SUPPORT) || defined(GTK2_SUPPORT) |
37 | static inline void setup_browser(bool fallback_to_pager) | ||
38 | { | ||
39 | if (fallback_to_pager) | ||
40 | setup_pager(); | ||
41 | } | ||
42 | static inline void exit_browser(bool wait_for_ok __maybe_unused) {} | ||
43 | #else | ||
44 | void setup_browser(bool fallback_to_pager); | 37 | void setup_browser(bool fallback_to_pager); |
45 | void exit_browser(bool wait_for_ok); | 38 | void exit_browser(bool wait_for_ok); |
46 | 39 | ||
47 | #ifdef NO_NEWT_SUPPORT | 40 | #ifdef NEWT_SUPPORT |
41 | int ui__init(void); | ||
42 | void ui__exit(bool wait_for_ok); | ||
43 | #else | ||
48 | static inline int ui__init(void) | 44 | static inline int ui__init(void) |
49 | { | 45 | { |
50 | return -1; | 46 | return -1; |
51 | } | 47 | } |
52 | static inline void ui__exit(bool wait_for_ok __maybe_unused) {} | 48 | static inline void ui__exit(bool wait_for_ok __maybe_unused) {} |
53 | #else | ||
54 | int ui__init(void); | ||
55 | void ui__exit(bool wait_for_ok); | ||
56 | #endif | 49 | #endif |
57 | 50 | ||
58 | #ifdef NO_GTK2_SUPPORT | 51 | #ifdef GTK2_SUPPORT |
52 | int perf_gtk__init(void); | ||
53 | void perf_gtk__exit(bool wait_for_ok); | ||
54 | #else | ||
59 | static inline int perf_gtk__init(void) | 55 | static inline int perf_gtk__init(void) |
60 | { | 56 | { |
61 | return -1; | 57 | return -1; |
62 | } | 58 | } |
63 | static inline void perf_gtk__exit(bool wait_for_ok __maybe_unused) {} | 59 | static inline void perf_gtk__exit(bool wait_for_ok __maybe_unused) {} |
64 | #else | ||
65 | int perf_gtk__init(void); | ||
66 | void perf_gtk__exit(bool wait_for_ok); | ||
67 | #endif | 60 | #endif |
68 | #endif /* NO_NEWT_SUPPORT && NO_GTK2_SUPPORT */ | 61 | |
62 | #else /* NEWT_SUPPORT || GTK2_SUPPORT */ | ||
63 | |||
64 | static inline void setup_browser(bool fallback_to_pager) | ||
65 | { | ||
66 | if (fallback_to_pager) | ||
67 | setup_pager(); | ||
68 | } | ||
69 | static inline void exit_browser(bool wait_for_ok __maybe_unused) {} | ||
70 | #endif /* NEWT_SUPPORT || GTK2_SUPPORT */ | ||
69 | 71 | ||
70 | char *alias_lookup(const char *alias); | 72 | char *alias_lookup(const char *alias); |
71 | int split_cmdline(char *cmdline, const char ***argv); | 73 | int split_cmdline(char *cmdline, const char ***argv); |
@@ -105,7 +107,7 @@ extern char *perf_path(const char *fmt, ...) __attribute__((format (printf, 1, 2 | |||
105 | extern char *perf_pathdup(const char *fmt, ...) | 107 | extern char *perf_pathdup(const char *fmt, ...) |
106 | __attribute__((format (printf, 1, 2))); | 108 | __attribute__((format (printf, 1, 2))); |
107 | 109 | ||
108 | #ifdef NO_STRLCPY | 110 | #ifndef HAVE_STRLCPY |
109 | extern size_t strlcpy(char *dest, const char *src, size_t size); | 111 | extern size_t strlcpy(char *dest, const char *src, size_t size); |
110 | #endif | 112 | #endif |
111 | 113 | ||