Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 347758 - x11-apps/xrdb-1.0.7 ignores continuation lines; runtime error with GCC 4.5
Summary: x11-apps/xrdb-1.0.7 ignores continuation lines; runtime error with GCC 4.5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo X packagers
URL: http://bugs.freedesktop.org/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-4.5
  Show dependency tree
 
Reported: 2010-12-04 20:10 UTC by Ulrich Müller
Modified: 2011-02-15 21:06 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed patch for xrdb.c (xrdb-1.0.7-cpp.patch,407 bytes, patch)
2010-12-11 19:55 UTC, Ulrich Müller
Details | Diff
xrdb-1.0.7-cpp.patch (0001-Call-C-preprocessor-with-P-option-changed-behaviour-.patch,2.96 KB, patch)
2011-01-08 15:50 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2010-12-04 20:10:00 UTC
I've the following in my .Xdefaults (unchanged since a long time):

    *VT100.Translations: #override \
        <Key>BackSpace: string(0x7F)\n\
        <Key>Delete:    string("\033[3~")

With xrdb-1.0.7 and gcc-4.5.1, the backslash for line continuation doesn't work any more. xrdb -q shows that each of the above lines will end up in an own resource:

*VT100.Translations:    #override
<Key>BackSpace: string(0x7F)\n
<Key>Delete:    string("\033[3~")

Whereas with gcc-4.4.5 everything is as it should be:

*VT100.Translations: #override    <Key>BackSpace: string(0x7F)\n    <Key>Delete: string("\033[3~")

The problem depends only on the gcc version selected at run time. It doesn't matter if xrdb is compiled with gcc 4.4 or 4.5.


My guess is that it's caused by this change of C preprocessor behaviour: <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41748>
So adding option -P or -traditional-cpp to the cpp call should fix the problem.

See also OpenSuSE bug <https://bugzilla.novell.com/show_bug.cgi?id=615036>.
Comment 1 Ulrich Müller gentoo-dev 2010-12-11 19:55:48 UTC
Created attachment 256924 [details, diff]
Proposed patch for xrdb.c

Attached patch fixes the problem for me.
Comment 2 Helmut Jarausch 2010-12-28 12:14:55 UTC
(In reply to comment #1)
> Created an attachment (id=256924) [details]
> Proposed patch for xrdb.c
> 
> Attached patch fixes the problem for me.
> 

I've been looking around for some problems with X-applications which have failed
recently. Your patch fixes these.

Please raise the priority since this is a very ugly bug which should be fixed ASAP.
Thanks,
Helmut
Comment 3 Chí-Thanh Christopher Nguyễn gentoo-dev 2010-12-28 12:37:40 UTC
What is the upstream status of this?

x11 team generally is reluctant to take patches which upstream has not even commented on.
Comment 4 Ulrich Müller gentoo-dev 2010-12-28 15:19:18 UTC
(In reply to comment #3)
> What is the upstream status of this?

Is bugs.freedesktop.org the right location to report this?

(I hadn't contacted upstream, because I had assumed that the OpenSuSE folks would forward their identical issue.)
Comment 5 Chí-Thanh Christopher Nguyễn gentoo-dev 2010-12-28 15:34:25 UTC
Yes, report a bug at https://bugs.freedesktop.org/ and if possible, please also send a git formatted patch to xorg-devel@lists.x.org
Comment 6 Ulrich Müller gentoo-dev 2010-12-28 15:39:35 UTC
Reported upstream, see <http://bugs.freedesktop.org/show_bug.cgi?id=32701>.
Comment 7 Ulrich Müller gentoo-dev 2011-01-08 15:50:39 UTC
Created attachment 259295 [details, diff]
xrdb-1.0.7-cpp.patch

A modified patch has been applied upstream: <http://cgit.freedesktop.org/xorg/app/xrdb/commit/?id=117021570515fa985670f78d27376d636ed5490f>

Upstream has rebased my patch though and it can't be used for xrdb-1.0.7 any more.
Attached is the patch that I had originally sent and which cleanly applies to 1.0.7.
Comment 8 Ulrich Müller gentoo-dev 2011-02-15 21:06:36 UTC
This is fixed in xrdb-1.0.8. Therefore closing.