[PATCH libX11] Xlib.h: Fix macros imitating C functions.

Alan Coopersmith alan.coopersmith at oracle.com
Thu Feb 4 23:51:28 UTC 2016


On 03/25/15 11:52 PM, Dominik Muth wrote:
> The basic rule "put parantheses around macro parameters" should be
> observed where possible. Otherwise code like
>
>      ConnectionNumber(foo = bar);
>
> fails to compile. (It obviously passes if ConnectionNumber is a C
> function.) There are several other macros amended for the same reason.
>
> This bug appeared while building http://ioccc.org/1993/cmills.c, so
> historically it was not present.

Yes, it appears to have been introduced when the structures were made
private and the cast was added inside the parentheses:

http://cgit.freedesktop.org/~alanc/xc-historical/commit/?id=cfd284e6be40dcb89447398a5ed9053449f98cc2

> Signed-off-by: Dominik Muth <muth at nxdomain.no-ip.biz>

Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

and pushed:

To ssh://git.freedesktop.org/git/xorg/lib/libX11
    3706b0f..4de6ed3  master -> master

Thanks for the fix!

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list