mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-17 11:18:06 +02:00
MSVC: Define _CRT_NONSTDC_NO_WARNINGS
We follow the convention that POSIX functions which aren't part of C don't have an underscore.
This commit is contained in:
parent
ad631c609a
commit
1ec2a448e9
5 changed files with 3 additions and 17 deletions
|
|
@ -100,7 +100,9 @@ if cc.get_id() == 'msvc'
|
|||
# Turn "<function> undefined, assuming extern returning int" to an error
|
||||
'/we4013',
|
||||
language : ['c', 'cpp'])
|
||||
add_project_arguments('-D_CRT_SECURE_NO_WARNINGS', language : ['c', 'cpp'])
|
||||
add_project_arguments(['-D_CRT_SECURE_NO_WARNINGS',
|
||||
'-D_CRT_NONSTDC_NO_WARNINGS',
|
||||
], language : ['c', 'cpp'])
|
||||
endif
|
||||
|
||||
add_project_arguments('-D_GNU_SOURCE', language: ['c', 'cpp'])
|
||||
|
|
|
|||
|
|
@ -154,20 +154,11 @@
|
|||
#endif
|
||||
|
||||
#if (defined(__WIN32__) && !defined(__WINE__)) || defined(_MSC_VER)
|
||||
#define access _access
|
||||
#ifndef R_OK
|
||||
#define R_OK 4
|
||||
#endif
|
||||
#define fdopen _fdopen
|
||||
#define hypot _hypot
|
||||
#define pclose _pclose
|
||||
#define popen _popen
|
||||
#define strdup _strdup
|
||||
#define unlink _unlink
|
||||
#if defined (_MSC_VER) && _MSC_VER < 1900
|
||||
#define vsnprintf _vsnprintf
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && defined(_M_IX86)
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@
|
|||
#include <io.h>
|
||||
#define F_OK 0
|
||||
#define HAVE_MKDIR 1
|
||||
#define mkdir _mkdir
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
|
|
|
|||
|
|
@ -56,12 +56,7 @@ typedef unsigned __int64 uint64_t;
|
|||
|
||||
#ifdef _MSC_VER
|
||||
#define _USE_MATH_DEFINES
|
||||
|
||||
#include <float.h>
|
||||
#if _MSC_VER <= 1600
|
||||
#define isnan(x) _isnan(x)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if HAVE_FENV_H
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@
|
|||
|
||||
#ifdef _MSC_VER
|
||||
#define _USE_MATH_DEFINES /* for M_LN2, M_PI and M_SQRT2 on win32 */
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue