MinGW-w64: Add guards for MSVC macro definitions
Add a comment too.
This commit is contained in:
parent
b2691b8f6c
commit
0d6f0a4213
|
@ -476,6 +476,7 @@ if( CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
||||||
# in pcap-stdinc.h when compiling C++ files, e.g. the Qt UI
|
# in pcap-stdinc.h when compiling C++ files, e.g. the Qt UI
|
||||||
/DPSAPI_VERSION=1
|
/DPSAPI_VERSION=1
|
||||||
/D_ALLOW_KEYWORD_MACROS
|
/D_ALLOW_KEYWORD_MACROS
|
||||||
|
# Disable deprecation of POSIX function names.
|
||||||
# https://stackoverflow.com/questions/37845163/what-is-the-purpose-of-microsofts-underscore-c-functions
|
# https://stackoverflow.com/questions/37845163/what-is-the-purpose-of-microsofts-underscore-c-functions
|
||||||
/D_CRT_NONSTDC_NO_WARNINGS
|
/D_CRT_NONSTDC_NO_WARNINGS
|
||||||
)
|
)
|
||||||
|
|
|
@ -292,6 +292,9 @@
|
||||||
# if !defined(QT_VERSION) || !defined(_SSIZE_T_DEFINED)
|
# if !defined(QT_VERSION) || !defined(_SSIZE_T_DEFINED)
|
||||||
typedef int ssize_t;
|
typedef int ssize_t;
|
||||||
# endif
|
# endif
|
||||||
|
# define strncasecmp strnicmp
|
||||||
|
# define popen _popen
|
||||||
|
# define pclose _pclose
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
@ -305,10 +308,6 @@
|
||||||
*/
|
*/
|
||||||
# define YY_NO_UNISTD_H
|
# define YY_NO_UNISTD_H
|
||||||
|
|
||||||
# define strncasecmp strnicmp
|
|
||||||
# define popen _popen
|
|
||||||
# define pclose _pclose
|
|
||||||
|
|
||||||
# ifndef __STDC__
|
# ifndef __STDC__
|
||||||
# define __STDC__ 0
|
# define __STDC__ 0
|
||||||
# endif
|
# endif
|
||||||
|
|
Loading…
Reference in New Issue