Move preprocessor checks into the cross-platform headers themselves

This commit is contained in:
fwcd 2019-04-06 15:41:41 +02:00
commit 9a0340097d
8 changed files with 21 additions and 15 deletions

View file

@ -7,10 +7,8 @@
#include <string>
#include <vector>
#ifndef _WIN32
#include "winerror_cross_platform.h"
#include "sal_cross_platform.h"
#endif
template <typename TType>
class CalculatorVector

View file

@ -14,10 +14,8 @@
*
\****************************************************************************/
#ifndef _WIN32
#include "win_data_types_cross_platform.h"
#include "sal_cross_platform.h"
#endif
#include "CCommand.h"
#include "EngineStrings.h"

View file

@ -17,10 +17,8 @@
//
//-----------------------------------------------------------------------------
#ifndef _WIN32
#include "win_data_types_cross_platform.h"
#include "sal_cross_platform.h"
#endif
#include <cstdint>
#include <string>

View file

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once

View file

@ -27,16 +27,12 @@
#include <future>
#include "win_data_types_cross_platform.h"
#if defined(_WIN32) && defined(_MSC_VER)
#include <windows.h>
#include <winerror.h>
#else
#include "winerror_cross_platform.h"
#include "sal_cross_platform.h"
#include "preprocessor_cross_platform.h"
#if defined(_WIN32) && defined(_MSC_VER)
#include <windows.h>
#endif

View file

@ -1,5 +1,9 @@
#pragma once
#if !defined(_WIN32) || !defined(_MSC_VER)
// Empty macro definitions for Windows-specific preprocessor directives
#define __pragma(x)
#endif

View file

@ -1,5 +1,7 @@
#pragma once
#if !defined(_WIN32) || !defined(_MSC_VER)
// Empty macro definitions for source annotations
#define _In_opt_
@ -9,3 +11,5 @@
#define _Inout_
#define __in_opt
#define _Frees_ptr_opt_
#endif

View file

@ -1,5 +1,11 @@
#pragma once
#if defined(_WIN32) && defined(_MSC_VER)
#include <winerror.h>
#else
#include "CalcErr.h"
#define E_ACCESSDENIED 0x80070005
@ -15,3 +21,5 @@
#define SUCCEEDED(hr) (((ResultCode)(hr)) >= 0)
#define FAILED(hr) (((ResultCode)(hr)) < 0)
#define SCODE_CODE(sc) ((sc) & 0xFFFF)
#endif