[packages/ice] - fix building with gcc 11, rel 7

baggins baggins at pld-linux.org
Sun Oct 17 23:04:14 CEST 2021


commit 0139cfb754f857879f50bfeaaa49623f5ab7f9d2
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Oct 17 23:03:53 2021 +0200

    - fix building with gcc 11, rel 7

 gcc11.patch | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 ice.spec    |   4 +-
 2 files changed, 141 insertions(+), 1 deletion(-)
---
diff --git a/ice.spec b/ice.spec
index cc6ea8d..0a074f4 100644
--- a/ice.spec
+++ b/ice.spec
@@ -29,7 +29,7 @@ Summary:	The Ice base runtime and services
 Summary(pl.UTF-8):	Podstawowy pakiet uruchomieniowy oraz usługowy Ice
 Name:		ice
 Version:	3.6.3
-Release:	6
+Release:	7
 License:	GPL v2 with exceptions (see ICE_LICENSE)
 Group:		Applications
 #Source0Download: https://github.com/zeroc-ice/ice/releases
@@ -44,6 +44,7 @@ Patch0:		no-arch-opts.patch
 Patch1:		csharp-build.patch
 Patch2:		%{name}-db.patch
 Patch3:		%{name}-php7.patch
+Patch4:		gcc11.patch
 URL:		http://www.zeroc.com/
 BuildRequires:	bzip2-devel
 BuildRequires:	db-cxx-devel
@@ -220,6 +221,7 @@ Pakiet uruchomieniowy Ice dla aplikacji w PHP.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %if %{with java}
 # we nuke it only when we build new class later, as ice build system expects the file being around
