mirror of https://code.videolan.org/videolan/vlc
vlc_fixups: do warn about "deprecated" ANSI calls on Windows GDK
These functions are not available when linking, so we should avoid using them. Also mingw-w64 understands _CRT_NONSTDC_NO_DEPRECATE but not _CRT_NONSTDC_NO_WARNINGS.
This commit is contained in:
parent
f8cd81e4f5
commit
6946b06a17
|
@ -9,8 +9,12 @@
|
|||
// Windows is not a real POSIX system and doesn't provide this header
|
||||
// provide a dummy one so the code can compile
|
||||
|
||||
#if defined(_GAMING_XBOX_SCARLETT) || defined(_GAMING_XBOX_XBOXONE) || defined(_XBOX_ONE)
|
||||
# define _CRT_DECLARE_NONSTDC_NAMES 0
|
||||
#else
|
||||
// many functions commonly found in unistd.h are found in io.h and process.h
|
||||
#define _CRT_DECLARE_NONSTDC_NAMES 1
|
||||
# define _CRT_DECLARE_NONSTDC_NAMES 1
|
||||
#endif
|
||||
#include <io.h>
|
||||
#include <process.h>
|
||||
|
||||
|
|
|
@ -28,8 +28,11 @@
|
|||
|
||||
#if defined(_MSC_VER)
|
||||
// disable common warnings when compiling POSIX code
|
||||
#ifndef _CRT_NONSTDC_NO_WARNINGS
|
||||
#define _CRT_NONSTDC_NO_WARNINGS 1
|
||||
#ifndef _CRT_NONSTDC_NO_DEPRECATE
|
||||
// the POSIX variants are not available in the GDK
|
||||
# if !(defined(_GAMING_XBOX_SCARLETT) || defined(_GAMING_XBOX_XBOXONE) || defined(_XBOX_ONE))
|
||||
# define _CRT_NONSTDC_NO_DEPRECATE
|
||||
# endif
|
||||
#endif
|
||||
#ifndef _CRT_SECURE_NO_WARNINGS
|
||||
#define _CRT_SECURE_NO_WARNINGS 1
|
||||
|
|
Loading…
Reference in New Issue