Bug 35044 - xdm should pass e.g. --std=c99 to cpp
Summary: xdm should pass e.g. --std=c99 to cpp
Status: CLOSED WONTFIX
Alias: None
Product: xorg
Classification: Unclassified
Component: App/xdm (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-05 14:40 UTC by Samuel Thibault
Modified: 2011-10-15 16:44 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Samuel Thibault 2011-03-05 14:40:56 UTC
Hello,

Please see http://bugs.debian.org/81090 for the original report.
Basically, the issue is that when putting "linux" in
/etc/X11/xdm/Xresources_0
it gets replaced by "1", because cpp #defines linux to 1, for #ifdef
linux C code tests. One solution could be to pass --std=c99 to cpp,
since then it has to strictly respect macro namespace, i.e. not define
anything that doesn't start with two underscores, which should be fine
enough for xdm user uses.

Samuel
Comment 1 Alan Coopersmith 2011-03-06 09:25:28 UTC
xdm doesn't call cpp - it calls xrdb to load the Xresources, so changes to
this would not just be limited to xdm's resources.   (And if we did change
it, --std=c99 is not portable enough, as not all platforms use GNU cpp.)

We've noticed the same issue for years with "sun", but changing this
would break everyone that has ~/.Xresources with things like #ifdef linux
and #ifdef sun to share their .Xresources across multiple machines.

You could put #undef linux in affected Xresources or quote strings you don't
want the preprocessor to change.


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.