Skip to content

Commit

Permalink
ncurses 6.2 - patch 20210320
Browse files Browse the repository at this point in the history
+ improve parameter-checking in tput by forcing it to analyze any
  extended string capability, e.g., as used in the Cs and Ms
  capabilities of the tmux description (report by Brad Town,
  cf: 20200531).
+ remove an incorrect free in the fallback (non-checking) version of
  _nc_free_and_exit (report by Miroslav Lichvar).
+ correct use-ordering in some xterm-direct flavors -TD
+ add hterm, hterm-256color (Mike Frysinger)
+ if the build-time compiler accepts c11's _Noreturn keyword, use that
  rather than gcc's attribute.
+ change configure-check for gcc's noreturn attribute to assume it is
  a prefix rather than suffix, matching c11's _Noreturn convention.
+ add "lint" rule to c++/Makefile, e.g., with cppcheck.
  • Loading branch information
ThomasDickey committed Mar 21, 2021
1 parent bec7104 commit c265010
Show file tree
Hide file tree
Showing 54 changed files with 3,478 additions and 3,110 deletions.
36 changes: 32 additions & 4 deletions Ada95/aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey
dnl
dnl $Id: aclocal.m4,v 1.171 2021/01/06 01:29:44 tom Exp $
dnl $Id: aclocal.m4,v 1.172 2021/03/20 16:31:13 tom Exp $
dnl Macros used in NCURSES Ada95 auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
Expand Down Expand Up @@ -550,6 +550,33 @@ AC_SUBST(BUILD_EXEEXT)
AC_SUBST(BUILD_OBJEXT)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_C11_NORETURN version: 1 updated: 2021/03/20 12:00:25
dnl ---------------
AC_DEFUN([CF_C11_NORETURN],
[
AC_CACHE_CHECK([for C11 _Noreturn feature], cf_cv_c11_noreturn,
[AC_TRY_COMPILE([
#include <stdio.h>
#include <stdlib.h>
#include <stdnoreturn.h>
static void giveup(void) { exit(0); }
],
[if (feof(stdin)) giveup()],
cf_cv_c11_noreturn=yes,
cf_cv_c11_noreturn=no)
])
if test "$cf_cv_c11_noreturn" = yes; then
AC_DEFINE(HAVE_STDNORETURN_H, 1)
AC_DEFINE_UNQUOTED(STDC_NORETURN,_Noreturn,[Define if C11 _Noreturn keyword is supported])
HAVE_STDNORETURN_H=1
else
HAVE_STDNORETURN_H=0
fi
AC_SUBST(HAVE_STDNORETURN_H)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_CC_ENV_FLAGS version: 10 updated: 2020/12/31 18:40:20
dnl ---------------
dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
Expand Down Expand Up @@ -1274,13 +1301,14 @@ fi
AC_SUBST(EXTRA_CFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GCC_ATTRIBUTES version: 23 updated: 2021/01/03 18:30:50
dnl CF_GCC_ATTRIBUTES version: 24 updated: 2021/03/20 12:00:25
dnl -----------------
dnl Test for availability of useful gcc __attribute__ directives to quiet
dnl compiler warnings. Though useful, not all are supported -- and contrary
dnl to documentation, unrecognized directives cause older compilers to barf.
AC_DEFUN([CF_GCC_ATTRIBUTES],
[AC_REQUIRE([AC_PROG_FGREP])dnl
AC_REQUIRE([CF_C11_NORETURN])dnl
if test "$GCC" = yes || test "$GXX" = yes
then
Expand Down Expand Up @@ -1317,8 +1345,8 @@ cat > "conftest.$ac_ext" <<EOF
#define GCC_SCANFLIKE(fmt,var) /*nothing*/
#endif
extern void wow(char *,...) GCC_SCANFLIKE(1,2);
extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
extern void foo(void) GCC_NORETURN;
extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
extern GCC_NORETURN void foo(void);
int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
EOF
cf_printf_attribute=no
Expand Down
Loading

0 comments on commit c265010

Please sign in to comment.