diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2017-11-01 12:35:41 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-11-01 12:35:41 (GMT) |
commit | ff6ae4de3874f4922a5883f08bb661c93834b060 (patch) | |
tree | 4f19cb9363c125dc7f91e180a58234b5ad05de9d /configure | |
parent | 84e252b79eed94bc9e9175f82191322c89e489ad (diff) | |
download | cpython-ff6ae4de3874f4922a5883f08bb661c93834b060.zip cpython-ff6ae4de3874f4922a5883f08bb661c93834b060.tar.gz cpython-ff6ae4de3874f4922a5883f08bb661c93834b060.tar.bz2 |
bpo-25720: Fix the method for checking pad state of curses WINDOW (GH-4164) (#4212)
Modify the code to use ncurses is_pad() instead of checking WINDOW
_flags field. If your platform does not provide the is_pad(), the
existing way that checks the field will be enabled.
Note: This change does not drop support for platforms where do not
have both WINDOW _flags field and is_pad().
(cherry picked from commit 8bc7d63560024681dce9f40445f2877b2987e92c)
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 39 |
1 files changed, 38 insertions, 1 deletions
@@ -15897,6 +15897,10 @@ $as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h fi +# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque +# structs since version 5.7. If the macro is defined as zero before including +# [n]curses.h, ncurses will expose fields of the structs regardless of the +# configuration. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5 $as_echo_n "checking whether WINDOW has _flags... " >&6; } if ${ac_cv_window_has_flags+:} false; then : @@ -15904,7 +15908,10 @@ if ${ac_cv_window_has_flags+:} false; then : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <curses.h> + + #define NCURSES_OPAQUE 0 + #include <curses.h> + int main () { @@ -15935,6 +15942,36 @@ $as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5 +$as_echo_n "checking for is_pad... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <curses.h> +int +main () +{ + +#ifndef is_pad +void *x=is_pad +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5 $as_echo_n "checking for is_term_resized... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext |