mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 12:18:01 +02:00
Fix PDF ouput when cross-compiling with mingw
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.
This commit is contained in:
parent
3d9db511c6
commit
4c7784e91e
2 changed files with 5 additions and 5 deletions
|
|
@ -111,8 +111,11 @@ CAIRO_BEGIN_DECLS
|
|||
#define __attribute__(x)
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef __WIN32__
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#undef inline
|
||||
#define inline __inline
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -36,16 +36,13 @@
|
|||
#include "cairoint.h"
|
||||
|
||||
#include "cairo-output-stream-private.h"
|
||||
#include "cairo-compiler-private.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <locale.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define snprintf _snprintf
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
|
||||
void
|
||||
_cairo_output_stream_init (cairo_output_stream_t *stream,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue