Eliminate the windows_inc.h include from compat.h by special-casing UNREFERENCED_PARAMETER in a different way.

git-svn-id: https://svn.eduke32.com/eduke32@6071 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-02-25 08:15:13 +00:00
parent ee4d69093c
commit 3f5dbe17f2
2 changed files with 10 additions and 12 deletions

View file

@ -28,13 +28,8 @@
# define __has_extension __has_feature // Compatibility with pre-3.0 compilers. # define __has_extension __has_feature // Compatibility with pre-3.0 compilers.
#endif #endif
// XXX: only to avoid warning C4005: macro redefinition in winnt.h #ifndef UNREFERENCED_PARAMETER
#if !defined(_MSC_VER) || _MSC_FULL_VER < 180031101 # define UNREFERENCED_PARAMETER(x) (x) = (x)
#ifdef UNREFERENCED_PARAMETER
#undef UNREFERENCED_PARAMETER
#endif
#define UNREFERENCED_PARAMETER(x) x = x
#endif #endif
#ifdef __GNUC__ #ifdef __GNUC__
@ -81,11 +76,6 @@
# include <malloc.h> # include <malloc.h>
#endif #endif
// XXX: see UNREFERENCED_PARAMETER
#if defined _MSC_VER && _MSC_FULL_VER >= 180031101
# include "windows_inc.h"
#endif
#ifdef __APPLE__ #ifdef __APPLE__
# include <TargetConditionals.h> # include <TargetConditionals.h>
# if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR # if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR

View file

@ -17,6 +17,10 @@
# define NOMINMAX # define NOMINMAX
#endif #endif
#ifdef UNREFERENCED_PARAMETER
# undef UNREFERENCED_PARAMETER
#endif
#ifdef NEED_WINSOCK2_H #ifdef NEED_WINSOCK2_H
# include <winsock2.h> # include <winsock2.h>
# undef NEED_WINSOCK2_H # undef NEED_WINSOCK2_H
@ -134,3 +138,7 @@
# endif # endif
# undef NEED_DBGHELP_H # undef NEED_DBGHELP_H
#endif #endif
#ifndef UNREFERENCED_PARAMETER
# define UNREFERENCED_PARAMETER(x) (x) = (x)
#endif