]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.3 - patch 20221015
authorThomas E. Dickey <dickey@invisible-island.net>
Sat, 15 Oct 2022 23:52:49 +0000 (23:52 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sat, 15 Oct 2022 23:52:49 +0000 (23:52 +0000)
+ fix another memory-leak in tic.
+ update install-sh script from autoconf, to fix install problem for
  Ada95 with Arch; as noted in
  https://lists.gnu.org/archive/html/automake/2018-09/msg00005.html
  there are unaddressed issues.
+ update CF_XOPEN_SOURCE, adding GNU libc suffixes for abi64, abin32,
  x32 (report by Sven Joachim):
+ correct ifdef's for _nc_set_read_thread() (patch by Mikhail Korolev,
  cf: 20220813).

21 files changed:
Ada95/aclocal.m4
Ada95/configure
NEWS
VERSION
aclocal.m4
configure
dist.mk
install-sh
ncurses/curses.priv.h
ncurses/tinfo/alloc_entry.c
ncurses/tinfo/comp_parse.c
ncurses/tty/lib_tstp.c
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec
package/ncursest.spec
test/aclocal.m4
test/configure

index 5f7c5a6e9613b1deaaba96c4710a8a530315f2c4..5636b3cd9c105beb423da1e4aa77a0a71ac64dd0 100644 (file)
@@ -29,7 +29,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey
 dnl
-dnl $Id: aclocal.m4,v 1.195 2022/09/24 20:42:30 tom Exp $
+dnl $Id: aclocal.m4,v 1.196 2022/10/02 23:55:56 tom Exp $
 dnl Macros used in NCURSES Ada95 auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -5014,7 +5014,7 @@ AC_ARG_WITH(system-type,
 ])
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 60 updated: 2022/09/10 15:16:16
+dnl CF_XOPEN_SOURCE version: 62 updated: 2022/10/02 19:55:56
 dnl ---------------
 dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
 dnl or adapt to the vendor's definitions to get equivalent functionality,
@@ -5065,7 +5065,7 @@ case "$host_os" in
        cf_xopen_source="-D_SGI_SOURCE"
        cf_XOPEN_SOURCE=
        ;;