diff --git a/gcc11.patch b/gcc11.patch
new file mode 100644
index 0000000..f5ea8d8
--- /dev/null
+++ b/gcc11.patch
@@ -0,0 +1,138 @@
+diff -ur ice-3.6.3/python/modules/IcePy/Operation.cpp ice-3.6.3-gcc11/python/modules/IcePy/Operation.cpp
+--- ice-3.6.3/python/modules/IcePy/Operation.cpp	2016-10-05 16:59:08.000000000 +0200
++++ ice-3.6.3-gcc11/python/modules/IcePy/Operation.cpp	2021-10-17 22:55:04.065560566 +0200
+@@ -1682,7 +1682,7 @@
+             }
+             else
+             {
+-                if(PyTuple_SET_ITEM(results.get(), info->pos, Unset) < 0)
++                if(PyTuple_SET_ITEM(results.get(), info->pos, Unset) != 0)
+                 {
+                     return 0;
+                 }
+@@ -2546,7 +2546,7 @@
+             throwPythonException();
+         }
+ 
+-        if(PyTuple_SET_ITEM(result.get(), 0, ok ? incTrue() : incFalse()) < 0)
++        if(PyTuple_SET_ITEM(result.get(), 0, ok ? incTrue() : incFalse()) != 0)
+         {
+             throwPythonException();
+         }
+@@ -2586,7 +2586,7 @@
+         }
+ #endif
+ 
+-        if(PyTuple_SET_ITEM(result.get(), 1, op.get()) < 0)
++        if(PyTuple_SET_ITEM(result.get(), 1, op.get()) != 0)
+         {
+             throwPythonException();
+         }
+@@ -2827,7 +2827,7 @@
+             return 0;
+         }
+ 
+-        if(PyTuple_SET_ITEM(args.get(), 0, ok ? incTrue() : incFalse()) < 0)
++        if(PyTuple_SET_ITEM(args.get(), 0, ok ? incTrue() : incFalse()) != 0)
+         {
+             return 0;
+         }
+@@ -2867,7 +2867,7 @@
+         memcpy(buf, results.first, sz);
+ #endif
+ 
+-        if(PyTuple_SET_ITEM(args.get(), 1, op.get()) < 0)
++        if(PyTuple_SET_ITEM(args.get(), 1, op.get()) != 0)
+         {
+             return 0;
+         }
+@@ -2910,7 +2910,7 @@
+             return;
+         }
+ 
+-        if(PyTuple_SET_ITEM(args.get(), 0, ok ? incTrue() : incFalse()) < 0)
++        if(PyTuple_SET_ITEM(args.get(), 0, ok ? incTrue() : incFalse()) != 0)
+         {
+             assert(PyErr_Occurred());
+             PyErr_Print();
+@@ -2958,7 +2958,7 @@
+         memcpy(buf, results.first, sz);
+ #endif
+ 
+-        if(PyTuple_SET_ITEM(args.get(), 1, op.get()) < 0)
++        if(PyTuple_SET_ITEM(args.get(), 1, op.get()) != 0)
+         {
+             assert(PyErr_Occurred());
+             PyErr_Print();
+@@ -3126,7 +3126,7 @@
+             return;
+         }
+ 
+-        if(PyTuple_SET_ITEM(args.get(), 0, ok ? incTrue() : incFalse()) < 0)
++        if(PyTuple_SET_ITEM(args.get(), 0, ok ? incTrue() : incFalse()) != 0)
+         {
+             assert(PyErr_Occurred());
+             PyErr_Print();
+@@ -3174,7 +3174,7 @@
+         memcpy(buf, results.first, sz);
+ #endif
+ 
+-        if(PyTuple_SET_ITEM(args.get(), 1, op.get()) < 0)
++        if(PyTuple_SET_ITEM(args.get(), 1, op.get()) != 0)
+         {
+             assert(PyErr_Occurred());
+             PyErr_Print();
+@@ -3302,7 +3302,7 @@
+                 }
+                 else
+                 {
+-                    if(PyTuple_SET_ITEM(args.get(), info->pos + offset, Unset) < 0)
++                    if(PyTuple_SET_ITEM(args.get(), info->pos + offset, Unset) != 0)
+                     {
+                         throwPythonException();
+                     }
+@@ -3329,7 +3329,7 @@
+     // Create an object to represent Ice::Current. We need to append this to the argument tuple.
+     //
+     PyObjectHandle curr = createCurrent(current);
+-    if(PyTuple_SET_ITEM(args.get(), PyTuple_GET_SIZE(args.get()) - 1, curr.get()) < 0)
++    if(PyTuple_SET_ITEM(args.get(), PyTuple_GET_SIZE(args.get()) - 1, curr.get()) != 0)
+     {
+         throwPythonException();
+     }
+@@ -3347,7 +3347,7 @@
+         }
+         obj->upcall = new UpcallPtr(this);
+         obj->encoding = current.encoding;
+-        if(PyTuple_SET_ITEM(args.get(), 0, (PyObject*)obj) < 0) // PyTuple_SET_ITEM steals a reference.
++        if(PyTuple_SET_ITEM(args.get(), 0, (PyObject*)obj) != 0) // PyTuple_SET_ITEM steals a reference.
+         {
+             Py_DECREF(obj);
+             throwPythonException();
+@@ -3698,7 +3698,7 @@
+     }
+ #endif
+ 
+-    if(PyTuple_SET_ITEM(args.get(), start, ip.get()) < 0)
++    if(PyTuple_SET_ITEM(args.get(), start, ip.get()) != 0)
+     {
+         throwPythonException();
+     }
+@@ -3710,7 +3710,7 @@
+     // this to the argument tuple.
+     //
+     PyObjectHandle curr = createCurrent(current);
+-    if(PyTuple_SET_ITEM(args.get(), start, curr.get()) < 0)
++    if(PyTuple_SET_ITEM(args.get(), start, curr.get()) != 0)
+     {
+         throwPythonException();
+     }
+@@ -3730,7 +3730,7 @@
+         }
+         obj->upcall = new UpcallPtr(this);
+         obj->encoding = current.encoding;
+-        if(PyTuple_SET_ITEM(args.get(), 0, (PyObject*)obj) < 0) // PyTuple_SET_ITEM steals a reference.
++        if(PyTuple_SET_ITEM(args.get(), 0, (PyObject*)obj) != 0) // PyTuple_SET_ITEM steals a reference.
+         {
+             Py_DECREF(obj);
+             throwPythonException();
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ice.git/commitdiff/0139cfb754f857879f50bfeaaa49623f5ab7f9d2



More information about the pld-cvs-commit mailing list