diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:49:45 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:49:45 +0000 |
commit | 2c3c1048746a4622d8c89a29670120dc8fab93c4 (patch) | |
tree | 848558de17fb3008cdf4d861b01ac7781903ce39 /tools/perf/ui/libslang.h | |
parent | Initial commit. (diff) | |
download | linux-upstream.tar.xz linux-upstream.zip |
Adding upstream version 6.1.76.upstream/6.1.76upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/perf/ui/libslang.h')
-rw-r--r-- | tools/perf/ui/libslang.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tools/perf/ui/libslang.h b/tools/perf/ui/libslang.h new file mode 100644 index 000000000..991e692b9 --- /dev/null +++ b/tools/perf/ui/libslang.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#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 + +#ifdef HAVE_SLANG_INCLUDE_SUBDIR +#include <slang/slang.h> +#else +#include <slang.h> +#endif + +#if SLANG_VERSION < 20104 +#define slsmg_printf(msg, args...) \ + SLsmg_printf((char *)(msg), ##args) +#define slsmg_vprintf(msg, vargs) \ + SLsmg_vprintf((char *)(msg), vargs) +#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_vprintf SLsmg_vprintf +#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_ */ |