-(linux*gnu|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
+(linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
        CF_GNU_SOURCE($cf_XOPEN_SOURCE)
        ;;
 (minix*)
index ee43a442d590b8118c7c21e870a54dddca9d1f52..a3561fe1ba7254f02a2b375d042408ac0c7a6b33 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.85 .
+# From configure.in Revision: 1.86 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by Autoconf 2.52.20210509.
 #
@@ -12465,7 +12465,7 @@ case "$host_os" in
        cf_xopen_source="-D_SGI_SOURCE"
        cf_XOPEN_SOURCE=
        ;;
-(linux*gnu|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
+(linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
 
 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
 
diff --git a/NEWS b/NEWS
index 1c0ee42b230945ef650bb6226ab50564b103adca..d387afe388d7474c2bc12089a3a70c77cc6fc334 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -26,7 +26,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3864 2022/10/08 16:50:03 tom Exp $
+-- $Id: NEWS,v 1.3868 2022/10/15 19:45:12 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,17 @@ 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.
 
+20221015
+       + fix another memory-leak in tic.
+       + update install-sh script from autoconf, to fix install problem for
+         Ada95 with Arch; as noted in
+         https://lists.gnu.org/archive/html/automake/2018-09/msg00005.html
+         there are unaddressed issues.
+       + update CF_XOPEN_SOURCE, adding GNU libc suffixes for abi64, abin32,
+         x32 (report by Sven Joachim):
+       + correct ifdef's for _nc_set_read_thread() (patch by Mikhail Korolev,
+         cf: 20220813).
+
 20221008
        + correct a switch-statement case in configure script to allow for test
          builds with ABI=7.
diff --git a/VERSION b/VERSION
index 5c043d13792658a564e5bff522e9b1867411834a..1b3acc0c4c078767f22678c858157070afcbbe5a 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.3     20221008
+5:0:10 6.3     20221015
index bf8065783e40e59234e17cdcc59f2e29a29c3074..4478ba8806ada4f0534baa357a6937d7ad3e1a62 100644 (file)
@@ -29,7 +29,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: aclocal.m4,v 1.1014 2022/10/01 13:24:04 tom Exp $
+dnl $Id: aclocal.m4,v 1.1015 2022/10/02 23:55:56 tom Exp $
 dnl Macros used in NCURSES auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -9873,7 +9873,7 @@ fi
 AC_SUBST(no_x11_rgb)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 61 updated: 2022/09/30 04:05:55
+dnl CF_XOPEN_SOURCE version: 62 updated: 2022/10/02 19:55:56
 dnl ---------------
 dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
 dnl or adapt to the vendor's definitions to get equivalent functionality,
@@ -9924,7 +9924,7 @@ case "$host_os" in
        cf_xopen_source="-D_SGI_SOURCE"
        cf_XOPEN_SOURCE=
        ;;
-(linux*gnu|linux*gnueabi|linux*gnueabihf|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
+(linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
        CF_GNU_SOURCE($cf_XOPEN_SOURCE)
        ;;
 (minix*)
index 128cca2ac32e08148128f5689a3541ae404ed18f..b7a2d9a5a36fc646d3f369190cf8bd4b2499451c 100755 (executable)
--- a/configure
+++ b/configure
@@ -9989,7 +9989,7 @@ case "$host_os" in
        cf_xopen_source="-D_SGI_SOURCE"
        cf_XOPEN_SOURCE=
        ;;
-(linux*gnu|linux*gnueabi|linux*gnueabihf|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
+(linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
 
 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
 
diff --git a/dist.mk b/dist.mk
index fd35b793f5b78ac32237e975f9725cb35efe14c9..dbb55b2ca6a92359554382598dcc1af5154c7763 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -26,7 +26,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.1506 2022/10/08 10:25:44 tom Exp $
+# $Id: dist.mk,v 1.1507 2022/10/15 11:57:10 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -38,7 +38,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 6
 NCURSES_MINOR = 3
-NCURSES_PATCH = 20221008
+NCURSES_PATCH = 20221015
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 462fa9c3d57b1ff8cf4803f0d212f7138b4ba9d5..ec298b53740270ce82b326c4c2deaa5dcdec4596 100755 (executable)
@@ -1,7 +1,8 @@
-#! /bin/sh
-#
+#!/bin/sh
 # install - install a program, script, or datafile
-#
+
+scriptversion=2020-11-14.01; # UTC
+
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
 # following copyright and license.
 # FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
+# 'make' implicit rules from creating a file called install from it
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
+# from scratch.
+
+tab='  '
+nl='
+'
+IFS=" $tab$nl"
+
+# Set DOITPROG to "echo" to test this script.
 
+doit=${DOITPROG-}
+doit_exec=${doit:-exec}
 
-# set DOITPROG to echo to test this script
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
 
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
 
+posix_mkdir=
 
-# put in absolute paths if you don't have them in your path; or use env. vars.
+# Desired mode of installed file.
+mode=0755
 
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
+# Create dirs (including intermediate dirs) using mode 755.
+# This is like GNU 'install' as of coreutils 8.32 (2020).
+mkdir_umask=22
 
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
+backupsuffix=
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
 rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-       -c) instcmd=$cpprog
-           shift
-           continue;;
-
-       -d) dir_arg=true
-           shift
-           continue;;
-
-       -m) chmodcmd="$chmodprog $2"
-           shift
-           shift
-           continue;;
-
-       -o) chowncmd="$chownprog $2"
-           shift
-           shift
-           continue;;
-
-       -g) chgrpcmd="$chgrpprog $2"
-           shift
-           shift
-           continue;;
-
-       -s) stripcmd=$stripprog
-           shift
-           continue;;
-
-       -t=*) transformarg=`echo $1 | sed 's/-t=//'`
-           shift
-           continue;;
-
-       -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-           shift
-           continue;;
-
-       *)  if [ x"$src" = x ]
-           then
-               src=$1
-           else
-               # this colon is to work around a 386BSD /bin/sh bug
-               :
-               dst=$1
-           fi
-           shift
-           continue;;
-    esac
-done
+stripcmd=
 
-if [ x"$src" = x ]
-then
-       echo "$0: no input file specified" >&2
-       exit 1
-else
-       :
-fi
+src=
+dst=
+dir_arg=
+dst_arg=
 
-if [ x"$dir_arg" != x ]; then
-       dst=$src
-       src=""
+copy_on_change=false
+is_target_a_directory=possibly
 
