public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/qepcad-B] f44: Add Debian patch to fix hang when char is unsigned
@ 2026-11-30 22:22 Jerry James
  0 siblings, 0 replies; only message in thread
From: Jerry James @ 2026-11-30 22:22 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/qepcad-B
Branch : f44
Commit : c0dde05e38c201543c335a8c3de30ac3ae2367e1
Author : Jerry James <loganjerry@gmail.com>
Date   : 2026-11-30T15:22:30-07:00
Stats  : +78/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/qepcad-B/c/c0dde05e38c201543c335a8c3de30ac3ae2367e1?branch=f44

Log:
Add Debian patch to fix hang when char is unsigned

---
diff --git a/qepcad-B-signed-char-eof.patch b/qepcad-B-signed-char-eof.patch
new file mode 100644
index 0000000..5c7af71
--- /dev/null
+++ b/qepcad-B-signed-char-eof.patch
@@ -0,0 +1,70 @@
+Description: Use signed char when reading input.
+ Otherwise, EOF will be read as 255 instead of -1 on architectures that default
+ to unsigned chars (e.g., ARM and PowerPC).
+Author: Doug Torrance <dtorrance@piedmont.edu>
+Bug-Debian: https://bugs.debian.org/996561
+Forwarded: https://github.com/chriswestbrown/qepcad/pull/3
+Last-Update: 2021-10-18
+
+--- source/db/convenientstreams.h.orig
++++ source/db/convenientstreams.h
+@@ -29,7 +29,7 @@
+   slwcistream(istream& in, option opt = none)
+   {
+     string s = "";
+-    char c = in.get(); 
++    signed char c = in.get();
+     if (opt == skipleadingws) 
+       while(c != EOF && (isspace(c) || (c == '\\' && isspace(in.peek())))) c = in.get();
+     // States  : 0 = normal, 1 = in comment, 2 = just read a backslash
+@@ -92,7 +92,7 @@
+     // States  : 0 = normal, 1 = in comment, 2 = just read a backslash
+     istream & in = *trueIn;
+     int state = 0;
+-    char c;
++    signed char c;
+     while(ls < buffSize - extra && (c = in.get()))
+     {
+       if (c == EOF) break;
+--- extensions/rend/rend.h.orig
++++ extensions/rend/rend.h
+@@ -43,7 +43,7 @@
+   singlelinestream(istream& in, option opt = none)
+   {
+     string s = "";
+-    char c = in.get(); if (opt == skipleadingws) while(c != EOF && isspace(c)) c = in.get();
++    signed char c = in.get(); if (opt == skipleadingws) while(c != EOF && isspace(c)) c = in.get();
+     while(c != '\n' && c != EOF) { s += c; c = in.get(); }
+     str(s);
+   }
+--- source/convenientstreams.h.orig
++++ source/convenientstreams.h
+@@ -26,7 +26,7 @@
+   slwcistream(istream& in, option opt = none)
+   {
+     string s = "";
+-    char c = in.get(); 
++    signed char c = in.get();
+     if (opt == skipleadingws) 
+       while(c != EOF && (isspace(c) || c == '\\' && isspace(in.peek()))) c = in.get();
+     // States  : 0 = normal, 1 = in comment, 2 = just read a backslash
+@@ -88,7 +88,7 @@
+     // States  : 0 = normal, 1 = in comment, 2 = just read a backslash
+     istream & in = *trueIn;
+     int state = 0;
+-    char c;
++    signed char c;
+     while(ls < buffSize - extra && (c = in.get()))
+     {
+       if (c == EOF) break;
+--- extensions/rend/PLOT2DCAD2FILE.cc.orig
++++ extensions/rend/PLOT2DCAD2FILE.cc
+@@ -38,7 +38,7 @@
+   bool 
+     z = true, // show zero dimensional cell
+     c = true; // make a plot in color
+-  char g;
++  signed char g;
+   while((g = lin.get()) && g != EOF) {
+     switch(g) {
+     case 'z': z = false; break;

diff --git a/qepcad-B.spec b/qepcad-B.spec
index 088ae61..2fb1b02 100644
--- a/qepcad-B.spec
+++ b/qepcad-B.spec
@@ -1,6 +1,6 @@
 Name:           qepcad-B
 Version:        1.74
-Release:        12%{?dist}
+Release:        13%{?dist}
 Summary:        Quantifier elimination tool
 
 License:        ISC
@@ -32,6 +32,10 @@ Patch:          %{name}-unused.patch
 Patch:          %{name}-tty.patch
 # Adapt to GCC 6
 Patch:          %{name}-gcc6.patch
+# When char is unsigned, qepcad-B hangs while reading its rc file
+# Patch courtesy of Doug Torrance
+# See https://bugzilla.redhat.com/show_bug.cgi?id=2587560
+Patch:          %{name}-signed-char-eof.patch
 
 # See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
 ExcludeArch:    %{ix86}
@@ -117,6 +121,9 @@ ln -s %{_bindir}/qepcad %{buildroot}%{_datadir}/qepcad/bin
 %{_datadir}/qepcad/
 
 %changelog
+* Mon Nov 30 2026 Jerry James  <loganjerry@gmail.com> - 1.74-13
+- Add Debian patch to fix hang when char is unsigned
+
 * Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.74-12
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-30 22:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30 22:22 [rpms/qepcad-B] f44: Add Debian patch to fix hang when char is unsigned Jerry James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox