[PATCH:libX11 6/8] Check for symbol existence with #ifdef, not #if.

Jamey Sharp jamey at minilop.net
Fri Jun 7 06:13:10 PDT 2013


Since every other XTHREADS check in that earlier patch uses #ifdef, it
looks like it was just a mistake.

For this fix:
Reviewed-by: Jamey Sharp <jamey at minilop.net>

Jamey
On 06/ 2/13 11:49 AM, Thomas Klausner wrote:

> ---
>   src/XlibInt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/XlibInt.c b/src/XlibInt.c
> index b06e57b..92a4340 100644
> --- a/src/XlibInt.c
> +++ b/src/XlibInt.c
> @@ -239,7 +239,7 @@ void _XSeqSyncFunction(
>   static int
>   _XPrivSyncFunction (Display *dpy)
>   {
> -#if XTHREADS
> +#ifdef XTHREADS
>       assert(!dpy->lock_fns);
>   #endif
>       assert(dpy->synchandler == _XPrivSyncFunction);
>
>
The comment right before that function is:
/* NOTE: only called if !XTHREADS, or when XInitThreads wasn't called. */
which makes this sound intentional, but since even in the old monolith
I only see XTHREADS being defined or undefined, not defined with a false
value, I'm not sure when that would be hit.

Since Jamey just added this in 2010, we can ask him and see if he remembers
why he did used #if instead of #ifdef:

http://cgit.freedesktop.org/**xorg/lib/libX11/commit/?id=**
a6d974dc59f2722b36e2df9d4f07ae**ee4f83ce43<http://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=a6d974dc59f2722b36e2df9d4f07aeee4f83ce43>

-- 
        -Alan Coopersmith-              alan.coopersmith at oracle.com
         Oracle Solaris Engineering - http://blogs.oracle.com/alanc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20130607/f6366742/attachment.html>


More information about the xorg-devel mailing list