mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-21 08:38:15 +02:00
MSVC: Define _USE_MATH_DEFINES via meson.build
This way M_PI and other constants are available everywhere. The constants are behind a preprocessor macro because they aren't part of standard C.
This commit is contained in:
parent
1ec2a448e9
commit
c988a8e36e
5 changed files with 2 additions and 9 deletions
|
|
@ -102,6 +102,7 @@ if cc.get_id() == 'msvc'
|
|||
language : ['c', 'cpp'])
|
||||
add_project_arguments(['-D_CRT_SECURE_NO_WARNINGS',
|
||||
'-D_CRT_NONSTDC_NO_WARNINGS',
|
||||
'-D_USE_MATH_DEFINES',
|
||||
], language : ['c', 'cpp'])
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
*/
|
||||
|
||||
#include "cairo-perf.h"
|
||||
#define _USE_MATH_DEFINES /* for M_SQRT2 on win32 */
|
||||
|
||||
#include <math.h>
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -55,9 +55,6 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define _USE_MATH_DEFINES
|
||||
#endif
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ typedef unsigned __int64 uint64_t;
|
|||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <float.h>
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -46,10 +46,6 @@
|
|||
#include <stdlib.h> /* mkstemp */
|
||||
#include <string.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define _USE_MATH_DEFINES /* for M_LN2, M_PI and M_SQRT2 on win32 */
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
#include <limits.h> /* INT_MAX */
|
||||
#include <assert.h>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue