MinGW-w64: Add guards for MSVC macro definitions

Add a comment too.
This commit is contained in:
João Valverde 2021-09-21 10:02:41 +01:00 committed by Wireshark GitLab Utility
parent b2691b8f6c
commit 0d6f0a4213
2 changed files with 4 additions and 4 deletions

View File

@ -476,6 +476,7 @@ if( CMAKE_C_COMPILER_ID MATCHES "MSVC")
# in pcap-stdinc.h when compiling C++ files, e.g. the Qt UI
/DPSAPI_VERSION=1
/D_ALLOW_KEYWORD_MACROS
# Disable deprecation of POSIX function names.
# https://stackoverflow.com/questions/37845163/what-is-the-purpose-of-microsofts-underscore-c-functions
/D_CRT_NONSTDC_NO_WARNINGS
)

View File

@ -292,6 +292,9 @@
# if !defined(QT_VERSION) || !defined(_SSIZE_T_DEFINED)
typedef int ssize_t;
# endif
# define strncasecmp strnicmp
# define popen _popen
# define pclose _pclose
#endif
#if defined(_WIN32)
@ -305,10 +308,6 @@
*/
# define YY_NO_UNISTD_H
# define strncasecmp strnicmp
# define popen _popen
# define pclose _pclose
# ifndef __STDC__
# define __STDC__ 0
# endif