mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
Move preprocessor checks into the cross-platform headers themselves
This commit is contained in:
parent
a05bb2498e
commit
9a0340097d
8 changed files with 21 additions and 15 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -17,10 +17,8 @@
|
|||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef _WIN32
|
||||
#include "win_data_types_cross_platform.h"
|
||||
#include "sal_cross_platform.h"
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#if !defined(_WIN32) || !defined(_MSC_VER)
|
||||
|
||||
// Empty macro definitions for Windows-specific preprocessor directives
|
||||
|
||||
#define __pragma(x)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue