[PATCH:libX11 6/8] Check for symbol existence with #ifdef, not #if.
Alan Coopersmith
alan.coopersmith at oracle.com
Thu Jun 6 23:10:43 PDT 2013
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=a6d974dc59f2722b36e2df9d4f07aeee4f83ce43
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Engineering - http://blogs.oracle.com/alanc
More information about the xorg-devel
mailing list