summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVojtech Vitek (V-Teq) <vvitek@redhat.com>2011-10-26 15:07:34 +0200
committerVojtech Vitek (V-Teq) <vvitek@redhat.com>2011-10-26 15:07:41 +0200
commitff523ef24cd35dcc530ceeb5c6868a3f913bb43d (patch)
tree6db6226a75c29d848a41b5f1d35ac0344e285961
parentd7f98751f799177f066b47581af1377422980f7b (diff)
downloadtcsh-rebase-6.19.00-ff523ef24cd35dcc530ceeb5c6868a3f913bb43d.tar.gz
tcsh-rebase-6.19.00-ff523ef24cd35dcc530ceeb5c6868a3f913bb43d.tar.xz
tcsh-rebase-6.19.00-ff523ef24cd35dcc530ceeb5c6868a3f913bb43d.zip
Fix negative number of jobs with %%j formatting parameter in prompt
-rw-r--r--tcsh-6.17.00-negative_jobs.patch13
-rw-r--r--tcsh.spec3
2 files changed, 16 insertions, 0 deletions
diff --git a/tcsh-6.17.00-negative_jobs.patch b/tcsh-6.17.00-negative_jobs.patch
new file mode 100644
index 0000000..7037115
--- /dev/null
+++ b/tcsh-6.17.00-negative_jobs.patch
@@ -0,0 +1,13 @@
+diff -up tcsh-6.17.00/tc.prompt.c.orig tcsh-6.17.00/tc.prompt.c
+--- tcsh-6.17.00/tc.prompt.c.orig 2010-06-17 12:40:40.422571577 +0200
++++ tcsh-6.17.00/tc.prompt.c 2010-06-17 12:41:28.628519727 +0200
+@@ -526,6 +526,9 @@ tprintf(int what, const Char *fmt, const
+ int njobs = -1;
+ struct process *pp;
+
++ if (!proclist.p_next)
++ njobs++;
++
+ for (pp = proclist.p_next; pp; pp = pp->p_next)
+ njobs++;
+ p = Itoa(njobs, 1, attributes);
diff --git a/tcsh.spec b/tcsh.spec
index 9bcdcc7..9ce2c29 100644
--- a/tcsh.spec
+++ b/tcsh.spec
@@ -23,6 +23,7 @@ Patch14: tcsh-6.17.00-history.patch
# Accepted by upstream:
Patch15: tcsh-6.17.00-printexitvalue.patch
Patch16: tcsh-6.17.00-testsuite.patch
+Patch17: tcsh-6.17.00-negative_jobs.patch
# Accepted by upstream (tcsh-6.17.03b http://bugs.gw.com/view.php?id=109):
Patch19: tcsh-6.17.00-wait-intr.patch
# Accepted by upstream (tcsh-6.17.03b http://bugs.gw.com/view.php?id=112):
@@ -68,6 +69,7 @@ like syntax.
%patch14 -p1 -b .history
%patch15 -p1 -b .printexitvalue
%patch16 -p1 -b .testsuite
+%patch17 -p1 -b .negative_jobs
%patch19 -p1 -b .wait-intr
%patch21 -p1 -b .dont-set-empty-remotehost
%patch22 -p1 -b .dont-print-history-on-verbose
@@ -147,6 +149,7 @@ fi
%{_mandir}/man1/*.1*
%changelog
+- Fix negative number of jobs with %%j formatting parameter in prompt
- Clean-up patches numbers & order (prepare space for missing RHEL-6 patches)
- Disable obsolete glob-automount.patch; The issue should have been
(and is now) fixed in glibc (posix/glob.c)