ncurses/ncurses-6.0-20160917.patch

482 lines
19 KiB
Diff
Raw Permalink Normal View History

# ncurses 6.0 - patch 20160917 - Thomas E. Dickey
#
# ------------------------------------------------------------------------------
#
# Ncurses 6.0 is at
# ftp.gnu.org:/pub/gnu
#
# Patches for ncurses 6.0 can be found at
# ftp://invisible-island.net/ncurses/6.0
# http://invisible-mirror.net/archives/ncurses/6.0
#
# ------------------------------------------------------------------------------
# ftp://invisible-island.net/ncurses/6.0/ncurses-6.0-20160917.patch.gz
# patch by Thomas E. Dickey <dickey@invisible-island.net>
# created Sun Sep 18 02:03:51 UTC 2016
# ------------------------------------------------------------------------------
# Ada95/src/Makefile.in | 8 ++-
# Ada95/src/library.gpr | 7 +--
# MANIFEST | 1
# NEWS | 6 ++
# VERSION | 2
# dist.mk | 4 -
# ncurses-6.0-20160917/Ada95/src/library-cfg.sh | 50 ++++++++++++++++++++++++
# ncurses/tinfo/MKfallback.sh | 14 +++---
# ncurses/tinfo/write_entry.c | 4 -
# ncurses/win32con/win_driver.c | 6 +-
# package/debian-mingw/changelog | 4 -
# package/debian-mingw64/changelog | 4 -
# package/debian/changelog | 4 -
# package/mingw-ncurses.nsi | 4 -
# package/mingw-ncurses.spec | 2
# package/ncurses.spec | 2
# test/ncurses.c | 9 ++--
# test/worm.c | 10 ++--
# 18 files changed, 102 insertions(+), 39 deletions(-)
# ------------------------------------------------------------------------------
Index: Ada95/src/Makefile.in
Prereq: 1.72
--- ncurses-6.0-20160910+/Ada95/src/Makefile.in 2016-08-13 18:04:27.000000000 +0000
+++ ncurses-6.0-20160917/Ada95/src/Makefile.in 2016-09-18 00:25:32.000000000 +0000
@@ -28,7 +28,7 @@
#
# Author: Juergen Pfeifer, 1996
#
-# $Id: Makefile.in,v 1.72 2016/08/13 18:04:27 tom Exp $
+# $Id: Makefile.in,v 1.73 2016/09/18 00:25:32 tom Exp $
#
.SUFFIXES:
@@ -90,7 +90,7 @@
LIB_NAME = AdaCurses
SONAME = @ADA_SHAREDLIB@
-GNAT_PROJECT = $(srcdir)/library.gpr
+GNAT_PROJECT = AdaCurses.gpr
# build/source are the Ada95 tree
BUILD_DIR = ..
@@ -270,8 +270,10 @@
@USE_GNAT_PROJECTS@ $(ABASE)-trace.adb \
@USE_GNAT_PROJECTS@ $(STATIC_C_OBJS) \
@USE_GNAT_PROJECTS@ $(STATIC_DIRS)
+@USE_GNAT_PROJECTS@ $(SHELL) $(srcdir)/library-cfg.sh $(srcdir)/library.gpr $(CFLAGS_NORMAL) >$(GNAT_PROJECT)
@USE_GNAT_PROJECTS@ $(ADAMAKE) $(ADAMAKEFLAGS) -XLIB_KIND=static
@USE_GNAT_PROJECTS@ $(AR) $(ARFLAGS) $@ $(STATIC_C_OBJS)
+@USE_GNAT_PROJECTS@ -rm -f $(GNAT_PROJECT)
@USE_GNAT_PROJECTS@
@USE_GNAT_LIBRARIES@install \
@USE_GNAT_LIBRARIES@install.libs :: \
@@ -302,7 +304,9 @@
@MAKE_ADA_SHAREDLIB@ $(SHARED_DIRS) \
@MAKE_ADA_SHAREDLIB@ $(SHARED_OBJS)
@MAKE_ADA_SHAREDLIB@ cp $(SHARED_OBJS) $(BUILD_DIR)/dynamic-obj/
+@MAKE_ADA_SHAREDLIB@ $(SHELL) $(srcdir)/library-cfg.sh $(srcdir)/library.gpr $(CFLAGS_SHARED) >$(GNAT_PROJECT)
@MAKE_ADA_SHAREDLIB@ $(ADAMAKE) $(ADAMAKEFLAGS) -XLIB_KIND=dynamic
+@MAKE_ADA_SHAREDLIB@ -rm -f $(GNAT_PROJECT)
install \
install.libs :: $(ADA_INCLUDE)
Index: Ada95/src/library-cfg.sh
--- /dev/null 2016-09-17 11:34:54.124000970 +0000
+++ ncurses-6.0-20160917/Ada95/src/library-cfg.sh 2016-09-17 23:45:03.000000000 +0000
@@ -0,0 +1,50 @@
+#!/bin/sh
+##############################################################################
+# Copyright (c) 2016 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 "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# $Id: library-cfg.sh,v 1.1 2016/09/17 23:45:03 tom Exp $
+#
+# Work around incompatible behavior introduced with gnat6, which causes
+# gnatmake to attempt to compile all of the C objects which might be part of
+# the project. This can only work if we provide the compiler flags (done here
+# by making a copy of the project file with that information filled in).
+input=$1
+shift 1
+param=
+while test $# != 0
+do
+ test -n "$param" && param="$param,"
+ param="$param\"$1\""
+ shift 1
+done
+
+sed \
+ -e '/for Default_Switches ("C") use/s,-- ,,' \
+ -e '/for Default_Switches ("C") use/s% use .*'%" use($param);"% \
+ $input
+exit 0
Index: Ada95/src/library.gpr
Prereq: 1.9
--- ncurses-6.0-20160910+/Ada95/src/library.gpr 2014-06-01 01:13:09.000000000 +0000
+++ ncurses-6.0-20160917/Ada95/src/library.gpr 2016-09-18 00:25:54.000000000 +0000
@@ -25,10 +25,10 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
--- $Id: library.gpr,v 1.9 2014/06/01 01:13:09 tom Exp $
+-- $Id: library.gpr,v 1.10 2016/09/18 00:25:54 tom Exp $
-- http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Library-Projects.html
-- http://www.adaworld.com/debian/debian-ada-policy.html
-project Library is
+project AdaCurses is
Build_Dir := External ("BUILD_DIR");
Source_Dir := External ("SOURCE_DIR");
Source_Dir2 := External ("SOURCE_DIR2");
@@ -51,6 +51,7 @@
"-gnatafno",
"-gnatVa", -- All validity checks
"-gnatwa"); -- Activate all optional errors
+ -- for Default_Switches ("C") use
end Compiler;
for Languages use ("C", "Ada");
-end Library;
+end AdaCurses;
Index: MANIFEST
--- ncurses-6.0-20160910+/MANIFEST 2016-08-06 23:46:22.000000000 +0000
+++ ncurses-6.0-20160917/MANIFEST 2016-09-18 00:39:59.000000000 +0000
@@ -132,6 +132,7 @@
./Ada95/src/c_threaded_variables.h
./Ada95/src/c_varargs_to_ada.c
./Ada95/src/c_varargs_to_ada.h
+./Ada95/src/library-cfg.sh
./Ada95/src/library.gpr
./Ada95/src/modules
./Ada95/src/ncurses_compat.c
Index: NEWS
Prereq: 1.2664
--- ncurses-6.0-20160910+/NEWS 2016-09-10 22:07:14.000000000 +0000
+++ ncurses-6.0-20160917/NEWS 2016-09-18 00:38:06.000000000 +0000
@@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2664 2016/09/10 22:07:14 tom Exp $
+-- $Id: NEWS,v 1.2667 2016/09/18 00:38:06 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,10 @@
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
+20160917
+ + build-fix for gnat6, which unhelpfully attempts to compile C files.
+ + fix typo in 20160910 changes (Debian #837892, patch by Sven Joachim).
+
20160910
+ trim dead code ifdef'd with HIDE_EINTR since 970830 (discussion with
Leon Winter).
Index: VERSION
--- ncurses-6.0-20160910+/VERSION 2016-09-04 17:02:31.000000000 +0000
+++ ncurses-6.0-20160917/VERSION 2016-09-17 13:25:35.000000000 +0000
@@ -1 +1 @@
-5:0:9 6.0 20160910
+5:0:9 6.0 20160917
Index: dist.mk
Prereq: 1.1123
--- ncurses-6.0-20160910+/dist.mk 2016-09-04 17:02:31.000000000 +0000
+++ ncurses-6.0-20160917/dist.mk 2016-09-17 13:25:35.000000000 +0000
@@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1123 2016/09/04 17:02:31 tom Exp $
+# $Id: dist.mk,v 1.1124 2016/09/17 13:25:35 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
@@ -37,7 +37,7 @@
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 6
NCURSES_MINOR = 0
-NCURSES_PATCH = 20160910
+NCURSES_PATCH = 20160917
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
Index: ncurses/tinfo/MKfallback.sh
Prereq: 1.15
--- ncurses-6.0-20160910+/ncurses/tinfo/MKfallback.sh 2010-08-07 20:32:34.000000000 +0000
+++ ncurses-6.0-20160917/ncurses/tinfo/MKfallback.sh 2016-09-17 21:28:03.000000000 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
##############################################################################
-# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2010,2016 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 "Software"), #
@@ -26,7 +26,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: MKfallback.sh,v 1.15 2010/08/07 20:32:34 tom Exp $
+# $Id: MKfallback.sh,v 1.16 2016/09/17 21:28:03 tom Exp $
#
# MKfallback.sh -- create fallback table for entry reads
#
@@ -119,17 +119,19 @@
const TERMTYPE *tp;
for (tp = fallbacks;
- tp < fallbacks + sizeof(fallbacks)/sizeof(TERMTYPE);
- tp++)
- if (_nc_name_match(tp->term_names, name, "|"))
+ tp < fallbacks + sizeof(fallbacks)/sizeof(TERMTYPE);
+ tp++) {
+ if (_nc_name_match(tp->term_names, name, "|")) {
return(tp);
+ }
+ }
EOF
else
echo " /* the fallback list is empty */";
fi
cat <<EOF
- return((TERMTYPE *)0);
+ return((TERMTYPE *)0);
}
EOF
Index: ncurses/tinfo/write_entry.c
Prereq: 1.95
--- ncurses-6.0-20160910+/ncurses/tinfo/write_entry.c 2016-09-10 20:22:42.000000000 +0000
+++ ncurses-6.0-20160917/ncurses/tinfo/write_entry.c 2016-09-17 19:06:26.000000000 +0000
@@ -47,7 +47,7 @@
#define TRACE_OUT(p) /*nothing */
#endif
-MODULE_ID("$Id: write_entry.c,v 1.95 2016/09/10 20:22:42 tom Exp $")
+MODULE_ID("$Id: write_entry.c,v 1.96 2016/09/17 19:06:26 Sven.Joachim Exp $")
static int total_written;
@@ -443,7 +443,7 @@
_nc_STRNCPY(symlinkname, first_name, MY_SIZE);
} else {
_nc_STRCPY(symlinkname, "../", sizeof(symlinkname));
- _nc_STRNCPY(symlinkname + 3, first_name, MY_SIZE - 3);
+ _nc_STRNCPY(symlinkname + 3, filename, MY_SIZE - 3);
}
symlinkname[MY_SIZE] = '\0';
#endif /* USE_SYMLINKS */
Index: ncurses/win32con/win_driver.c
Prereq: 1.55
--- ncurses-6.0-20160910+/ncurses/win32con/win_driver.c 2015-02-28 21:30:23.000000000 +0000
+++ ncurses-6.0-20160917/ncurses/win32con/win_driver.c 2016-09-17 22:02:44.000000000 +0000
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2015,2016 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 *
@@ -54,7 +54,7 @@
#define CUR my_term.type.
-MODULE_ID("$Id: win_driver.c,v 1.55 2015/02/28 21:30:23 tom Exp $")
+MODULE_ID("$Id: win_driver.c,v 1.56 2016/09/17 22:02:44 tom Exp $")
#ifndef __GNUC__
# error We need GCC to compile for MinGW
@@ -2108,7 +2108,7 @@
if (b && nRead > 0) {
if (rc < 0)
rc = 0;
- rc += nRead;
+ rc = rc + (int) nRead;
if (inp_rec.EventType == KEY_EVENT) {
if (!inp_rec.Event.KeyEvent.bKeyDown)
continue;
Index: package/debian-mingw/changelog
--- ncurses-6.0-20160910+/package/debian-mingw/changelog 2016-09-04 17:02:31.000000000 +0000
+++ ncurses-6.0-20160917/package/debian-mingw/changelog 2016-09-17 13:25:35.000000000 +0000
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20160910) unstable; urgency=low
+ncurses6 (6.0+20160917) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 04 Sep 2016 13:02:31 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 17 Sep 2016 09:25:35 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
Index: package/debian-mingw64/changelog
--- ncurses-6.0-20160910+/package/debian-mingw64/changelog 2016-09-04 17:02:31.000000000 +0000
+++ ncurses-6.0-20160917/package/debian-mingw64/changelog 2016-09-17 13:25:35.000000000 +0000
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20160910) unstable; urgency=low
+ncurses6 (6.0+20160917) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 04 Sep 2016 13:02:31 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 17 Sep 2016 09:25:35 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
Index: package/debian/changelog
--- ncurses-6.0-20160910+/package/debian/changelog 2016-09-04 17:02:31.000000000 +0000
+++ ncurses-6.0-20160917/package/debian/changelog 2016-09-17 13:25:35.000000000 +0000
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20160910) unstable; urgency=low
+ncurses6 (6.0+20160917) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 04 Sep 2016 13:02:31 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 17 Sep 2016 09:25:35 -0400
ncurses6 (5.9-20120608) unstable; urgency=low
Index: package/mingw-ncurses.nsi
Prereq: 1.175
--- ncurses-6.0-20160910+/package/mingw-ncurses.nsi 2016-09-04 17:02:31.000000000 +0000
+++ ncurses-6.0-20160917/package/mingw-ncurses.nsi 2016-09-17 13:25:35.000000000 +0000
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.175 2016/09/04 17:02:31 tom Exp $
+; $Id: mingw-ncurses.nsi,v 1.176 2016/09/17 13:25:35 tom Exp $
; TODO add examples
; TODO bump ABI to 6
@@ -10,7 +10,7 @@
!define VERSION_MAJOR "6"
!define VERSION_MINOR "0"
!define VERSION_YYYY "2016"
-!define VERSION_MMDD "0910"
+!define VERSION_MMDD "0917"
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
!define MY_ABI "5"
Index: package/mingw-ncurses.spec
--- ncurses-6.0-20160910+/package/mingw-ncurses.spec 2016-09-04 17:02:31.000000000 +0000
+++ ncurses-6.0-20160917/package/mingw-ncurses.spec 2016-09-17 13:25:35.000000000 +0000
@@ -3,7 +3,7 @@
Summary: shared libraries for terminal handling
Name: mingw32-ncurses6
Version: 6.0
-Release: 20160910
+Release: 20160917
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Index: package/ncurses.spec
--- ncurses-6.0-20160910+/package/ncurses.spec 2016-09-04 17:02:31.000000000 +0000
+++ ncurses-6.0-20160917/package/ncurses.spec 2016-09-17 13:25:35.000000000 +0000
@@ -1,7 +1,7 @@
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.0
-Release: 20160910
+Release: 20160917
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Index: test/ncurses.c
Prereq: 1.445
--- ncurses-6.0-20160910+/test/ncurses.c 2016-09-10 23:30:15.000000000 +0000
+++ ncurses-6.0-20160917/test/ncurses.c 2016-09-17 21:12:04.000000000 +0000
@@ -40,7 +40,7 @@
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
-$Id: ncurses.c,v 1.445 2016/09/10 23:30:15 tom Exp $
+$Id: ncurses.c,v 1.446 2016/09/17 21:12:04 tom Exp $
***************************************************************************/
@@ -2704,7 +2704,8 @@
int n;
int got;
char result[BUFSIZ];
- int check_n, check_r, check_g, check_b;
+ int check_n;
+ unsigned check_r, check_g, check_b;
raw();
noecho();
@@ -6925,11 +6926,11 @@
show_string_setting("longname", longname());
show_number_setting("baudrate", baudrate());
if (erasechar() > 0) {
- show_string_setting("unctrl(erasechar)", unctrl(erasechar()));
+ show_string_setting("unctrl(erasechar)", unctrl((chtype) erasechar()));
show_string_setting("keyname(erasechar)", keyname(erasechar()));
}
if (killchar() > 0) {
- show_string_setting("unctrl(killchar)", unctrl(killchar()));
+ show_string_setting("unctrl(killchar)", unctrl((chtype) killchar()));
show_string_setting("keyname(killchar)", keyname(killchar()));
}
#if USE_WIDEC_SUPPORT
Index: test/worm.c
Prereq: 1.65
--- ncurses-6.0-20160910+/test/worm.c 2013-06-22 20:01:41.000000000 +0000
+++ ncurses-6.0-20160917/test/worm.c 2016-09-17 21:12:30.000000000 +0000
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2013,2016 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 *
@@ -61,7 +61,7 @@
traces will be dumped. The program stops and waits for one character of
input at the beginning and end of the interval.
- $Id: worm.c,v 1.65 2013/06/22 20:01:41 tom Exp $
+ $Id: worm.c,v 1.66 2016/09/17 21:12:30 tom Exp $
*/
#include <test.priv.h>
@@ -324,9 +324,9 @@
static bool
quit_worm(int bitnum)
{
- pending |= (1 << bitnum);
+ pending = (pending | (unsigned) (1 << bitnum));
napms(10); /* let the other thread(s) have a chance */
- pending &= ~(1 << bitnum);
+ pending = (pending & (unsigned) ~(1 << bitnum));
return quitting;
}
@@ -335,7 +335,7 @@
{
unsigned long compare = 0;
Trace(("start_worm"));
- while (!quit_worm(((struct worm *) arg) - worm)) {
+ while (!quit_worm((int) (((struct worm *) arg) - worm))) {
while (compare < sequence) {
++compare;
#if HAVE_USE_WINDOW