Fix GtkBorder / GdkBorder struct definitions

This commit is contained in:
Kalev Lember 2015-12-17 19:59:10 +01:00
parent 75755c4760
commit 0b8d5daf35
3 changed files with 86 additions and 1 deletions

View File

@ -0,0 +1,45 @@
From 5190d010d95010a845715c719c3b85a75e0c513a Mon Sep 17 00:00:00 2001
From: William Hua <william.hua@canonical.com>
Date: Thu, 17 Dec 2015 12:18:03 -0500
Subject: [PATCH 1/2] gtkborder: restore original struct definition
We're going to add back the original struct definition removed by
a6e4de28, because using the typedef breaks all sorts of things like
gtkmm and WebKit, and having separate struct definitions allows us to
change the types in GdkBorder from gint16s to gints without breaking
ABI.
---
gtk/gtkborder.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/gtk/gtkborder.h b/gtk/gtkborder.h
index 6df53aa..adfa29e 100644
--- a/gtk/gtkborder.h
+++ b/gtk/gtkborder.h
@@ -34,6 +34,8 @@
G_BEGIN_DECLS
+typedef struct _GtkBorder GtkBorder;
+
#define GTK_TYPE_BORDER (gtk_border_get_type ())
/**
@@ -46,7 +48,13 @@ G_BEGIN_DECLS
* A struct that specifies a border around a rectangular area
* that can be of different width on each side.
*/
-typedef GdkBorder GtkBorder;
+struct _GtkBorder
+{
+ gint16 left;
+ gint16 right;
+ gint16 top;
+ gint16 bottom;
+};
GDK_AVAILABLE_IN_ALL
GType gtk_border_get_type (void) G_GNUC_CONST;
--
2.5.0

View File

@ -0,0 +1,31 @@
From 54fa65f544bef281640d18a4a725005f6199a956 Mon Sep 17 00:00:00 2001
From: William Hua <william.hua@canonical.com>
Date: Thu, 17 Dec 2015 12:38:35 -0500
Subject: [PATCH 2/2] gdkborder: change types from gint16 to gint
---
gdk/gdktypes.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h
index 17584b2..57dc0fe 100644
--- a/gdk/gdktypes.h
+++ b/gdk/gdktypes.h
@@ -107,10 +107,10 @@ typedef struct _GdkBorder GdkBorder;
*/
struct _GdkBorder
{
- gint16 left;
- gint16 right;
- gint16 top;
- gint16 bottom;
+ gint left;
+ gint right;
+ gint top;
+ gint bottom;
};
/**
--
2.5.0

View File

@ -18,7 +18,7 @@
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
Name: gtk3
Version: 3.19.5
Release: 1%{?dist}
Release: 2%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
@ -26,6 +26,10 @@ URL: http://www.gtk.org
Source: http://download.gnome.org/sources/gtk+/3.19/gtk+-%{version}.tar.xz
# Backported from upstream
Patch0: 0001-gtkborder-restore-original-struct-definition.patch
Patch1: 0002-gdkborder-change-types-from-gint16-to-gint.patch
BuildRequires: gnome-common autoconf automake intltool gettext
BuildRequires: pkgconfig(atk) >= %{atk_version}
BuildRequires: pkgconfig(atk-bridge-2.0)
@ -167,6 +171,8 @@ the functionality of the installed %{name} package.
%prep
%setup -q -n gtk+-%{version}
%patch0 -p1
%patch1 -p1
%build
@ -339,6 +345,9 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache
%{_datadir}/installed-tests
%changelog
* Thu Dec 17 2015 Kalev Lember <klember@redhat.com> - 3.19.5-2
- Fix GtkBorder / GdkBorder struct definitions
* Wed Dec 16 2015 Kalev Lember <klember@redhat.com> - 3.19.5-1
- Update to 3.19.5