[Mesa-dev] [PATCH] Fix _GNUC__ typo in check for gcc 3.x for _mesa_bitcount

Alan Coopersmith alan.coopersmith at oracle.com
Fri Oct 21 15:26:00 PDT 2011


On 10/21/11 12:30, Brian Paul wrote:
> How about doing something like:
>
> #if __GNUC__ * 10 + __GNUC_MINOR__ < 34
>
> I find that a bit easier to follow.

The X.Org headers I'm more familiar with do something very much like
that, just with a little protection against the possibility of gcc
someday hitting double-digit releases (4.10 for instance):

#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)

It looks like mesa already has that style used as well, in
src/gallium/include/pipe/p_config.h & include/KHR/khrplatform.h.

I'll submit a new patch to adopt this style for the mesa_bitcount
checks.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the mesa-dev mailing list