diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index 7961013c1..b2b47c0d3 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -173,10 +173,9 @@ check_cxx_symbol_exists(wcstod_l "${WCSTOD_L_INCLUDES}" HAVE_WCSTOD_L) check_cxx_symbol_exists(uselocale "locale.h;xlocale.h" HAVE_USELOCALE) cmake_push_check_state() -set(CMAKE_EXTRA_INCLUDE_FILES termios.h sys/ioctl.h) -check_type_size("struct winsize" STRUCT_WINSIZE LANGUAGE CXX) +check_struct_has_member("struct winsize" ws_row "termios.h;sys/ioctl.h" _HAVE_WINSIZE) check_cxx_symbol_exists("TIOCGWINSZ" "termios.h;sys/ioctl.h" HAVE_TIOCGWINSZ) -if(STRUCT_WINSIZE GREATER -1 AND HAVE_TIOCGWINSZ EQUAL 1) +if(_HAVE_WINSIZE EQUAL 1 AND HAVE_TIOCGWINSZ EQUAL 1) set(HAVE_WINSIZE 1) endif() cmake_pop_check_state()