Hello community,
here is the log from the commit of package octave for openSUSE:Factory checked in at 2019-06-06 18:15:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/octave (Old)
and /work/SRC/openSUSE:Factory/.octave.new.4811 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "octave"
Thu Jun 6 18:15:35 2019 rev:62 rq:706384 version:5.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/octave/octave.changes 2019-03-26 15:39:12.876329527 +0100
+++ /work/SRC/openSUSE:Factory/.octave.new.4811/octave.changes 2019-06-06 18:15:35.628716398 +0200
@@ -1,0 +2,7 @@
+Mon May 13 22:23:39 UTC 2019 - Duncan Mac-Vicar
+
+- Backport fix: pause and kbhit with glibc 2.28 end-of-file state
+ behavior (bug #55029)
+ * Added octave-bug-55029-fix_pause_and_kbhit_with_glibc_2_28.patch
+
+-------------------------------------------------------------------
New:
----
octave-bug-55029-fix_pause_and_kbhit_with_glibc_2_28.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ octave.spec ++++++
--- /var/tmp/diff_new_pack.vDY8AM/_old 2019-06-06 18:15:36.336716190 +0200
+++ /var/tmp/diff_new_pack.vDY8AM/_new 2019-06-06 18:15:36.336716190 +0200
@@ -84,6 +84,8 @@
Source3: octave.macros
# PATCH-FIX-OPENSUSE
Patch0: octave_tools_pie.patch
+# PATCH-FIX-UPSTREAM
+Patch1: octave-bug-55029-fix_pause_and_kbhit_with_glibc_2_28.patch
BuildRequires: arpack-ng-devel
# Required for Patch0
BuildRequires: autoconf
@@ -244,6 +246,7 @@
%if 0%{?suse_version} > 1315
# autoconf in Leap 42.x is to old, so we just build without -pie there
%patch0 -p1
+%patch1 -p1
%endif
# define octave_blas macros
++++++ octave-bug-55029-fix_pause_and_kbhit_with_glibc_2_28.patch ++++++
# HG changeset patch
# User Mike Miller
# Date 1554238576 25200
# Node ID c3716220d5b93c49e1c7cc8ebe0b76dd961f4ec7
# Parent fc73dafece570f201c18a4eb4a8729a654cfcfbb
fix pause and kbhit with glibc 2.28 end-of-file state behavior (bug #55029)
* sysdep.cc (octave::kbhit): Call "clearerr (stdin)" on end-of-file condition
in addition to "std::cin.clear ()". In glibc 2.28, end-of-file is persistent
and must be cleared by the application.
diff --git a/libinterp/corefcn/sysdep.cc b/libinterp/corefcn/sysdep.cc
--- a/libinterp/corefcn/sysdep.cc
+++ b/libinterp/corefcn/sysdep.cc
@@ -566,7 +566,10 @@
int c = std::cin.get ();
if (std::cin.fail () || std::cin.eof ())
- std::cin.clear ();
+ {
+ std::cin.clear ();
+ clearerr (stdin);
+ }
// Restore it, enabling system call restarts (if possible).
octave::set_interrupt_handler (saved_interrupt_handler, true);