mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-03-30 08:20:38 +02:00
[win32] Misc win32 compilation fixes
Fix win32/MSVC defines for snprintf, inline, and M_PI
This commit is contained in:
parent
dbd0fa193c
commit
3c5a02c3ed
2 changed files with 11 additions and 0 deletions
5
src/cairoint.h
Normal file → Executable file
5
src/cairoint.h
Normal file → Executable file
|
|
@ -65,6 +65,11 @@
|
|||
#include "cairo.h"
|
||||
#include <pixman.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define snprintf _snprintf
|
||||
#define inline __inline
|
||||
#endif
|
||||
|
||||
CAIRO_BEGIN_DECLS
|
||||
|
||||
#if __GNUC__ >= 3 && defined(__ELF__)
|
||||
|
|
|
|||
6
test/cairo-test.h
Normal file → Executable file
6
test/cairo-test.h
Normal file → Executable file
|
|
@ -53,6 +53,12 @@ typedef unsigned __int64 uint64_t;
|
|||
#error Cannot find definitions for fixed-width integral types (uint8_t, uint32_t, \etc.)
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define _USE_MATH_DEFINES
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
|
||||
typedef enum cairo_test_status {
|
||||
CAIRO_TEST_SUCCESS = 0,
|
||||
CAIRO_TEST_FAILURE,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue