Bug 1842999 - Part 11: Make MemoryBarrierRequirement an enum class. r=jandem
[gecko.git] / config / windows-h-wrapper.template.h
blob75879d23cccb768b2d9692dca8af501a418f7726
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_windows_h
8 #define mozilla_windows_h
10 // Include the "real" windows.h header.
12 // Also turn off deprecation warnings, as we may be wrapping deprecated fns.
14 #pragma GCC system_header
15 #include_next <windows.h>
17 #pragma GCC diagnostic push
18 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
20 // Check if the header should be disabled
21 #if defined(MOZ_DISABLE_WINDOWS_WRAPPER)
22 # define MOZ_WINDOWS_WRAPPER_DISABLED_REASON "explicitly disabled"
24 #elif !defined(__cplusplus)
25 # define MOZ_WINDOWS_WRAPPER_DISABLED_REASON "non-C++ source file"
27 #else
28 // We're allowed to wrap in the current context. Define `MOZ_WRAPPED_WINDOWS_H`
29 // to note that fact, and perform the wrapping.
30 # define MOZ_WRAPPED_WINDOWS_H
31 extern "C++" {
33 // clang-format off
34 ${decls}
35 // clang-format on
37 } // extern "C++"
39 # undef GetCurrentTime // Use GetTickCount() instead.
41 #endif // enabled
43 #pragma GCC diagnostic pop
45 #endif // !defined(mozilla_windows_h)