Bug 34546

Summary: xrdb regression: -P breaks m4
Product: xorg Reporter: pw
Component: App/xrdbAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: enhancement    
Priority: low CC: jeremyhu
Version: 7.6 (2010.12)   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard: 2011BRB_Reviewed
i915 platform: i915 features:

Description pw 2011-02-21 15:03:50 UTC
Freedesktop bug 32701 fixed an xrdb regression related
to cpp changes by adding a "-P" option when invoking
the preprocessor.

This causes errors when the preprocessor is m4.  This snippet
worked fine for many years:

Spider.geometry:   ifelse(HEIGHT, 1200, 900x1380+400+-158,
                          HEIGHT, 1024, 900x1204+355+-158,
                          HEIGHT,  768, 910x950+100+-158,
                          802x750+-2+-146)

but with "-P", m4 does not expand ifelse(), and the geometry
is not set correctly.

Is there a way to add the "-P" _only_ for the cpp in
gcc-4.5 perhaps, or only when the "-cpp" argument is
_not_ specified?  I have a lot of work invested in using
m4 on resource files.

This version of xrdb comes from debian
x11-xserver-utils-7.6+1 on amd64.
Comment 1 Jeremy Huddleston Sequoia 2011-10-06 01:07:06 UTC
Actually, I don't think we ever expected m4 to be used there.  The option is 
called "cpp" which should give a hint as to what is expected.

If you want to add support for m4, I suggest you provide a patch.  Please send 
one to xorg-devel for review, so others can review it.
Comment 2 Alan Coopersmith 2013-07-23 03:44:17 UTC
Fix pushed to git master for the next release:
http://cgit.freedesktop.org/xorg/app/xrdb/commit/?id=ec7b273fd135a14a2ca6c19cd0e6afe1536db552

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.