-       if [ -d "$dst" ]; then
-               instcmd=:
-               chmodcmd=""
-       else
-               instcmd=$mkdirprog
-       fi
-else
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
 
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
 
-       if [ -f "$src" ] || [ -d "$src" ]
-       then
-               :
-       else
-               echo "$0: $src does not exist" >&2
-               exit 1
-       fi
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
 
-       if [ x"$dst" = x ]
-       then
-               echo "$0: no destination specified" >&2
-               exit 1
-       else
-               :
-       fi
+  -c            (ignored)
+  -C            install only if different (preserve data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -p            pass -p to $cpprog.
+  -s            $stripprog installed files.
+  -S SUFFIX     attempt to back up existing files, with suffix SUFFIX.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
 
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
 
-       if [ -d "$dst" ]
-       then
-               dst=$dst/`basename "$src"`
-       else
-               :
-       fi
-fi
+By default, rm is invoked with -f; when overridden with RMPROG,
+it's up to you to specify -f if you want it.
 
-## this sed command emulates the dirname command
-dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+If -S is not specified, no backups are attempted.
 
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
+Email bug reports to bug-automake@gnu.org.
+Automake home page: https://www.gnu.org/software/automake/
+"
 
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-       '
-IFS="${IFS-$defaultIFS}"
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
 
-oIFS=$IFS
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS=$oIFS
+    -C) copy_on_change=true;;
 
-pathcomp=''
+    -d) dir_arg=true;;
 
-while [ $# -ne 0 ] ; do
-       pathcomp=$pathcomp$1
-       shift
+    -g) chgrpcmd="$chgrpprog $2"
+        shift;;
 
-       if [ ! -d "$pathcomp" ] ;
-        then
-               $mkdirprog "$pathcomp"
-       else
-               :
-       fi
+    --help) echo "$usage"; exit $?;;
 
-       pathcomp=$pathcomp/
-done
-fi
+    -m) mode=$2
+        case $mode in
+          *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+            echo "$0: invalid mode: $mode" >&2
+            exit 1;;
+        esac
+        shift;;
 
-if [ x"$dir_arg" != x ]
-then
-       $doit $instcmd "$dst" &&
+    -o) chowncmd="$chownprog $2"
+        shift;;
 
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
-else
+    -p) cpprog="$cpprog -p";;
 
-# If we're going to rename the final executable, determine the name now.
+    -s) stripcmd=$stripprog;;
 
-       if [ x"$transformarg" = x ]
-       then
-               dstfile=`basename "$dst"`
-       else
-               dstfile=`basename "$dst" $transformbasename |
-                       sed $transformarg`$transformbasename
-       fi
+    -S) backupsuffix="$2"
+        shift;;
 
-# don't allow the sed command to completely eliminate the filename
+    -t)
+        is_target_a_directory=always
+        dst_arg=$2
+        # Protect names problematic for 'test' and other utilities.
+        case $dst_arg in
+          -* | [=\(\)!]) dst_arg=./$dst_arg;;
+        esac
+        shift;;
 
-       if [ x"$dstfile" = x ]
-       then
-               dstfile=`basename "$dst"`
-       else
-               :
-       fi
+    -T) is_target_a_directory=never;;
 
-# Make a couple of temp file names in the proper directory.
+    --version) echo "$0 $scriptversion"; exit $?;;
 
-       dsttmp=$dstdir/#inst.$$#
-       rmtmp=$dstdir/#rm.$$#
+    --) shift
+        break;;
 
-# Trap to clean up temp files at exit.
+    -*) echo "$0: invalid option: $1" >&2
+        exit 1;;
 
-       trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
-       trap '(exit $?); exit' 1 2 13 15
+    *)  break;;
+  esac
+  shift
+done
 
-# Move or copy the file name to the temp name
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
 
-       $doit $instcmd "$src" "$dsttmp" &&
+if test -n "$dir_arg"; then
+  if test -n "$dst_arg"; then
+    echo "$0: target directory not allowed when installing a directory." >&2
+    exit 1
+  fi
+fi
 
