[Pixman] [PATCH] Fix pixman build with older GCC releases

Brad Smith brad at comstyle.com
Sat Aug 10 12:11:00 PDT 2013


----- Original message -----
> On Fri, Aug 9, 2013 at 6:47 PM, Brad Smith <brad at comstyle.com> wrote:
> > The following diff fixes building pixman with older GCC releases such
> > as GCC 3.3.
> > 
> > 
> > diff --git a/pixman/pixman-matrix.c b/pixman/pixman-matrix.c
> > index 89b9682..cacc05c 100644
> > --- a/pixman/pixman-matrix.c
> > +++ b/pixman/pixman-matrix.c
> > @@ -37,7 +37,8 @@
> > static force_inline int
> > count_leading_zeros (uint32_t x)
> > {
> > -#ifdef __GNUC__
> > +#if defined(__GNUC__) && \
> > +             (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
> > return __builtin_clz (x);
> > #else
> > int n = 0;
> > 
> > --
> 
> No objections, but I'm just curious: why?

Some of the archs OpenBSD runs on utilize GCC 3.3.6.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Pixman mailing list