Red Hat Bugzilla – Bug 802559
Xfuncproto.h breaks development of legacy (C89) applications in EL6
Last modified: 2013-02-21 02:56:46 EST
Support request: Case 00612891
This issue affects versions of xorg-x11-proto-devel shipped with EL6.
While testing EL4 to EL6 migration of a development host we discovered that the variable argument macro definition for _X_NONNULL in /usr/include/X11/Xfuncproto.h caused our legacy X-Windows development tool "UIMX" to fail with the following error.
UIM/X: "/usr/include/X11/Xfuncproto.h", line 136: error: 2039 expected an identifier
UIM/X: #define _X_NONNULL(...) /* */
There are 1 bad or missing header file(s). UIM/X exiting.
As indicated in the xorg-devel mailing list, this will cause any C89 apps to break as variable argument macro definitions are not supported.
Confirmed bug on xorg-devel ML: http://lists.x.org/archives/xorg-devel/2011-August/024756.html
Reported by: Alan Coopersmith alan.coopersmith at oracle.com
Based on text in xorg-devel ML thread, bug-fix patch appears to have been committed upstream but no corresponding bug report could be found on https://bugs.freedesktop.org/
--- Xfuncproto.h.orig 2011-12-07 16:09:14.000000000 -0500
+++ Xfuncproto.h 2012-03-07 10:11:54.741663224 -0500
@@ -129,10 +129,12 @@
# define _X_ATTRIBUTE_PRINTF(x,y)
-/* requires xproto >= 7.0.22 */
+/* requires xproto >= 7.0.22 - since this uses either gcc or C99 variable
+ argument macros, must be only used inside #ifdef _X_NONNULL guards, as
+ many legacy X clients are compiled in C89 mode still. */
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
#define _X_NONNULL(args...) __attribute__((nonnull(args)))
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */
#define _X_NONNULL(...) /* */
We have patched Xfuncproto.h on the affected EL6 test machine and confirmed that this fixes the problem.
Red Hat has committed resources to develop a (private) patched RPM for EL6. This may find its way into the main distro.
Versions of xorg-x11-proto-devel shipped with EL4 and EL5 do not contain this flaw.
According to most recent xorg-x11-proto-devel SRPMs; FC15, FC16, and FC17 are also affected by this bug.
Xorg announced the release of xproto 7.0.23 on 15 March (yesterday) that contains a patch to resolve this issue.
FYI: Xorg also released over 40 other updates this month. I'm guessing that Fedora Xorg package maintainers are likely to include many of these in their updates in the weeks to come.
(In reply to comment #3)
> Red Hat has committed resources to develop a (private) patched RPM for EL6.
> This may find its way into the main distro.
I'm curious what you're basing this statement on.
The Red Hat support developer assigned to the support case cited told me that he was developing a patched RPM.
Created attachment 571531 [details]
patch used in test RPM
Patch used during testing
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development. This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release. Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.