Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6953233

Browse files
committed
Check for term.h and include it on non-ncurses system to get a declaration
for tigetstr.
1 parent 1c07b4b commit 6953233

4 files changed

Lines changed: 10 additions & 3 deletions

File tree

Include/py_curses.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
#include <ncurses.h>
77
#else
88
#include <curses.h>
9+
#ifdef HAVE_TERM_H
10+
/* for tigetstr, which is not declared in SysV curses */
11+
#include <term.h>
12+
#endif
913
#endif
1014

1115
#ifdef __cplusplus

configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22

3-
# From configure.in Revision: 1.265
3+
# From configure.in Revision: 1.266
44

55
# Guess values for system-dependent variables and create Makefiles.
66
# Generated automatically using autoconf version 2.13
@@ -1903,7 +1903,7 @@ ncurses.h poll.h pthread.h \
19031903
signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
19041904
sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
19051905
sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
1906-
sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
1906+
sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
19071907
ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
19081908
do
19091909
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`

configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ ncurses.h poll.h pthread.h \
448448
signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
449449
sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
450450
sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
451-
sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
451+
sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
452452
ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h)
453453
AC_HEADER_DIRENT
454454

pyconfig.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,9 @@
699699
/* Define if you have the <sys/wait.h> header file. */
700700
#undef HAVE_SYS_WAIT_H
701701

702+
/* Define if you have the <term.h> header file. */
703+
#undef HAVE_TERM_H
704+
702705
/* Define if you have the <termios.h> header file. */
703706
#undef HAVE_TERMIOS_H
704707

0 commit comments

Comments
 (0)