[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Pan-users] glib 2.16 patch update
From: |
Daniel Rahn |
Subject: |
Re: [Pan-users] glib 2.16 patch update |
Date: |
Tue, 8 Apr 2008 07:43:33 +0200 |
User-agent: |
KMail/1.9.9 |
On Tuesday 08 April 2008 01:03:19 CSV4ME2 wrote:
> i'm running 2.10.13 and willing to give it a try.
> what do i need to do ?
> a svn checkout of some sort or .. ?
Give the attached patch a try.
Duncan and me are in slight disagreement on the conditionals here.
The attached patch removed the conditionals for Glib2 version for a
specific reason:
I have no idea what happened between 2.14 and 2.15, and between 2.15 and
2.16.
Therefore the patch now does:
- Moves all glib includes to a central file pan/general/glib-compat.h
- In that file first include glib.h. This will include most needed
files for current glib version already, minus the gi18n.h that
Duncan mentioned
- After including glib.h, include the needed includes for older
glib version. This also includes the gi18n.h
So there are some obvious tricks we are using here:
Newer glib version do include almost all needed files from within the
glib.h. For older versions glib.h does not contain these includes but
the single include directives in glib-compat.h take care of that. And
the single includes also catches files that are not in glib.h in newer
version. That simplifies that code a little bit and makes it more
readable (one conditional less, no double includes).
Since everything is done in one file now, the preprocessor/compiler will
optimize duplicate function definitions away. So we should have no
binary size impact.
Ideally, this should make Pan more robust against glib moving defines
from one include to another and at the same time contain backwards
compatibility.
And btw, patch is against 0.132 but should apply against SVN as well.
As Duncan mentioned, test compiles on all current openSUSE releases went
fine. Patch will be checked into 11.0
As soon as our build system starts talking to me again, I'll go down in
the revision history and check older glib versions.
-Daniel
pan-glib_compat.diff
Description: Text Data