Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-91962: Fix curses compilation on Solaris #91964

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions setup.py
Expand Up @@ -82,6 +82,7 @@ def get_platform():
MS_WINDOWS = (HOST_PLATFORM == 'win32')
CYGWIN = (HOST_PLATFORM == 'cygwin')
MACOS = (HOST_PLATFORM == 'darwin')
SOLARIS = (HOST_PLATFORM == 'sunos5')
AIX = (HOST_PLATFORM.startswith('aix'))
VXWORKS = ('vxworks' in HOST_PLATFORM)
EMSCRIPTEN = HOST_PLATFORM == 'emscripten-wasm32'
Expand Down Expand Up @@ -1140,6 +1141,13 @@ def detect_readline_curses(self):
curses_defines.append(('HAVE_NCURSESW', '1'))
curses_defines.append(('_XOPEN_SOURCE_EXTENDED', '1'))

if SOLARIS and curses_library.startswith('ncurses'):
# While libncurses on Solaris doesn't have 'w' in its name, it's
# compiled with wide character support
curses_defines.append(('HAVE_NCURSESW', '1'))
curses_defines.append(('_XOPEN_SOURCE_EXTENDED', '1'))
curses_includes.append('/usr/include/ncurses')

curses_enabled = True
if curses_library.startswith('ncurses'):
curses_libs = [curses_library]
Expand Down