-# and set any options; do chmod last to preserve setuid bits
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+    # Protect names problematic for 'test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
+  done
+fi
 
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call 'install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
 
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
+if test -z "$dir_arg"; then
+  if test $# -gt 1 || test "$is_target_a_directory" = always; then
+    if test ! -d "$dst_arg"; then
+      echo "$0: $dst_arg: Is not a directory." >&2
+      exit 1
+    fi
+  fi
+fi
 
-# Now remove or move aside any old file at destination location.  We try this
-# two ways since rm can't unlink itself on some systems and the destination
-# file might be busy for other reasons.  In this case, the final cleanup
-# might fail but the new file should still install successfully.
+if test -z "$dir_arg"; then
+  do_exit='(exit $ret); exit $ret'
+  trap "ret=129; $do_exit" 1
+  trap "ret=130; $do_exit" 2
+  trap "ret=141; $do_exit" 13
+  trap "ret=143; $do_exit" 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+        u_plus_rw=
+      else
+        u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+        u_plus_rw=
+      else
+        u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
 
-{
-       if [ -f "$dstdir/$dstfile" ]
+for src
+do
+  # Protect names problematic for 'test' and other utilities.
+  case $src in
+    -* | [=\(\)!]) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+    # Don't chown directories that already exist.
+    if test $dstdir_status = 0; then
+      chowncmd=""
+    fi
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+    dst=$dst_arg
+
+    # If destination is a directory, append the input filename.
+    if test -d "$dst"; then
+      if test "$is_target_a_directory" = never; then
+        echo "$0: $dst_arg: Is a directory" >&2
+        exit 1
+      fi
+      dstdir=$dst
+      dstbase=`basename "$src"`
+      case $dst in
+       */) dst=$dst$dstbase;;
+       *)  dst=$dst/$dstbase;;
+      esac
+      dstdir_status=0
+    else
+      dstdir=`dirname "$dst"`
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  case $dstdir in
+    */) dstdirslash=$dstdir;;
+    *)  dstdirslash=$dstdir/;;
+  esac
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+        # With -d, create the new directory with the user-specified mode.
+        # Otherwise, rely on $mkdir_umask.
+        if test -n "$dir_arg"; then
+          mkdir_mode=-m$mode
+        else
+          mkdir_mode=
+        fi
+
+        posix_mkdir=false
+       # The $RANDOM variable is not portable (e.g., dash).  Use it
+       # here however when possible just to lower collision chance.
+       tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+
+       trap '
+         ret=$?
+         rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
+         exit $ret
+       ' 0
+
+       # Because "mkdir -p" follows existing symlinks and we likely work
+       # directly in world-writeable /tmp, make sure that the '$tmpdir'
+       # directory is successfully created first before we actually test
+       # 'mkdir -p'.
+       if (umask $mkdir_umask &&
+           $mkdirprog $mkdir_mode "$tmpdir" &&
+           exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
        then
-               $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
-               $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
-               {
-                 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
-                 (exit 1); exit
-               }
+         if test -z "$dir_arg" || {
+              # Check for POSIX incompatibilities with -m.
+              # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+              # other-writable bit of parent directory when it shouldn't.
+              # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+              test_tmpdir="$tmpdir/a"
+              ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+              case $ls_ld_tmpdir in
+                d????-?r-*) different_mode=700;;
+                d????-?--*) different_mode=755;;
+                *) false;;
+              esac &&
+              $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+                ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+                test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+              }
+            }
+         then posix_mkdir=:
+         fi
+         rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
        else
-               :
+         # Remove any dirs left behind by ancient mkdir implementations.
+         rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
        fi
-} &&
-
-# Now rename the file to the real destination.
-
-       $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
-
-fi &&
+       trap '' 0;;
+    esac
 
