blob: 2b63e1c9b181f679e75293bcb4e47111a6d3c76a [file] [log] [blame]
Arnaldo Carvalho de Melo211ef122010-08-10 14:54:09 -03001#ifndef _PERF_UI_SLANG_H_
2#define _PERF_UI_SLANG_H_ 1
3/*
4 * slang versions <= 2.0.6 have a "#if HAVE_LONG_LONG" that breaks
5 * the build if it isn't defined. Use the equivalent one that glibc
6 * has on features.h.
7 */
8#include <features.h>
9#ifndef HAVE_LONG_LONG
10#define HAVE_LONG_LONG __GLIBC_HAVE_LONG_LONG
11#endif
12#include <slang.h>
13
14#if SLANG_VERSION < 20104
15#define slsmg_printf(msg, args...) \
Yinghai Lucdb08612011-02-01 10:51:23 -080016 SLsmg_printf((char *)(msg), ##args)
Arnaldo Carvalho de Melo211ef122010-08-10 14:54:09 -030017#define slsmg_write_nstring(msg, len) \
Yinghai Lucdb08612011-02-01 10:51:23 -080018 SLsmg_write_nstring((char *)(msg), len)
Arnaldo Carvalho de Melo211ef122010-08-10 14:54:09 -030019#define sltt_set_color(obj, name, fg, bg) \
Yinghai Lucdb08612011-02-01 10:51:23 -080020 SLtt_set_color(obj,(char *)(name), (char *)(fg), (char *)(bg))
Arnaldo Carvalho de Melo211ef122010-08-10 14:54:09 -030021#else
22#define slsmg_printf SLsmg_printf
23#define slsmg_write_nstring SLsmg_write_nstring
24#define sltt_set_color SLtt_set_color
25#endif
26
27#endif /* _PERF_UI_SLANG_H_ */