summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/ui/libslang.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-08-10 14:54:09 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-08-10 16:09:41 -0300
commit211ef12771e759a08e10c3c606e6a8b1663519e7 (patch)
treef9881f574f9a7508ce47d125daad0a089bef5add /tools/perf/util/ui/libslang.h
parent34cea7f7c0620c964676eece258ef431a6608bce (diff)
perf ui: Move annotate browser to util/ui/browsers/
LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/ui/libslang.h')
-rw-r--r--tools/perf/util/ui/libslang.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/perf/util/ui/libslang.h b/tools/perf/util/ui/libslang.h
new file mode 100644
index 00000000000..5623da8e808
--- /dev/null
+++ b/tools/perf/util/ui/libslang.h
@@ -0,0 +1,27 @@
+#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 <features.h>
+#ifndef HAVE_LONG_LONG
+#define HAVE_LONG_LONG __GLIBC_HAVE_LONG_LONG
+#endif
+#include <slang.h>
+
+#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
+
+#endif /* _PERF_UI_SLANG_H_ */