Bug 3413 - [PATCH] predefined cpp macros can produce unexpected resuls in xrdb
Summary: [PATCH] predefined cpp macros can produce unexpected resuls in xrdb
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: App/xrdb (show other bugs)
Version: git
Hardware: x86 (IA32) OpenBSD
: high normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard: 2011BRB_Reviewed
Keywords: patch
Depends on:
Blocks:
 
Reported: 2005-05-27 14:08 UTC by Matthieu Herrb
Modified: 2013-07-20 02:03 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
proposed patch (1.52 KB, patch)
2005-05-27 14:09 UTC, Matthieu Herrb
no flags Details | Splinter Review

Description Matthieu Herrb 2005-05-27 14:08:43 UTC
GNU cpp is predefining a number of symbols, depending on the host and target
architecture. This can produce some unexpected results: for example, the
expansion of CLIENTHOST if the host name is i386.my.domain.

The attached patch creates a new -undef option to xrdb that is passed to cpp.
Should it be on by default ?
Comment 1 Matthieu Herrb 2005-05-27 14:09:14 UTC
Created attachment 2781 [details] [review]
proposed patch
Comment 2 Erik Andren 2006-04-18 05:08:32 UTC
added patch keyword
Comment 3 Daniel Stone 2007-02-27 01:26:51 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 4 Matt Turner 2010-12-03 12:52:45 UTC
I sent this patch to xorg-devel for discussion/review. This bug report is obviously not doing much, so I'm going to close it.
Comment 5 Jeremy Huddleston Sequoia 2011-10-03 20:42:59 UTC
Hey Matt, where did this go?  The patch looks fine to me:

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>

I think we should leave it off by default as someone might actually be doing 
something like #ifdef __i386__ in their .Xresources.
Comment 6 Matthieu Herrb 2011-10-03 23:43:51 UTC
(In reply to comment #5)
> Hey Matt, where did this go?  The patch looks fine to me:
> 
> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
> 
> I think we should leave it off by default as someone might actually be doing 
> something like #ifdef __i386__ in their .Xresources.

Yes this is the kind of reasons that made this patch stall. I'll revisit the issue and push the fix disabled. Thanks for reviewing it.
Comment 7 Matt Turner 2011-10-04 07:06:37 UTC
(In reply to comment #5)
> Hey Matt, where did this go?  The patch looks fine to me:
> 
> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
> 
> I think we should leave it off by default as someone might actually be doing 
> something like #ifdef __i386__ in their .Xresources.

I sent it off: http://lists.x.org/archives/xorg-devel/2010-December/thread.html#16525

but there were corner cases that made people wary of committing it.
Comment 8 Alan Coopersmith 2013-07-20 02:03:19 UTC
I pushed the version that leaves the default the same as current, but lets
you specify -undef to pass the -undef flag to cpp.


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.