xrdb on many systems use mcpp instead of cpp as it declares in the manpage.
ASIDE: Also there is no easy way (without using trace commands) to see what preprocessor it is using, and what the output of the preprocessor is.
The preprocessor mcpp adds a space after all its defines, but a common use for those defines is in 'file path' components. For example...
#define HOME /home/user
The result of this is the setting..
*BitmapFilePath: /home/user /icons:/usr/include/X11/bitmaps
Which is clearly incorrect.
Please ensure that either cpp is used (which does not add a space to the end of defines) or add a -@kr or -@old option to mcpp.
Also add a option to check which cpp is actually used, AND/OR output the result
of the cpp, so it can be checked.
This bug has also been previously reported to the redhat bugzilla
xrdb as provided by X.Org looks for a program named "cpp".
If distros have provided mcpp as cpp, or passed --with-cpp=mcpp as Fedora does:
we can't stop them from introducing bugs in their packages like this.
(In reply to Alan Coopersmith from comment #1)
> xrdb as provided by X.Org looks for a program named "cpp".
> If distros have provided mcpp as cpp, or passed --with-cpp=mcpp as Fedora
> we can't stop them from introducing bugs in their packages like this.
How about the requested option to help debug cpp problems with xrdb?
Such an option could be useful, which is why I didn't just close this out as
"Not Our Bug", but I don't know when anyone will have time to write the code
xrdb --help will show the default preprocessor:
-cpp filename preprocessor to use [/usr/lib/cpp]
xrdb -n will show the parsed output
What seems to be missing is an option to show the cpp output before xrdb parses it. I've added a -E flag (name taken from cc -E since I couldn't think of any
better name) that shows both the full cpp command line (with all the -D/-I/etc.
flags) and the generated output file.
Patch submitted for code review: