From d3120c63c5ec7a517162814181197186b0b88e48 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Thu, 26 Feb 2009 11:24:36 +0000 Subject: [PATCH] fix build issue against gcc44 --- kdelibs-4.2.0-gcc44-misc.patch | 47 ++++++++++++++++++++++++++++++++++ kdelibs.spec | 7 ++++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 kdelibs-4.2.0-gcc44-misc.patch diff --git a/kdelibs-4.2.0-gcc44-misc.patch b/kdelibs-4.2.0-gcc44-misc.patch new file mode 100644 index 0000000..63e580a --- /dev/null +++ b/kdelibs-4.2.0-gcc44-misc.patch @@ -0,0 +1,47 @@ +diff -up kdelibs-4.2.0/kdeui/util/fixx11h.h.orig kdelibs-4.2.0/kdeui/util/fixx11h.h +--- kdelibs-4.2.0/kdeui/util/fixx11h.h.orig 2008-05-21 13:08:51.000000000 +0200 ++++ kdelibs-4.2.0/kdeui/util/fixx11h.h 2009-02-26 12:14:01.000000000 +0100 +@@ -251,13 +251,21 @@ const int FontChange = XFontChange; + #ifndef FIXX11H_index + #define FIXX11H_index + inline ++#if defined __cplusplus && __GNUC_PREREQ (4, 4) ++char* Xindex( char* s, int c ) ++#else + char* Xindex( const char* s, int c ) ++#endif + { + return index( s, c ); + } + #undef index + inline ++#if defined __cplusplus && __GNUC_PREREQ (4, 4) ++char* index( char* s, int c ) ++#else + char* index( const char* s, int c ) ++#endif + { + return Xindex( s, c ); + } +@@ -271,13 +279,21 @@ char* index( const char* s, int c ) + #ifndef FIXX11H_rindex + #define FIXX11H_rindex + inline ++# if defined __cplusplus && __GNUC_PREREQ (4, 4) ++char* Xrindex( char* s, int c ) ++#else + char* Xrindex( const char* s, int c ) ++#endif + { + return rindex( s, c ); + } + #undef rindex + inline ++# if defined __cplusplus && __GNUC_PREREQ (4, 4) ++char* rindex( char* s, int c ) ++#else + char* rindex( const char* s, int c ) ++#endif + { + return Xrindex( s, c ); + } diff --git a/kdelibs.spec b/kdelibs.spec index cbcad08..fa50f69 100644 --- a/kdelibs.spec +++ b/kdelibs.spec @@ -1,6 +1,6 @@ Summary: K Desktop Environment 4 - Libraries Version: 4.2.0 -Release: 16%{?dist} +Release: 17%{?dist} %if 0%{?fedora} > 8 Name: kdelibs @@ -81,6 +81,7 @@ Patch22: kdelibs-4.1.96-cmake.patch Patch23: kdelibs-4.2.0-gcc44-workaround.patch # disable strict aliasing in kjs/dtoa.cpp (GCC 4.4 x86_64 crash) (#485968) Patch24: kdelibs-4.2.0-kjs-gcc44-crash.patch +Patch25: kdelibs-4.2.0-gcc44-misc.patch # upstream # 4.3 branch @@ -227,6 +228,7 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage %patch22 -p1 -b .kdepimlibs-cmake %patch23 -p1 -b .gcc44 %patch24 -p1 -b .kjs-gcc44-crash +%patch25 -p1 -b .gcc44-misc # upstream patches %patch101 -p1 -b .AllowExternalPaths @@ -415,6 +417,9 @@ rm -rf %{buildroot} %changelog +* Thu Feb 26 2009 Than Ngo 4.2.0-17 +- fix build issue against gcc44 + * Wed Feb 25 2009 Than Ngo - 4.2.0-16 - fix files conflicts with 3.5.x