Skip to content

Commit b86437b

Browse files
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 <[email protected]> (cherry picked from commit 7944307) Co-authored-by: Senthil Kumaran <[email protected]>
1 parent 20f6d48 commit b86437b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
The ncurses function extended_color_content was introduced in 2017.
2+
https://invisible-island.net/ncurses/NEWS.html#index-t20170401) The
3+
ncurses-devel package in CentOS 7 had a older version ncurses resulted in
4+
compilation error. For compiling ncurses with extended color support, we
5+
verify the version of the ncurses library >= 20170401.

Modules/_cursesmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ typedef chtype attr_t; /* No attr_t type is available */
135135
#define STRICT_SYSV_CURSES
136136
#endif
137137

138-
#if NCURSES_EXT_COLORS+0 && NCURSES_EXT_FUNCS+0
138+
#if NCURSES_EXT_FUNCS+0 >= 20170401 && NCURSES_EXT_COLORS+0 >= 20170401
139139
#define _NCURSES_EXTENDED_COLOR_FUNCS 1
140140
#else
141141
#define _NCURSES_EXTENDED_COLOR_FUNCS 0
142-
#endif /* defined(NCURSES_EXT_COLORS) && defined(NCURSES_EXT_FUNCS) */
142+
#endif
143143

144144
#if _NCURSES_EXTENDED_COLOR_FUNCS
145145
#define _CURSES_COLOR_VAL_TYPE int

0 commit comments

Comments
 (0)