-# The final little trick to "correctly" pass the exit status to the exit trap.
+    if
+      $posix_mkdir && (
+        umask $mkdir_umask &&
+        $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+        /*) prefix='/';;
+        [-=\(\)!]*) prefix='./';;
+        *)  prefix='';;
+      esac
+
+      oIFS=$IFS
+      IFS=/
+      set -f
+      set fnord $dstdir
+      shift
+      set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+        test X"$d" = X && continue
+
+        prefix=$prefix$d
+        if test -d "$prefix"; then
+          prefixes=
+        else
+          if $posix_mkdir; then
+            (umask $mkdir_umask &&
+             $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+            # Don't fail if two instances are running concurrently.
+            test -d "$prefix" || exit 1
+          else
+            case $prefix in
+              *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+              *) qprefix=$prefix;;
+            esac
+            prefixes="$prefixes '$qprefix'"
+          fi
+        fi
+        prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+        # Don't fail if two instances are running concurrently.
+        (umask $mkdir_umask &&
+         eval "\$doit_exec \$mkdirprog $prefixes") ||
+          test -d "$dstdir" || exit 1
+        obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=${dstdirslash}_inst.$$_
+    rmtmp=${dstdirslash}_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask &&
+     { test -z "$stripcmd" || {
+        # Create $dsttmp read-write so that cp doesn't create it read-only,
+        # which would cause strip to fail.
+        if test -z "$doit"; then
+          : >"$dsttmp" # No need to fork-exec 'touch'.
+        else
+          $doit touch "$dsttmp"
+        fi
+       }
+     } &&
+     $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"     2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"  2>/dev/null` &&
+       set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       set +f &&
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # If $backupsuffix is set, and the file being installed
+      # already exists, attempt a backup.  Don't worry if it fails,
+      # e.g., if mv doesn't support -f.
+      if test -n "$backupsuffix" && test -f "$dst"; then
+        $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
+      fi
+
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+        # Now remove or move aside any old file at destination location.
+        # We try this two ways since rm can't unlink itself on some
+        # systems and the destination file might be busy for other
+        # reasons.  In this case, the final cleanup might fail but the new
+        # file should still install successfully.
+        {
+          test ! -f "$dst" ||
+          $doit $rmcmd "$dst" 2>/dev/null ||
+          { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+            { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
+          } ||
+          { echo "$0: cannot unlink or rename $dst" >&2
+            (exit 1); exit 1
+          }
+        } &&
+
+        # Now rename the file to the real destination.
+        $doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
 
-{
-       (exit 0); exit
-}
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
index 1e8ec70badc7c6005fe449009736a0e0e0b2455b..e33fd7110a37a4b58e2b74e2466e427a50f1010c 100644 (file)
@@ -35,7 +35,7 @@
  ****************************************************************************/
 
 /*
- * $Id: curses.priv.h,v 1.651 2022/08/13 14:35:01 tom Exp $
+ * $Id: curses.priv.h,v 1.652 2022/10/15 13:09:05 Mikhail.Korolev Exp $
  *
  *     curses.priv.h
  *
@@ -674,7 +674,7 @@ extern NCURSES_EXPORT(int) _nc_sigprocmask(int, const sigset_t *, sigset_t *);
 #define _nc_unlock_global(name)        /* nothing */
 #endif /* USE_PTHREADS */
 
-#if USE_PTHREADS_EINTR || defined(EXP_WIN32_DRIVER)
+#if USE_PTHREADS_EINTR
 extern NCURSES_EXPORT(void) _nc_set_read_thread(bool);
 #else
 #define _nc_set_read_thread(enable)    /* nothing */
index 90febbbd11e8a9da3217d1a55a5d95edb465b9f2..d5148ca6c2518e1e8851d537783dd0d318a97a97 100644 (file)
@@ -48,7 +48,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: alloc_entry.c,v 1.76 2022/09/17 21:45:44 tom Exp $")
+MODULE_ID("$Id: alloc_entry.c,v 1.77 2022/10/15 19:37:33 tom Exp $")
 
 #define ABSENT_OFFSET    -1
 #define CANCELLED_OFFSET -2
@@ -251,8 +251,8 @@ _nc_merge_entry(ENTRY * const target, ENTRY * const source)
     TERMTYPE2 *from = &(source->tterm);
 #if NCURSES_XNAMES
     TERMTYPE2 copy;
-    size_t str_size = 0;
-    char *str_table = NULL;
+    size_t str_size;
+    char *str_table;
 #endif
     unsigned i;
 
@@ -263,7 +263,10 @@ _nc_merge_entry(ENTRY * const target, ENTRY * const source)
     _nc_copy_termtype2(&copy, from);
     from = &copy;
     _nc_align_termtype(to, from);
-    str_size += strlen(to->term_names) + 1;
+    /*
+     * compute the maximum size of the string-table.
+     */
+    str_size = strlen(to->term_names) + 1;
     for_each_string(i, from) {
        if (VALID_STRING(from->Strings[i]))
            str_size += strlen(from->Strings[i]) + 1;
@@ -303,6 +306,46 @@ _nc_merge_entry(ENTRY * const target, ENTRY * const source)
        to->str_table = str_table;
        free(from->str_table);
     }
+    /*
+     * Do the same for the extended-strings (i.e., lists of capabilities).
+     */
+    str_size = 0;
+    for (i = 0; i < NUM_EXT_NAMES(from); ++i) {
+       if (VALID_STRING(from->ext_Names[i]))
+           str_size += strlen(from->ext_Names[i]) + 1;
+    }
+    for (i = 0; i < NUM_EXT_NAMES(to); ++i) {
+       if (VALID_STRING(to->ext_Names[i]))
+           str_size += strlen(to->ext_Names[i]) + 1;
+    }
+    /* allocate a string-table large enough for both source/target, and
+     * copy all of the strings into that table.  In the merge, we will
+     * select from the original source/target lists to construct a new
+     * target list.
+     */
+    if (str_size != 0) {
+       char *str_copied;
+       if ((str_table = malloc(str_size)) == NULL)
+           _nc_err_abort(MSG_NO_MEMORY);
+       str_copied = str_table;
+       for (i = 0; i < NUM_EXT_NAMES(from); ++i) {
+           if (VALID_STRING(from->ext_Names[i])) {
+               strcpy(str_copied, from->ext_Names[i]);
+               from->ext_Names[i] = str_copied;
+               str_copied += strlen(str_copied) + 1;
+           }
+       }
+       for (i = 0; i < NUM_EXT_NAMES(to); ++i) {
+           if (VALID_STRING(to->ext_Names[i])) {
+               strcpy(str_copied, to->ext_Names[i]);
+               to->ext_Names[i] = str_copied;
+               str_copied += strlen(str_copied) + 1;
+           }
+       }
+       free(to->ext_str_table);
+       to->ext_str_table = str_table;
+       free(from->ext_str_table);
+    }
 #endif
     for_each_boolean(i, from) {
        if (to->Booleans[i] != (NCURSES_SBOOL) CANCELLED_BOOLEAN) {
@@ -342,10 +385,7 @@ _nc_merge_entry(ENTRY * const target, ENTRY * const source)
        }
     }
 #if NCURSES_XNAMES
-    /* Discard the data allocated in _nc_copy_termtype2, but do not use
-     * _nc_free_termtype2 because that frees the string-table (which is
-     * not allocated by _nc_copy_termtype2).
-     */
+    /* cleanup */
     free(copy.Booleans);
     free(copy.Numbers);
     free(copy.Strings);
index 1c71eddca1e33ec93147852f366429ee0a04e36c..c86cf59dbe6a7c98efdd73c36f911d7f8eb51610 100644 (file)
@@ -48,7 +48,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: comp_parse.c,v 1.127 2022/09/24 15:24:15 tom Exp $")
+MODULE_ID("$Id: comp_parse.c,v 1.128 2022/10/15 19:31:00 tom Exp $")
 
 static void sanity_check2(TERMTYPE2 *, bool);
 NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2;
@@ -571,11 +571,10 @@ _nc_resolve_uses2(bool fullresolve, bool literal)
                     * (reverse) order.
                     */
                    for (; qp->nuses; qp->nuses--) {
-                       validate_merge(&merged,
-                                      qp->uses[qp->nuses - 1].link);
-                       _nc_merge_entry(&merged,
-                                       qp->uses[qp->nuses - 1].link);
-                       free(qp->uses[qp->nuses - 1].name);
+                       int n = qp->nuses - 1;
+                       validate_merge(&merged, qp->uses[n].link);
+                       _nc_merge_entry(&merged, qp->uses[n].link);
+                       free(qp->uses[n].name);
                    }
 
                    /*
index ec086ca730c8dce69ec4b845d6f62ef0d0cf2cb4..f228f72be84dcb08075cd4bd43d2f9b03b41010b 100644 (file)
@@ -43,7 +43,7 @@
 
 #include <SigAction.h>
 
-MODULE_ID("$Id: lib_tstp.c,v 1.52 2022/08/13 14:36:43 tom Exp $")
+MODULE_ID("$Id: lib_tstp.c,v 1.53 2022/10/15 13:09:05 Mikhail.Korolev Exp $")
 
 #if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC)
 #define USE_SIGTSTP 1
@@ -283,8 +283,6 @@ handle_SIGINT(int sig)
     _exit(EXIT_FAILURE);
 }
 
-#if USE_SIGWINCH
-
 # ifndef _nc_set_read_thread
 NCURSES_EXPORT(void)
 _nc_set_read_thread(bool enable)
@@ -300,6 +298,8 @@ _nc_set_read_thread(bool enable)
 }
 # endif
 
+#if USE_SIGWINCH
+
 static void
 handle_SIGWINCH(int sig GCC_UNUSED)
 {
index 75a6e5524c832a628aaa136497d6b0c2741ee751..38bf5616a807a9a4e8f68e6d21c3901b2e16ab38 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20221008) unstable; urgency=low
+ncurses6 (6.3+20221015) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 08 Oct 2022 06:25:44 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 15 Oct 2022 07:57:10 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 75a6e5524c832a628aaa136497d6b0c2741ee751..38bf5616a807a9a4e8f68e6d21c3901b2e16ab38 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20221008) unstable; urgency=low
+ncurses6 (6.3+20221015) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 08 Oct 2022 06:25:44 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 15 Oct 2022 07:57:10 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 31b14a1460eb8c36dc8d694b7abc771319dfdac1..f0a4cea0a70857f2ba270977a254f9487fb9774c 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20221008) unstable; urgency=low
+ncurses6 (6.3+20221015) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 08 Oct 2022 06:25:44 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 15 Oct 2022 07:57:10 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 02acf867934581c2ea2cb30c47b73f788111d694..5e966c7b26407f44f03ff933501473e6a9ff4714 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.545 2022/10/08 10:25:44 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.546 2022/10/15 11:57:10 tom Exp $\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"\r
 !define VERSION_MINOR "3"\r
 !define VERSION_YYYY  "2022"\r
-!define VERSION_MMDD  "1008"\r
+!define VERSION_MMDD  "1015"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 7645a57c0669fe62d1b34729a47e5f76a7ac6441..b5e6e7ce9c20c48ae79ba69fda159e531c74b5d3 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.3
-Release: 20221008
+Release: 20221015
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 20f06a1a3c185f95a089a7e8009d981a330bbbf8..4ee4da1a9c1234252efe9cc39914cfde62381ca3 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.3
-Release: 20221008
+Release: 20221015
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index af9e0dfa8531f09d98e1fdca37b54ff9dab5cbb9..a9b645ff5efb4f2898e59a973ae84b8003ce64e3 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.3
-Release: 20221008
+Release: 20221015
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index fac04b27c487c83f09d107849640811f57b062be..88df01a24a0dfe9967453370d9c06db0a3f9a2a4 100644 (file)
@@ -27,7 +27,7 @@ dnl sale, use or other dealings in this Software without prior written       *
 dnl authorization.                                                           *
 dnl***************************************************************************
 dnl
-dnl $Id: aclocal.m4,v 1.207 2022/09/10 19:31:11 tom Exp $
+dnl $Id: aclocal.m4,v 1.208 2022/10/02 23:55:56 tom Exp $
 dnl
 dnl Author: Thomas E. Dickey
 dnl
@@ -4347,7 +4347,7 @@ esac
 
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 60 updated: 2022/09/10 15:16:16
+dnl CF_XOPEN_SOURCE version: 62 updated: 2022/10/02 19:55:56
 dnl ---------------
 dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
 dnl or adapt to the vendor's definitions to get equivalent functionality,
@@ -4398,7 +4398,7 @@ case "$host_os" in
        cf_xopen_source="-D_SGI_SOURCE"
        cf_XOPEN_SOURCE=
        ;;
-(linux*gnu|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
+(linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
        CF_GNU_SOURCE($cf_XOPEN_SOURCE)
        ;;
 (minix*)
index 6cc12021ac18d160d86fe9aa1e9150218cc4f175..e9ac60309d7d6af8388b43a14d6403656b4ad2a7 100755 (executable)
@@ -4044,7 +4044,7 @@ case "$host_os" in
        cf_xopen_source="-D_SGI_SOURCE"
        cf_XOPEN_SOURCE=
        ;;
-(linux*gnu|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
+(linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
 
 cf_gnu_xopen_source=$cf_XOPEN_SOURCE