summaryrefslogtreecommitdiff
path: root/src/cairo-compiler-private.h
AgeCommit message (Collapse)AuthorFilesLines
2009-03-21[win32] Use _hypot instead of hypotVladimir Vukicevic1-0/+1
The hypot symbol is deprecated on Win32, and nonexistent on Windows CE
2009-03-20[msvc] Fix definition of CAIRO_ENSURE_UNIQUE for non-x86Jeff Muizelaar1-1/+1
The current definition of CAIRO_ENSURE_UNIQUE uses x86 assembly so make sure we only compile it when targeting x86.
2009-02-19Relanding: Add CAIRO_ENSURE_UNIQUE macro and use it in _cairo_error()Jeff Muizelaar1-0/+24
When using MSVC, _cairo_error() can be folded into other identical functions. If that happens, _cairo_error isn't really useful anymore. Using the CAIRO_ENSURE_UNIQUE macro makes sure this doesn't happen. Use __asm to serve as a line delimiter. This allows us to use the __asm{} block in a macro.
2009-02-19Revert "Add CAIRO_ENSURE_UNIQUE macro and use it in _cairo_error()"Jeff Muizelaar1-24/+0
This reverts commit 126824f5e6279f56dab0c040394b6c326b848cf7. It turns out MSVC doesn't handle line continuation characters in __asm{} blocks very well, so revert for now until I come up with something that works.
2009-02-19Add CAIRO_ENSURE_UNIQUE macro and use it in _cairo_error()Jeff Muizelaar1-0/+24
When using MSVC, _cairo_error() can be folded into other identical functions. If that happens, _cairo_error isn't really useful anymore. Using the CAIRO_ENSURE_UNIQUE macro makes sure this doesn't happen.
2009-02-12Divert pclose to _pclose for MSVCJeff Muizelaar1-0/+1
Commit bf62798b1284533e28b78717dac8070ca6d29e54 added a diversion for popen but not for pclose. This is needed for linking the boilerplate with the test suite.
2008-11-19[compiler] likelihood macrosChris Wilson1-4/+4
Behdad prefers these to be upper-case to be consistent with G_UNLIKELY and friends. However, as I intend to use these for nearly all instances of if(status), I suggest that we keep to the short and not so loud: if (unlikely (status)) return status;
2008-11-13Add predicate likelihood macros.Chris Wilson1-0/+17
Define the couple of standard macros that we can use to guide gcc optimisations of which code path will be most likely taken.
2008-10-14[check-doc-syntax.sh] Allow quoting.Chris Wilson1-11/+11
func_regexp was incorrectly complaining that cairo_pure was a function without parenthesis. The simplest solution appeared to be allow quoting of 'cairo_pure'.
2008-10-14Add documentation for function attributes 'pure' and 'const'.Chris Wilson1-0/+20
Carl suggested that cairo_pure and cairo_const are pretty opaque, even to the developer who added them, so it is extremely important that they have a good description so that they are used correctly and perhaps ported to other compilers.
2008-10-07[wideint] Declare the wideint arithmetic functions as const.Chris Wilson1-0/+2
'const' is a stricter form of 'pure' in that functions declared with that attribute do not access any values other than their arguments (in contrast to 'pure' which is allowed to read from global memory).
2008-10-06[wideint] Mark functions as pureChris Wilson1-0/+6
Take advantage of the gcc function attribute 'pure', which tells gcc that the function result only depends upon its arguments and it has zero side effects (e.g. it does not clobber memory). This gives gcc greater opportunity to rearrange and optimize the wideint arithmetic.
2008-09-19Make sure (and check) that all private headers include some cairo header firstBehdad Esfahbod1-0/+2
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.
2008-09-10[cairo-compiler-private.h] Divert popen to _popen for MSVCChris Wilson1-0/+1
Microsoft uses _popen instead of popen - required to build the boilerplate but not actually used on Windows (by default)!
2008-09-02Revamp the build system.Behdad Esfahbod1-3/+3
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.
2008-08-17[cairo-compiler-private.h] Clear definition of __attribute__Chris Wilson1-0/+1
Avoid a redefinition error when playing silly tricks with 'cpp -U__GNUC__'.
2008-05-28[cairo-compiler-private] Make it build with wineBehdad Esfahbod1-1/+1
One can build cairo with wine easily now: ./configure CC=winegcc LD=winegcc
2008-03-03Fix msvc compilation issue in cairo-compiler-private.hVladimir Vukicevic1-1/+1
__WIN32__ is not a standard define set by MSVC; we have to check for __WIN32__ (for mingw/gcc) and for _MSC_VER, for MSVC.
2008-02-28Fix PDF ouput when cross-compiling with mingwJody Goldberg1-1/+4
Need to use __WIN32__ instead of _MSC_VER to select _snprintf in place of snprintf when cross compiling. Otherwise all all %ld arguments get misprinted resulting in broken PDF output.
2008-01-20[cairoint.h] Move MSC inline macros into cairo-compiler-private.hBehdad Esfahbod1-0/+10
where they belong
2008-01-11[check] Replace compiled symbol visibility checker with shell script.Chris Wilson1-3/+2
Behdad Esfahbod objected to the execution of a compiled program to check symbol visibility as it makes cross-compilation more difficult. Instead of executing the program, this method conditionally exports a variable if cairo uses symbol hiding and scans the executable for that symbol in a similar manner to check-def.sh. This has the slight advantage of using the Makefile for performing the compilation, rather than attempting to invoke $(CPP) from a shell script within the test environment.
2008-01-11[check] Skip def/plt tests if the compiler doesn't support symbol hiding.Chris Wilson1-0/+3
Compile a trivial program such that it reports whether cairo is hiding its internal symbols and skip the tests that depend upon it. This prevents false errors, such as bug 12726, where the user is presented with a scary make check failure.
2007-09-25Move GCC attributes wrapping into a separate header.Chris Wilson1-0/+115
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.