[cairo] [cairo-announce] cairo release 1.4.4 now available

Peter Weilbacher (Mozilla) mozilla at weilbacher.org
Fri Apr 20 11:54:00 PDT 2007


Dave Yeo wrote:
> On Fri, 13 Apr 2007 17:46:38 -0700, Carl Worth wrote:
> 
>> A new cairo release 1.4.4 is now available from:
>>
>>        http://cairographics.org/releases/cairo-1.4.4.tar.gz
> 
> Hi, seems OS/2 needs this patch applied. At least with 1.4.4.
> Also unluckily the compile ends here
> if f:/usr/bin/sh.exe ../libtool --tag=CC --mode=compile gcc.exe -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../pixman/src -I/usr/local/include/freetype2   -I/usr/local/include   -I/usr/local/include/libpng12     -Wall -Wsign-compare -Werror-implicit-function-declaration -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wno-unused-parameter -fno-strict-aliasing    -g -O2 -MT cairo-scaled-font.lo -MD -MP -MF ".deps/cairo-scaled-font.Tpo" -c -o cairo-scaled-font.lo cairo-scaled-font.c; \
> 	then mv -f ".deps/cairo-scaled-font.Tpo" ".deps/cairo-scaled-font.Plo"; else rm -f ".deps/cairo-scaled-font.Tpo"; exit 1; fi
>  gcc.exe -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../pixman/src -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include/libpng12 -Wall -Wsign-compare -Werror-implicit-function-declaration -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wno-unused-parameter -fno-strict-aliasing -g -O2 -MT cairo-scaled-font.lo -MD -MP -MF .deps/cairo-scaled-font.Tpo -c cairo-scaled-font.c  -DDLL_EXPORT -DPIC -o .libs/cairo-scaled-font.o
> cairo-scaled-font.c: In function `_cairo_scaled_font_fini':
> cairo-scaled-font.c:446: error: invalid lvalue in assignment
> make[2]: *** [cairo-scaled-font.lo] Error 1
> make[2]: Leaving directory `I:/usr/src/cairo-1.4.4/src'
> Dave

With the current master I see the same error somewhere else:

   cairo-mutex-list-private.h: In function `_cairo_mutex_finalize':
   cairo-mutex-list-private.h:35: error: invalid lvalue in assignment
   cairo-mutex-list-private.h:37: error: invalid lvalue in assignment
   cairo-mutex-list-private.h:38: error: invalid lvalue in assignment
   cairo-mutex-list-private.h:41: error: invalid lvalue in assignment

Looking at the preprocessed code, I see the following:

   cairo_mutex_t _cairo_pattern_solid_cache_lock = 0;;
[...]
   DosCreateMutexSem (((void *)0), &_cairo_pattern_solid_cache_lock, 0L, 0);;
[...]
   do {
       if (0 != (&_cairo_pattern_solid_cache_lock)) {
           DosCloseMutexSem (*(&_cairo_pattern_solid_cache_lock));
           (&_cairo_pattern_solid_cache_lock) = 0;
       }
   } while (0);

So we once have "_cairo_pattern_solid_cache_lock = 0" which is
correct since cairo_mutex_t is ULONG on OS/2 and once
"&_cairo_pattern_solid_cache_lock = 0" which is wrong. The fix for this
is

   --- a/src/cairo-mutex-private.h
   +++ b/src/cairo-mutex-private.h
   @@ -113,7 +113,7 @@ typedef int cairo_mutex_t;
    # define CAIRO_MUTEX_FINI(mutex) do {                          \
        if (0 != (mutex)) {                                                \
            DosCloseMutexSem (*(mutex));                           \
   -        (mutex) = 0;                                           \
   +        (*(mutex)) = 0;                                                \
        }                                                          \
    } while (0)
    # define CAIRO_MUTEX_NIL_INITIALIZER 0

which I just pushed. Now the build breaks in cairo-perf-posix.c...

   Peter.


More information about the cairo mailing list