rpms/ncurses/devel ncurses-5.7-20100116-wattrsetunused.patch, NONE, 1.1 ncurses-5.7-20100116-windowlist.patch, NONE, 1.1 ncurses.spec, 1.93, 1.94
Miroslav Lichvar
mlichvar at fedoraproject.org
Wed Jan 20 12:19:23 UTC 2010
Author: mlichvar
Update of /cvs/pkgs/rpms/ncurses/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20007
Modified Files:
ncurses.spec
Added Files:
ncurses-5.7-20100116-wattrsetunused.patch
ncurses-5.7-20100116-windowlist.patch
Log Message:
- fix narrow/wide libtinfo compatibility
- fix wattrset macro to not produce warning with current gcc (#556645)
ncurses-5.7-20100116-wattrsetunused.patch:
curses.h.in | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- NEW FILE ncurses-5.7-20100116-wattrsetunused.patch ---
diff -up ncurses-5.7/include/curses.h.in.wattrsetunused ncurses-5.7/include/curses.h.in
--- ncurses-5.7/include/curses.h.in.wattrsetunused 2010-01-19 13:40:06.000000000 +0100
+++ ncurses-5.7/include/curses.h.in 2010-01-19 14:18:35.000000000 +0100
@@ -1104,11 +1104,9 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NA
#if !NCURSES_OPAQUE
#if defined(_XOPEN_SOURCE_EXTENDED) && @NCURSES_EXT_COLORS@
#define wattrset(win,at) ((win)->_color = PAIR_NUMBER(at), \
- (win)->_attrs = (at), \
- NCURSES_CAST(int, (win)->_attrs))
+ NCURSES_CAST(int, (win)->_attrs = (at)))
#else
-#define wattrset(win,at) ((win)->_attrs = (at), \
- NCURSES_CAST(int, (win)->_attrs))
+#define wattrset(win,at) NCURSES_CAST(int, (win)->_attrs = (at))
#endif
#endif /* NCURSES_OPAQUE */
ncurses-5.7-20100116-windowlist.patch:
curses.priv.h | 4 ++--
tinfo/lib_data.c | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
--- NEW FILE ncurses-5.7-20100116-windowlist.patch ---
diff -up ncurses-5.7/ncurses/curses.priv.h.windowlist ncurses-5.7/ncurses/curses.priv.h
--- ncurses-5.7/ncurses/curses.priv.h.windowlist 2010-01-19 17:37:05.000000000 +0100
+++ ncurses-5.7/ncurses/curses.priv.h 2010-01-19 17:41:59.000000000 +0100
@@ -1098,9 +1098,9 @@ extern NCURSES_EXPORT_VAR(SCREEN *) _nc_
extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
WINDOWLIST {
- WINDOW win; /* first, so WINDOW_EXT() works */
WINDOWLIST *next;
SCREEN *screen; /* screen containing the window */
+ WINDOW win; /* WINDOW_EXT() needs to account for offset */
#ifdef _XOPEN_SOURCE_EXTENDED
char addch_work[(MB_LEN_MAX * 9) + 1];
unsigned addch_used; /* number of bytes in addch_work[] */
@@ -1109,7 +1109,7 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T)
#endif
};
-#define WINDOW_EXT(win,field) (((WINDOWLIST *)(win))->field)
+#define WINDOW_EXT(win,field) (((WINDOWLIST *)((void **)win - 2))->field)
#define SP_PRE_INIT(sp) \
sp->_cursrow = -1; \
diff -up ncurses-5.7/ncurses/tinfo/lib_data.c.windowlist ncurses-5.7/ncurses/tinfo/lib_data.c
--- ncurses-5.7/ncurses/tinfo/lib_data.c.windowlist 2010-01-19 17:37:05.000000000 +0100
+++ ncurses-5.7/ncurses/tinfo/lib_data.c 2010-01-19 17:45:24.000000000 +0100
@@ -260,8 +260,7 @@ _nc_screen_of(WINDOW *win)
SCREEN *sp = 0;
if (win != 0) {
- WINDOWLIST *wp = (WINDOWLIST *) win;
- sp = wp->screen;
+ sp = WINDOW_EXT(win, screen);
}
return (sp);
}
Index: ncurses.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ncurses/devel/ncurses.spec,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -p -r1.93 -r1.94
--- ncurses.spec 18 Jan 2010 16:14:09 -0000 1.93
+++ ncurses.spec 20 Jan 2010 12:19:23 -0000 1.94
@@ -1,7 +1,7 @@
Summary: Ncurses support utilities
Name: ncurses
Version: 5.7
-Release: 4.20100116%{?dist}
+Release: 5.20100116%{?dist}
License: MIT
Group: System Environment/Base
URL: http://invisible-island.net/ncurses/ncurses.html
@@ -15,6 +15,8 @@ Patch9: ncurses-5.6-20070612-libs.patch
Patch11: ncurses-5.6-20080112-urxvt.patch
Patch12: ncurses-5.6-20080628-kbs.patch
Patch13: ncurses-5.7-20100116-transformdeps.patch
+Patch14: ncurses-5.7-20100116-wattrsetunused.patch
+Patch15: ncurses-5.7-20100116-windowlist.patch
BuildRequires: gpm-devel pkgconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -99,6 +101,8 @@ The ncurses-static package includes stat
%patch11 -p1 -b .urxvt
%patch12 -p1 -b .kbs
%patch13 -p1 -b .transformdeps
+%patch14 -p1 -b .wattrsetunused
+%patch15 -p1 -b .windowlist
# this will be in documentation, drop executable bits
cp -p install-sh test
@@ -276,6 +280,10 @@ bzip2 NEWS
rm -rf ${RPM_BUILD_ROOT}
%changelog
+* Wed Jan 20 2010 Miroslav Lichvar <mlichvar at redhat.com> 5.7-5.20100116
+- fix narrow/wide libtinfo compatibility
+- fix wattrset macro to not produce warning with current gcc (#556645)
+
* Mon Jan 18 2010 Miroslav Lichvar <mlichvar at redhat.com> 5.7-4.20100116
- update to patch 20100116
- don't require -ltinfo when linking with --no-add-needed
More information about the scm-commits
mailing list