From aca7a94d6a59d6bf2600768e752f971c6cc0ab57 Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Wed, 4 Apr 2012 00:14:26 -0700 Subject: perf tools: Move UI bits to tools/perf/ui directory Move those files to new directory in order to be prepared to further UI work. Makefile and header file pathes are adjusted accordingly. Signed-off-by: Namhyung Kim Suggested-by: Arnaldo Carvalho de Melo Acked-by: Pekka Enberg Cc: Ingo Molnar Cc: Namhyung Kim Cc: Paul Mackerras Cc: Pekka Enberg Cc: Peter Zijlstra --- tools/perf/ui/libslang.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tools/perf/ui/libslang.h (limited to 'tools/perf/ui/libslang.h') diff --git a/tools/perf/ui/libslang.h b/tools/perf/ui/libslang.h new file mode 100644 index 000000000000..4d54b6450f5b --- /dev/null +++ b/tools/perf/ui/libslang.h @@ -0,0 +1,29 @@ +#ifndef _PERF_UI_SLANG_H_ +#define _PERF_UI_SLANG_H_ 1 +/* + * slang versions <= 2.0.6 have a "#if HAVE_LONG_LONG" that breaks + * the build if it isn't defined. Use the equivalent one that glibc + * has on features.h. + */ +#include +#ifndef HAVE_LONG_LONG +#define HAVE_LONG_LONG __GLIBC_HAVE_LONG_LONG +#endif +#include + +#if SLANG_VERSION < 20104 +#define slsmg_printf(msg, args...) \ + SLsmg_printf((char *)(msg), ##args) +#define slsmg_write_nstring(msg, len) \ + SLsmg_write_nstring((char *)(msg), len) +#define sltt_set_color(obj, name, fg, bg) \ + SLtt_set_color(obj,(char *)(name), (char *)(fg), (char *)(bg)) +#else +#define slsmg_printf SLsmg_printf +#define slsmg_write_nstring SLsmg_write_nstring +#define sltt_set_color SLtt_set_color +#endif + +#define SL_KEY_UNTAB 0x1000 + +#endif /* _PERF_UI_SLANG_H_ */ -- cgit v1.2.3-59-g8ed1b