ncurses 5.6 - patch 20080913

+ change shared-library configuration for OpenBSD, make rpath work.
+ build-fixes for using libutf8, e.g., on OpenBSD 3.7
This commit is contained in:
Thomas E. Dickey 2008-09-14 01:09:37 +00:00
parent 057900a2db
commit d736364fc0
10 changed files with 1539 additions and 1379 deletions

6
NEWS
View File

@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: NEWS,v 1.1288 2008/09/07 14:39:15 tom Exp $
-- $Id: NEWS,v 1.1289 2008/09/08 20:31:19 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
@ -45,6 +45,10 @@ See the AUTHORS file for the corresponding full names.
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
20080913
+ change shared-library configuration for OpenBSD, make rpath work.
+ build-fixes for using libutf8, e.g., on OpenBSD 3.7
20080907
+ corrected fix for --enable-weak-symbols (report by Frederic L W
Meunier).

179
aclocal.m4 vendored
View File

@ -28,7 +28,7 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
dnl $Id: aclocal.m4,v 1.457 2008/09/06 21:36:49 tom Exp $
dnl $Id: aclocal.m4,v 1.463 2008/09/13 16:54:28 tom Exp $
dnl Macros used in NCURSES auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
@ -945,6 +945,20 @@ if test "$with_no_leaks" = yes ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_ENABLE_RPATH version: 1 updated: 2008/09/13 10:22:30
dnl ---------------
dnl Check if the rpath option should be used, setting cache variable
dnl cf_cv_ld_rpath if so.
AC_DEFUN([CF_ENABLE_RPATH],
[
AC_MSG_CHECKING(if rpath option should be used)
AC_ARG_ENABLE(rpath,
[ --enable-rpath use rpath option when generating shared libraries],
[cf_cv_ld_rpath=$enableval],
[cf_cv_ld_rpath=no])
AC_MSG_RESULT($cf_cv_ld_rpath)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_ERRNO version: 5 updated: 1997/11/30 12:44:39
dnl --------
dnl Check if 'errno' is declared in <errno.h>
@ -2045,22 +2059,24 @@ if test "$cf_cv_libutf8" = yes ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_LIB_PREFIX version: 7 updated: 2001/01/12 01:23:48
dnl CF_LIB_PREFIX version: 8 updated: 2008/09/13 11:34:16
dnl -------------
dnl Compute the library-prefix for the given host system
dnl $1 = variable to set
AC_DEFUN([CF_LIB_PREFIX],
[
case $cf_cv_system_name in
OS/2*) LIB_PREFIX='' ;;
os2*) LIB_PREFIX='' ;;
*) LIB_PREFIX='lib' ;;
case $cf_cv_system_name in #(vi
OS/2*|os2*) #(vi
LIB_PREFIX=''
;;
*) LIB_PREFIX='lib'
;;
esac
ifelse($1,,,[$1=$LIB_PREFIX])
AC_SUBST(LIB_PREFIX)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_LIB_RULES version: 50 updated: 2007/03/24 18:26:59
dnl CF_LIB_RULES version: 51 updated: 2008/09/13 11:34:16
dnl ------------
dnl Append definitions and rules for the given models to the subdirectory
dnl Makefiles, and the recursion rule for the top-level Makefile. If the
@ -2087,7 +2103,7 @@ do
LIBS_TO_MAKE=
for cf_item in $cf_LIST_MODELS
do
CF_LIB_SUFFIX($cf_item,cf_suffix)
CF_LIB_SUFFIX($cf_item,cf_suffix,cf_depsuf)
if test $cf_item = shared ; then
if test "$cf_cv_do_symlinks" = yes ; then
case "$cf_cv_shlib_version" in #(vi
@ -2181,7 +2197,7 @@ do
do
echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
CF_UPPER(cf_ITEM,$cf_item)
CF_LIB_SUFFIX($cf_item,cf_suffix)
CF_LIB_SUFFIX($cf_item,cf_suffix,cf_depsuf)
CF_OBJ_SUBDIR($cf_item,cf_subdir)
# Test for case where we build libtinfo with a different name.
@ -2513,34 +2529,62 @@ fi
])
])
dnl ---------------------------------------------------------------------------
dnl CF_LIB_SUFFIX version: 13 updated: 2003/11/01 16:09:07
dnl CF_LIB_SUFFIX version: 15 updated: 2008/09/13 11:54:48
dnl -------------
dnl Compute the library file-suffix from the given model name
dnl $1 = model name
dnl $2 = variable to set
dnl $2 = variable to set (the nominal library suffix)
dnl $3 = dependency variable to set (actual filename)
dnl The variable $LIB_SUFFIX, if set, prepends the variable to set.
AC_DEFUN([CF_LIB_SUFFIX],
[
AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
case $1 in
libtool) $2='.la' ;;
normal) $2='.a' ;;
debug) $2='_g.a' ;;
profile) $2='_p.a' ;;
libtool)
$2='.la'
$3=[$]$2
;;
normal)
$2='.a'
$3=[$]$2
;;
debug)
$2='_g.a'
$3=[$]$2
;;
profile)
$2='_p.a'
$3=[$]$2
;;
shared)
case $cf_cv_system_name in
cygwin*) $2='.dll' ;;
darwin*) $2='.dylib' ;;
cygwin*)
$2='.dll'
$3='.dll.a'
;;
darwin*)
$2='.dylib'
$3=[$]$2
;;
hpux*)
case $target in
ia64*) $2='.so' ;;
*) $2='.sl' ;;
ia64*)
$2='.so'
$3=[$]$2
;;
*)
$2='.sl'
$3=[$]$2
;;
esac
;;
*) $2='.so' ;;
*) $2='.so'
$3=[$]$2
;;
esac
esac
test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
test -n "$LIB_SUFFIX" && $3="${LIB_SUFFIX}[$]{$3}"
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_LIB_TYPE version: 4 updated: 2000/10/20 22:57:49
@ -3902,7 +3946,7 @@ define([CF_REMOVE_LIB],
$1=`echo "$2" | sed -e 's/-l$3[[ ]]//g' -e 's/-l$3[$]//'`
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_RPATH_HACK version: 3 updated: 2007/12/01 11:14:13
dnl CF_RPATH_HACK version: 4 updated: 2008/09/13 12:53:26
dnl -------------
AC_DEFUN([CF_RPATH_HACK],
[
@ -3914,48 +3958,46 @@ CF_VERBOSE(...checking LDFLAGS $LDFLAGS)
CF_VERBOSE(...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS)
case "$EXTRA_LDFLAGS" in #(vi
-Wl,-rpath,*) #(vi
cf_rpath_hack="-Wl,-rpath,"
;;
cf_rpath_hack="-Wl,-rpath,"
;;
-R\ *)
cf_rpath_hack="-R "
;;
cf_rpath_hack="-R "
;;
-R*)
cf_rpath_hack="-R"
;;
cf_rpath_hack="-R"
;;
*)
cf_rpath_hack=
;;
cf_rpath_hack=
;;
esac
if test -n "$cf_rpath_hack" ; then
cf_rpath_dst=
for cf_rpath_src in $LDFLAGS
do
CF_VERBOSE(Filtering $cf_rpath_src)
case $cf_rpath_src in #(vi
-L*) #(vi
if test "$cf_rpath_hack" = "-R " ; then
cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
else
cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
fi
CF_VERBOSE(...Filter $cf_rpath_tmp)
EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
;;
*)
cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
;;
esac
done
LDFLAGS=$cf_rpath_dst
CF_VERBOSE(...checked LDFLAGS $LDFLAGS)
CF_VERBOSE(...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS)
cf_rpath_dst=
for cf_rpath_src in $LDFLAGS
do
CF_VERBOSE(Filtering $cf_rpath_src)
case $cf_rpath_src in #(vi
-L*) #(vi
if test "$cf_rpath_hack" = "-R " ; then
cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
else
cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
fi
CF_VERBOSE(...Filter $cf_rpath_tmp)
EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
;;
esac
cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
done
LDFLAGS=$cf_rpath_dst
CF_VERBOSE(...checked LDFLAGS $LDFLAGS)
CF_VERBOSE(...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS)
fi
else
AC_MSG_RESULT(no)
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_SHARED_OPTS version: 49 updated: 2008/09/06 17:36:03
dnl CF_SHARED_OPTS version: 52 updated: 2008/09/13 11:54:48
dnl --------------
dnl --------------
dnl Attempt to determine the appropriate CC/LD options for creating a shared
@ -4090,9 +4132,9 @@ CF_EOF
# tested with IRIX 5.2 and 'cc'.
if test "$GCC" != yes; then
CC_SHARED_OPTS='-KPIC'
MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $[@]` -o $[@]'
else
MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $[@]` -o $[@]'
MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $[@]` -o $[@]'
else
MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $[@]` -o $[@]'
fi
cf_cv_rm_so_locs=yes
;;
@ -4106,11 +4148,20 @@ CF_EOF
EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
fi
CF_SHARED_SONAME
MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $[@]'
MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
;;
openbsd[[2-9]].*)
if test "$DFT_LWR_MODEL" = "shared" ; then
LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
fi
if test "$cf_cv_ld_rpath" = yes ; then
cf_ld_rpath_opt="-Wl,-rpath,"
EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
fi
CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $[@].${ABI_VERSION}` -o $[@]'
CF_SHARED_SONAME
MK_SHARED_LIB='${CC} ${CFLAGS} -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
;;
openbsd*|freebsd[[12]].*)
CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
@ -4143,7 +4194,7 @@ CF_EOF
fi
fi
CF_SHARED_SONAME
MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname' -o $[@]'
MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $[@]'
else
MK_SHARED_LIB='${LD} -Bshareable -o $[@]'
fi
@ -4205,9 +4256,9 @@ CF_EOF
CF_SHARED_SONAME
if test "$GCC" != yes; then
CC_SHARED_OPTS='-xcode=pic32'
MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $[@]'
MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $[@]'
else
MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_shared_soname' -o $[@]'
MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $[@]'
fi
;;
sysv5uw7*|unix_sv*)
@ -4259,9 +4310,9 @@ CF_EOF
AC_SUBST(INSTALL_LIB)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_SHARED_SONAME version: 2 updated: 2006/10/21 12:33:41
dnl CF_SHARED_SONAME version: 3 updated: 2008/09/08 18:34:43
dnl ----------------
dnl utility macro for CF_SHARED_OPTS, constructs "$cf_shared_soname" for
dnl utility macro for CF_SHARED_OPTS, constructs "$cf_cv_shared_soname" for
dnl substitution into MK_SHARED_LIB string for the "-soname" (or similar)
dnl option.
dnl
@ -4271,9 +4322,9 @@ define([CF_SHARED_SONAME],
[
test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=ifelse($1,,rel,$1)
if test "$cf_cv_shlib_version" = rel; then
cf_shared_soname='`basename $[@] .${REL_VERSION}`.${ABI_VERSION}'
cf_cv_shared_soname='`basename $[@] .${REL_VERSION}`.${ABI_VERSION}'
else
cf_shared_soname='`basename $[@]`'
cf_cv_shared_soname='`basename $[@]`'
fi
])
dnl ---------------------------------------------------------------------------

2676
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -28,14 +28,14 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
dnl $Id: configure.in,v 1.446 2008/09/06 21:02:20 tom Exp $
dnl $Id: configure.in,v 1.450 2008/09/13 15:03:24 tom Exp $
dnl Process this file with autoconf to produce a configure script.
dnl
dnl See http://invisible-island.net/autoconf/ for additional information.
dnl
dnl ---------------------------------------------------------------------------
AC_PREREQ(2.13.20020210)
AC_REVISION($Revision: 1.446 $)
AC_REVISION($Revision: 1.450 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
@ -361,12 +361,7 @@ AC_MSG_RESULT($LD_MODEL)
case $DFT_LWR_MODEL in
shared)
AC_MSG_CHECKING(if rpath option should be used)
AC_ARG_ENABLE(rpath,
[ --enable-rpath use rpath option when generating shared libraries],
[cf_cv_ld_rpath=$enableval],
[cf_cv_ld_rpath=no])
AC_MSG_RESULT($cf_cv_ld_rpath)
CF_ENABLE_RPATH
AC_MSG_CHECKING(if shared libraries should be relinked during install)
AC_ARG_ENABLE(relink,
[ --disable-relink relink shared libraries during install],
@ -1568,16 +1563,7 @@ AC_SUBST(DFT_ARG_SUFFIX)dnl the string to append to "-lncurses" ("")
AC_MSG_RESULT($DFT_ARG_SUFFIX)
AC_MSG_CHECKING(default library-dependency suffix)
CF_LIB_SUFFIX($DFT_LWR_MODEL,DFT_DEP_SUFFIX)dnl
DFT_LIB_SUFFIX=$DFT_DEP_SUFFIX
if test $DFT_LWR_MODEL = shared ; then
case $cf_cv_system_name in #(vi
cygwin*)
DFT_DEP_SUFFIX=".dll.a"
DFT_LIB_SUFFIX=".dll"
;;
esac
fi
CF_LIB_SUFFIX($DFT_LWR_MODEL,DFT_LIB_SUFFIX,DFT_DEP_SUFFIX)dnl
AC_SUBST(DFT_DEP_SUFFIX)dnl the corresponding library-suffix (".a")
AC_MSG_RESULT($DFT_DEP_SUFFIX)
@ -1592,7 +1578,7 @@ AC_MSG_CHECKING(c++ library-dependency suffix)
if test "$with_libtool" != "no"; then
CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
else
CF_LIB_SUFFIX(normal,CXX_LIB_SUFFIX)dnl we normally make a static library
CF_LIB_SUFFIX(normal,CXX_LIB_SUFFIX,CXX_DEP_SUFFIX)dnl we normally make a static library
fi
AC_MSG_RESULT($CXX_LIB_SUFFIX)
AC_SUBST(CXX_LIB_SUFFIX)
@ -1812,6 +1798,7 @@ cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
cf_cv_rel_version="$cf_cv_rel_version"
cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
cf_cv_shared_soname='$cf_cv_shared_soname'
cf_cv_shlib_version="$cf_cv_shlib_version"
cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
cf_cv_system_name="$cf_cv_system_name"

View File

@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: dist.mk,v 1.659 2008/09/07 13:57:51 tom Exp $
# $Id: dist.mk,v 1.660 2008/09/08 19:46:14 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
@ -37,7 +37,7 @@ SHELL = /bin/sh
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 5
NCURSES_MINOR = 6
NCURSES_PATCH = 20080907
NCURSES_PATCH = 20080913
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
* Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -30,7 +30,7 @@
* Author: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
/* $Id: form.priv.h,v 0.26 2006/12/17 19:47:09 tom Exp $ */
/* $Id: form.priv.h,v 0.27 2008/09/08 20:29:05 tom Exp $ */
#ifndef FORM_PRIV_H
#define FORM_PRIV_H 1
@ -39,8 +39,6 @@
#include "mf_common.h"
#if USE_WIDEC_SUPPORT
#include <wchar.h>
#if HAVE_WCTYPE_H
#include <wctype.h>
#endif

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
* Copyright (c) 1998-2005,2008 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -37,7 +37,7 @@
#include "menu.priv.h"
MODULE_ID("$Id: m_req_name.c,v 1.19 2005/04/16 16:59:52 tom Exp $")
MODULE_ID("$Id: m_req_name.c,v 1.20 2008/09/13 18:59:17 tom Exp $")
static const char *request_names[MAX_MENU_COMMAND - MIN_MENU_COMMAND + 1] =
{
@ -109,7 +109,7 @@ menu_request_by_name(const char *str)
strncpy(buf, str, sizeof(buf));
while ((i < sizeof(buf)) && (buf[i] != '\0'))
{
buf[i] = toupper(buf[i]);
buf[i] = toupper(UChar(buf[i]));
i++;
}

View File

@ -44,7 +44,7 @@
#include <dump_entry.h>
#include <transform.h>
MODULE_ID("$Id: tic.c,v 1.136 2008/08/16 21:52:36 tom Exp $")
MODULE_ID("$Id: tic.c,v 1.137 2008/09/13 16:59:24 tom Exp $")
const char *_nc_progname = "tic";
@ -99,7 +99,7 @@ free_namelist(char **src)
#endif
static void
cleanup(char **namelst)
cleanup(char **namelst GCC_UNUSED)
{
#if NO_LEAKS
free_namelist(namelst);

View File

@ -104,7 +104,7 @@ char *ttyname(int fd);
#include <dump_entry.h>
#include <transform.h>
MODULE_ID("$Id: tset.c,v 1.73 2008/08/04 12:47:05 tom Exp $")
MODULE_ID("$Id: tset.c,v 1.74 2008/09/13 18:55:15 tom Exp $")
extern char **environ;
@ -867,13 +867,13 @@ set_control_chars(void)
{
#ifdef TERMIOS
if (DISABLED(mode.c_cc[VERASE]) || terasechar >= 0)
mode.c_cc[VERASE] = terasechar >= 0 ? terasechar : default_erase();
mode.c_cc[VERASE] = (terasechar >= 0) ? terasechar : default_erase();
if (DISABLED(mode.c_cc[VINTR]) || intrchar >= 0)
mode.c_cc[VINTR] = intrchar >= 0 ? intrchar : CINTR;
mode.c_cc[VINTR] = (intrchar >= 0) ? intrchar : CINTR;
if (DISABLED(mode.c_cc[VKILL]) || tkillchar >= 0)
mode.c_cc[VKILL] = tkillchar >= 0 ? tkillchar : CKILL;
mode.c_cc[VKILL] = (tkillchar >= 0) ? tkillchar : CKILL;
#endif
}

View File

@ -40,7 +40,7 @@ AUTHOR
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
$Id: ncurses.c,v 1.327 2008/09/06 17:31:44 tom Exp $
$Id: ncurses.c,v 1.328 2008/09/13 18:56:02 tom Exp $
***************************************************************************/
@ -1103,7 +1103,7 @@ wget_wch_test(unsigned level, WINDOW *win, int delay)
} else {
wchar_t c2 = (wchar_t) c;
waddnwstr(win, &c2, 1);
(void) wprintw(win, " = %#x (printable character)", c);
(void) wprintw(win, " = %#x (printable character)", (unsigned) c);
}
}
wgetch_wrap(win, first_y);