Age | Commit message (Collapse) | Author | Files | Lines |
|
Previously cairo-mutex-list-private.h assumed that every use of the file
will produce a statement for each mutex by including a semicolon after
each. But some uses (like enumerating all static mutexes in an array
for example, can't be implemented with the semicolon in place. So, move
the semicolon out to the users of the header file.
|
|
The macros CAIRO_BEGIN_DECLS and CAIRO_END_DECLS are declared in two
places: config.h and cairo.h. On Win32 build there is no config.h. So,
we can't rely on pulling CAIRO_BEGIN_DECLS from there. Hence, we now:
* Not add those declarations to config.h anymore,
* Test that every cairo private header includes some other cairo
header before any other includes.
These two are fairly enough to ensure that cairo.h is seen from all
private headers. There's still the case of headers not including
any header file at all. I'll fix that later.
|
|
Quick summary of changes:
- Move list of cairo source files out of src/Makefile.am and into
src/Sources.mk,
- Generate files src/Config.mk and src/Config.mk.win32 that choose
the right set of source files and headers based on configured
backends and features. This drastically simplifies building
using other build systems. The src/Makefile.win32 file needs
to be updated to reflect these changes.
- Add README files to various directories,
- Add toplevel HACKING file.
|
|
Essentially renaming cairo-mutex-type-private.h to cairo-mutex-impl-private.h
and changing all its namespace from cairo_mutex to cairo_mutex_impl.
cairo-mutex-type-private.h then does all the sanity checks on the
implementation that used to be in cairo-mutex-private.h. Plus, defines macros
for the cairo-mutex namespace to map to the cairo-mutex-impl namespace. This
extra mapping layer allows for add debugging facilities.
|
|
|
|
The wrapping of GCC attributes (such as cairo_private) needs to be
visible to any header file, including those that avoid cairoint.h such
as cairo-boilerplate. To achieve this we move the pre-processor magic to
its own header file and include it as required.
|
|
These were recently added, (as part of sparse integration?), but they
break boilerplate which reaches into at least cairo-types-private.h
and cairo-scaled-font-private.h. But boilerplate cannot see cairoint.h
or else it gets the internal sybol renaming, (with the INT_ prefix),
and then all the test suite tests refuse to link.
If this change reverts some recently-added functionality, (or
cleanliness), then we'll just need to find some other way to add that
back again without the breakage.
|
|
There are still some bits not quite working.
|
|
implementation
to make them better match the design I have in mind, that I will
document in a minute. They are a lot more readable and understandable
now.
|
|
Previously cairo-mutex.c was abusing cairo-mutex-private.h by
defining CAIRO_MUTEX_DECLARE before including it, and
cairo-mutex-private.h was simply not overriding any available
CAIRO_MUTEX_DECLARE. This is not the way it should be.
cairo-mutex.c should instead define CAIRO_MUTEX_DECLARE and
include cairo-mutex-list-private.h for itself.
|
|
We have defaults for the rest.
|
|
This is more consistent with CAIRO_MUTEX_LOCK/UNLOCK.
|
|
|
|
|
|
cairo-mutex-type-private.h
This fixes the problem reported by Dave Yeo that boilerplate wasn't building:
In file included from ../src/cairo-scaled-font-private.h:44,
from cairo-boilerplate.c:65:
../src/cairo-mutex-private.h:183: error: syntax error before "extern"
../src/cairo-mutex-private.h:184: error: syntax error before "void"
../src/cairo-mutex-private.h:185: error: syntax error before "void"
make[3]: *** [cairo-boilerplate.lo] Error 1
|
|
This was breaking build on some systems as reported by Adrian Johnson
on the list.
|
|
The WINVER macros need to be defined before including <windows.h>.
As a result of some recent include file rearranging, <windows.h>
was included indirectly before WINVER was defined.
|
|
just for fun.
|
|
|
|
|
|
cairo_mutex_t is HTMX which is ULONG on OS/2, so we have to set the
mutex itself to 0 and not the address...
|
|
#warning
otherwise we will cause compile errors before the sanity check macros get
a chance to err.
|
|
|
|
|
|
about undefined CAIRO_MUTEX macros.
|
|
to 1.
|
|
about undefined CAIRO_MUTEX macros.
|
|
|
|
that uses CAIRO_MUTEX_NIL_INITIALIZER. This used to be the
implementation for pthread because pthread_mutex_init() is
broken. See d48bb4fbe876a93199ba48fcf5f32734fbe18ba9.
|
|
|
|
|
|
|
|
We use the generic initialization if CAIRO_MUTEX_INITIALIZE is not
defined.
|
|
|
|
Previously we were lucky enough to have them included before us
|
|
|
|
|
|
Also add it (and cairo-mutex-private.h) to Makefile.am
where they should have been.
|
|
|
|
All mutex declarations have been moved to cairo-mutex-list.h.
This should avoid breaking of less frequently tested backends,
when mutexes are introduced or when existing mutexes are renamed.
Instead of initializing mutexes on library startup, mutexes are
lazily initialized within the few entry points of now by calling
CAIRO_MUTEX_INITIALIZE(). Currently only the OS/2 backend takes
care about releasing global mutexes. Therefore there is no counter
part of that macro for finalizing all global mutexes yet - but
as cairo-backend-os2.c shows such a function would be quite
easy to implement.
|