summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-09-09 19:38:54 (GMT)
committerGitHub <noreply@github.com>2021-09-09 19:38:54 (GMT)
commitb86437bb15fbaba55f9e56661598b4d5a3db86bb (patch)
tree0cfe46670643bf5036a4b117f312dcf87772d127 /Modules
parent20f6d485ec64aa0f228b902e4c519a423276d90f (diff)
downloadcpython-b86437bb15fbaba55f9e56661598b4d5a3db86bb.zip
cpython-b86437bb15fbaba55f9e56661598b4d5a3db86bb.tar.gz
cpython-b86437bb15fbaba55f9e56661598b4d5a3db86bb.tar.bz2
bpo-45067 - Verify the version of ncurses for extended color support feature usage. (GH-28260)
* issue45067 - Fix _curses compilation in CentOS 7. Verify the version of ncurses for extended color support feature usage. The function extended_color_content was introduced in 2017. The ncurses-devel package in CentOS 7 had a older version ncurses resulted in compilation error. For compiling ncurses with extended color support, we verify the version of the ncurses library. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> (cherry picked from commit 794430700defb913512f871b701a888aa730de81) Co-authored-by: Senthil Kumaran <senthil@python.org>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_cursesmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 61aaf85..511073f 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -135,11 +135,11 @@ typedef chtype attr_t; /* No attr_t type is available */
#define STRICT_SYSV_CURSES
#endif
-#if NCURSES_EXT_COLORS+0 && NCURSES_EXT_FUNCS+0
+#if NCURSES_EXT_FUNCS+0 >= 20170401 && NCURSES_EXT_COLORS+0 >= 20170401
#define _NCURSES_EXTENDED_COLOR_FUNCS 1
#else
#define _NCURSES_EXTENDED_COLOR_FUNCS 0
-#endif /* defined(NCURSES_EXT_COLORS) && defined(NCURSES_EXT_FUNCS) */
+#endif
#if _NCURSES_EXTENDED_COLOR_FUNCS
#define _CURSES_COLOR_VAL_TYPE int