From e762b1bf39c1080e4155e0a592f22452130bdfc6 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sat, 20 May 2023 20:02:19 +0000 Subject: [PATCH] ncurses 6.4 - patch 20230520 + fixes for compiler warnings in MinGW environments. --- NEWS | 5 ++++- VERSION | 2 +- dist.mk | 4 ++-- ncurses/curses.priv.h | 11 ++++++++++- ncurses/tinfo/comp_parse.c | 6 +++--- ncurses/tinfo/comp_scan.c | 4 ++-- ncurses/trace/lib_trace.c | 10 ++++++---- 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 +- package/ncursest.spec | 2 +- 14 files changed, 39 insertions(+), 25 deletions(-) diff --git a/NEWS b/NEWS index 02e8d9f7..9eeeb572 100644 --- a/NEWS +++ b/NEWS @@ -26,7 +26,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.3953 2023/05/14 22:01:25 tom Exp $ +-- $Id: NEWS,v 1.3955 2023/05/20 18:39:29 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -46,6 +46,9 @@ 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. +20230520 + + fixes for compiler warnings in MinGW environments. + 20230514 + modify test-package "ncurses6-doc" to use manpage-aliases, which in turn required a change to the configure script to factor in the diff --git a/VERSION b/VERSION index d2f42775..8a66af02 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.4 20230514 +5:0:10 6.4 20230520 diff --git a/dist.mk b/dist.mk index a1d9f210..6bfa61d4 100644 --- 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.1544 2023/05/14 22:01:25 tom Exp $ +# $Id: dist.mk,v 1.1545 2023/05/20 14:39:41 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 = 4 -NCURSES_PATCH = 20230514 +NCURSES_PATCH = 20230520 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index 294ec594..5531c064 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -35,7 +35,7 @@ ****************************************************************************/ /* - * $Id: curses.priv.h,v 1.664 2023/04/29 19:10:30 tom Exp $ + * $Id: curses.priv.h,v 1.666 2023/05/20 18:20:39 tom Exp $ * * curses.priv.h * @@ -141,8 +141,17 @@ extern int errno; # endif #endif +#if (defined(__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO != 0) && (defined(__GNUC__) && (__GNUC__ < 12)) +# undef PRIxPTR /* gcc bug fixed in 12.x */ +# define PRIxPTR "lX" +# define CASTxPTR(n) (unsigned long)(intptr_t)(n) +#else +# define CASTxPTR(n) (intptr_t)(n) +#endif + #ifndef PRIxPTR # define PRIxPTR "lx" +# define CASTxPTR(n) (long)(n) #endif /* include signal.h before curses.h to work-around defect in glibc 2.1.3 */ diff --git a/ncurses/tinfo/comp_parse.c b/ncurses/tinfo/comp_parse.c index 53bdf8b0..74fba109 100644 --- a/ncurses/tinfo/comp_parse.c +++ b/ncurses/tinfo/comp_parse.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2021,2022 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -48,7 +48,7 @@ #include -MODULE_ID("$Id: comp_parse.c,v 1.131 2022/10/23 13:15:58 tom Exp $") +MODULE_ID("$Id: comp_parse.c,v 1.132 2023/05/20 18:08:48 tom Exp $") static void sanity_check2(TERMTYPE2 *, bool); NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2; @@ -225,7 +225,7 @@ _nc_read_entry_source(FILE *fp, char *buf, (T_CALLED("_nc_read_entry_source(" "file=%p, buf=%p, literal=%d, silent=%d, hook=%#" PRIxPTR ")"), - (void *) fp, buf, literal, silent, (intptr_t) hook)); + (void *) fp, buf, literal, silent, CASTxPTR(hook))); if (silent) _nc_suppress_warnings = TRUE; /* shut the lexer up, too */ diff --git a/ncurses/tinfo/comp_scan.c b/ncurses/tinfo/comp_scan.c index 01c1f8b7..c4b077de 100644 --- a/ncurses/tinfo/comp_scan.c +++ b/ncurses/tinfo/comp_scan.c @@ -51,7 +51,7 @@ #include #include -MODULE_ID("$Id: comp_scan.c,v 1.120 2023/04/29 19:54:37 tom Exp $") +MODULE_ID("$Id: comp_scan.c,v 1.121 2023/05/20 18:33:33 tom Exp $") /* * Maximum length of string capability we'll accept before raising an error. @@ -311,7 +311,7 @@ static long stream_pos(void) /* return our current character position in the input stream */ { - return (yyin ? ftell(yyin) : (bufptr ? bufptr - bufstart : 0)); + return (yyin ? ftell(yyin) : (bufptr ? (long) (bufptr - bufstart) : 0)); } static bool diff --git a/ncurses/trace/lib_trace.c b/ncurses/trace/lib_trace.c index effd3c1c..4b7d3942 100644 --- a/ncurses/trace/lib_trace.c +++ b/ncurses/trace/lib_trace.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2021,2022 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -48,7 +48,7 @@ #include -MODULE_ID("$Id: lib_trace.c,v 1.101 2022/09/17 14:57:02 tom Exp $") +MODULE_ID("$Id: lib_trace.c,v 1.102 2023/05/20 18:09:07 tom Exp $") NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */ @@ -267,11 +267,13 @@ _nc_va_tracef(const char *fmt, va_list ap) # if USE_WEAK_SYMBOLS if ((pthread_self)) # endif + fprintf(fp, "%#" PRIxPTR ":", #ifdef _NC_WINDOWS - fprintf(fp, "%#lx:", (long) (intptr_t) pthread_self().p); + CASTxPTR(pthread_self().p) #else - fprintf(fp, "%#lx:", (long) (intptr_t) pthread_self()); + CASTxPTR(pthread_self()) #endif + ); #endif if (before || after) { int n; diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog index 5b1e4ac2..8714f554 100644 --- a/package/debian-mingw/changelog +++ b/package/debian-mingw/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.4+20230514) unstable; urgency=low +ncurses6 (6.4+20230520) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sun, 14 May 2023 18:01:18 -0400 + -- Thomas E. Dickey Sat, 20 May 2023 10:39:41 -0400 ncurses6 (5.9+20131005) unstable; urgency=low diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog index 5b1e4ac2..8714f554 100644 --- a/package/debian-mingw64/changelog +++ b/package/debian-mingw64/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.4+20230514) unstable; urgency=low +ncurses6 (6.4+20230520) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sun, 14 May 2023 18:01:18 -0400 + -- Thomas E. Dickey Sat, 20 May 2023 10:39:41 -0400 ncurses6 (5.9+20131005) unstable; urgency=low diff --git a/package/debian/changelog b/package/debian/changelog index c7393cc8..6ac66463 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.4+20230514) unstable; urgency=low +ncurses6 (6.4+20230520) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sun, 14 May 2023 18:01:18 -0400 + -- Thomas E. Dickey Sat, 20 May 2023 10:39:41 -0400 ncurses6 (5.9+20120608) unstable; urgency=low diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi index c1e73fe0..1ecb27bf 100644 --- a/package/mingw-ncurses.nsi +++ b/package/mingw-ncurses.nsi @@ -1,4 +1,4 @@ -; $Id: mingw-ncurses.nsi,v 1.584 2023/05/14 22:01:25 tom Exp $ +; $Id: mingw-ncurses.nsi,v 1.585 2023/05/20 14:39:41 tom Exp $ ; TODO add examples ; TODO bump ABI to 6 @@ -10,7 +10,7 @@ !define VERSION_MAJOR "6" !define VERSION_MINOR "4" !define VERSION_YYYY "2023" -!define VERSION_MMDD "0514" +!define VERSION_MMDD "0520" !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD} !define MY_ABI "5" diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec index 1ed20576..ae1fe318 100644 --- a/package/mingw-ncurses.spec +++ b/package/mingw-ncurses.spec @@ -3,7 +3,7 @@ Summary: shared libraries for terminal handling Name: mingw32-ncurses6 Version: 6.4 -Release: 20230514 +Release: 20230520 License: X11 Group: Development/Libraries URL: https://invisible-island.net/ncurses/ diff --git a/package/ncurses.spec b/package/ncurses.spec index 9e401506..7ad1c6ba 100644 --- a/package/ncurses.spec +++ b/package/ncurses.spec @@ -1,7 +1,7 @@ Summary: shared libraries for terminal handling Name: ncurses6 Version: 6.4 -Release: 20230514 +Release: 20230520 License: X11 Group: Development/Libraries URL: https://invisible-island.net/ncurses/ diff --git a/package/ncursest.spec b/package/ncursest.spec index 9a437692..13baeff8 100644 --- a/package/ncursest.spec +++ b/package/ncursest.spec @@ -1,7 +1,7 @@ Summary: Curses library with POSIX thread support. Name: ncursest6 Version: 6.4 -Release: 20230514 +Release: 20230520 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz -- 2.45.0