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

Skip to content

Commit ae2830c

Browse files
committed
Patch #1012280: Include curses.h for term.h check. Fixes #933795.
Will backport to 2.3.
1 parent f3c5611 commit ae2830c

3 files changed

Lines changed: 74 additions & 5 deletions

File tree

configure

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /bin/sh
2-
# From configure.in Revision: 1.468 .
2+
# From configure.in Revision: 1.469 .
33
# Guess values for system-dependent variables and create Makefiles.
44
# Generated by GNU Autoconf 2.59 for python 2.4.
55
#
@@ -4532,13 +4532,13 @@ done
45324532

45334533

45344534

4535-
for ac_header in dlfcn.h fcntl.h grp.h langinfo.h \
4535+
for ac_header in curses.h dlfcn.h fcntl.h grp.h langinfo.h \
45364536
libintl.h ncurses.h poll.h pthread.h \
45374537
stropts.h termios.h thread.h \
45384538
unistd.h utime.h \
45394539
sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
45404540
sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
4541-
sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
4541+
sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
45424542
sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
45434543
bluetooth/bluetooth.h
45444544
do
@@ -5374,6 +5374,69 @@ fi
53745374
fi
53755375

53765376

5377+
# On Solaris, term.h requires curses.h
5378+
5379+
for ac_header in term.h
5380+
do
5381+
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5382+
echo "$as_me:$LINENO: checking for $ac_header" >&5
5383+
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5384+
if eval "test \"\${$as_ac_Header+set}\" = set"; then
5385+
echo $ECHO_N "(cached) $ECHO_C" >&6
5386+
else
5387+
cat >conftest.$ac_ext <<_ACEOF
5388+
/* confdefs.h. */
5389+
_ACEOF
5390+
cat confdefs.h >>conftest.$ac_ext
5391+
cat >>conftest.$ac_ext <<_ACEOF
5392+
/* end confdefs.h. */
5393+
#include <curses.h>
5394+
5395+
#include <$ac_header>
5396+
_ACEOF
5397+
rm -f conftest.$ac_objext
5398+
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5399+
(eval $ac_compile) 2>conftest.er1
5400+
ac_status=$?
5401+
grep -v '^ *+' conftest.er1 >conftest.err
5402+
rm -f conftest.er1
5403+
cat conftest.err >&5
5404+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5405+
(exit $ac_status); } &&
5406+
{ ac_try='test -z "$ac_c_werror_flag"
5407+
|| test ! -s conftest.err'
5408+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5409+
(eval $ac_try) 2>&5
5410+
ac_status=$?
5411+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5412+
(exit $ac_status); }; } &&
5413+
{ ac_try='test -s conftest.$ac_objext'
5414+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5415+
(eval $ac_try) 2>&5
5416+
ac_status=$?
5417+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5418+
(exit $ac_status); }; }; then
5419+
eval "$as_ac_Header=yes"
5420+
else
5421+
echo "$as_me: failed program was:" >&5
5422+
sed 's/^/| /' conftest.$ac_ext >&5
5423+
5424+
eval "$as_ac_Header=no"
5425+
fi
5426+
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5427+
fi
5428+
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5429+
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5430+
if test `eval echo '${'$as_ac_Header'}'` = yes; then
5431+
cat >>confdefs.h <<_ACEOF
5432+
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5433+
_ACEOF
5434+
5435+
fi
5436+
5437+
done
5438+
5439+
53775440
# checks for typedefs
53785441
was_it_defined=no
53795442
echo "$as_me:$LINENO: checking for clock_t in time.h" >&5

configure.in

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -955,18 +955,21 @@ dnl AC_MSG_RESULT($cpp_type)
955955

956956
# checks for header files
957957
AC_HEADER_STDC
958-
AC_CHECK_HEADERS(dlfcn.h fcntl.h grp.h langinfo.h \
958+
AC_CHECK_HEADERS(curses.h dlfcn.h fcntl.h grp.h langinfo.h \
959959
libintl.h ncurses.h poll.h pthread.h \
960960
stropts.h termios.h thread.h \
961961
unistd.h utime.h \
962962
sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
963963
sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
964-
sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
964+
sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
965965
sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
966966
bluetooth/bluetooth.h)
967967
AC_HEADER_DIRENT
968968
AC_HEADER_MAJOR
969969

970+
# On Solaris, term.h requires curses.h
971+
AC_CHECK_HEADERS(term.h,,,[#include <curses.h>])
972+
970973
# checks for typedefs
971974
was_it_defined=no
972975
AC_MSG_CHECKING(for clock_t in time.h)

pyconfig.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@
7676
/* Define if you have the 'ctermid_r' function. */
7777
#undef HAVE_CTERMID_R
7878

79+
/* Define to 1 if you have the <curses.h> header file. */
80+
#undef HAVE_CURSES_H
81+
7982
/* Define to 1 if you have the device macros. */
8083
#undef HAVE_DEVICE_MACROS
8184

0 commit comments

Comments
 (0)