Restore usage of rmstar

OBS-URL: https://build.opensuse.org/package/show/shells/tcsh?expand=0&rev=63
This commit is contained in:
Dr. Werner Fink 2016-12-01 11:55:55 +00:00 committed by Git OBS Bridge
parent e821affcd8
commit 3649aca1c4
3 changed files with 48 additions and 0 deletions

39
tcsh-6.20-rmstar.patch Normal file
View File

@ -0,0 +1,39 @@
From 766c095e4c8c57aea196a1325e395f5d6162cdce Mon Sep 17 00:00:00 2001
From: "David Kaspar [Dee'Kej]" <dkaspar@redhat.com>
Date: Mon, 28 Nov 2016 17:48:29 +0100
Subject: [PATCH] Regression of 'rm *' when 'rmstar' is set fixed
This regression was introduced by commit: 858a705a79a5389
Signed-off-by: David Kaspar [Dee'Kej] <dkaspar@redhat.com>
---
sh.func.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sh.func.c b/sh.func.c
index a866076..b0dfbc9 100644
--- a/sh.func.c
+++ b/sh.func.c
@@ -2734,16 +2734,17 @@ nlsclose(void)
int
getYN(const char *prompt)
{
- int doit, c;
+ int doit;
+ char c;
xprintf("%s", prompt);
flush();
- (void) force_read(SHIN, &c, 1);
+ (void) force_read(SHIN, &c, sizeof(c));
/*
* Perhaps we should use the yesexpr from the
* actual locale
*/
doit = (strchr(CGETS(22, 14, "Yy"), c) != NULL);
- while (c != '\n' && force_read(SHIN, &c, 1) == 1)
+ while (c != '\n' && force_read(SHIN, &c, sizeof(c)) == 1)
continue;
return doit;
}
--
2.7.4

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Dec 1 11:53:40 UTC 2016 - werner@suse.de
- Add patch tcsh-6.20-rmstar.patch from mailing list to restore
the correct behaviour of `rm *' if rmstar is set
-------------------------------------------------------------------
Fri Nov 25 08:41:32 UTC 2016 - werner@suse.de

View File

@ -37,6 +37,8 @@ Patch9: tcsh-6.18.03-history-file-locking.patch
Patch10: tcsh-6.18.03-history-merge.dif
# PATCH-FIX-SUSE fix history file locking: first unlock then close
Patch11: tcsh-6.19.00-history-file-locking-order.patch
# PATCH-FIX-COMUNITY fix handling of rmstar
Patch12: tcsh-6.20-rmstar.patch
BuildRequires: autoconf
BuildRequires: fdupes
BuildRequires: ncurses-devel
@ -65,6 +67,7 @@ correction, a history mechanism, job control, and a C-like syntax.
%patch9 -b .histlock
%patch10 -b .histmerg
%patch11 -b .histlckord
%patch12 -p1 -b .rmstar
%patch0 -b .0
%build