blob: d95486b32850801182b257e1aa2be1501b75bbb8 [file] [log] [blame]
Ben Wagner297c3c82018-07-19 08:55:10 -04001/*
2 * Copyright 2018 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef SkDWriteNTDDI_VERSION_DEFINED
9#define SkDWriteNTDDI_VERSION_DEFINED
10
11// More strictly, this header should be the first thing in a translation unit,
12// since it is effectively negating build flags.
13#if defined(_WINDOWS_) || defined(DWRITE_3_H_INCLUDED)
14#error Must include SkDWriteNTDDI_VERSION.h before any Windows or DWrite headers.
15#endif
16
17// If the build defines NTDDI_VERSION, pretend it didn't.
18// This also requires resetting _WIN32_WINNT and WINVER.
19// dwrite_3.h guards enum, macro, and interface declarations behind NTDDI_VERSION,
20// but it is not clear this is correct since these are all immutable.
21#if defined(NTDDI_VERSION)
22# undef NTDDI_VERSION
23# if defined(_WIN32_WINNT)
Ben Wagnere5348542018-07-19 17:18:41 -040024# undef _WIN32_WINNT
Ben Wagner297c3c82018-07-19 08:55:10 -040025# endif
26# if defined(WINVER)
27# undef WINVER
28# endif
29#endif
30
31#endif