pkg-kde: commit - rev 138 - trunk/packages/kdelibs/debian/patches
Author: domi-guest
Date: 2004-06-26 10:20:40 -0600 (Sat, 26 Jun 2004)
New Revision: 138
Modified:
trunk/packages/kdelibs/debian/patches/10_kstandarddirs.diff
Log:
Commit patch for #227538
Here's a bit of explanation:
I'll try to explain it again: It's all about the string
comparison: If somestring is a variable of type "char*", then
'somestring == "something"' in C++ and C is not a string
comparison, but a pointer comparison. It checks that the variable
somestring points to the same region of memory that "something" is
put in. Now, the C++ standard leaves some behaviour wrt. string
storage undefined, but what g++ does, is that if it finds two
string literals containing the same thing, it stores them only
once, if the two strings are in the same compile unit or link unit
or whatever unit it takes for this. Anyway, what happens in your
case ( where it works properly ) is that, the first time that the
function is called with "something" as an argument, it is by
chance one of the identical strings in the same compile unit, and
the check happens to succeed. The function then caches the result
it just calculated, and all further invocations of the function
give the correct result. However, if the first invocation of the
function happens to be a string from another compile unit, then
the pointer comparison fails, the function calculates the wrong
result, and this result is cached for all further invocations. I
debugged the bug that was described in this bug report, and this
is in fact the case.
Modified: trunk/packages/kdelibs/debian/patches/10_kstandarddirs.diff
===================================================================
--- trunk/packages/kdelibs/debian/patches/10_kstandarddirs.diff 2004-06-17 21:28:04 UTC (rev 137)
+++ trunk/packages/kdelibs/debian/patches/10_kstandarddirs.diff 2004-06-26 16:20:40 UTC (rev 138)
@@ -6,7 +6,7 @@
candidates->append(path);
}
+ // UGLY HACK - Chris Cheney
-+ if (local && ("config" == type))
++ if (local && (!strcmp("config", type)))
+ candidates->append("/etc/kde3/");
+ //
local = false;
Reply to: