Bug 1770025 [wpt PR 34116] - Update wpt metadata, a=testonly
[gecko.git] / config / windows-h-wrapper.template.h
blobe1e8244a2964cf441dd9c69cc99b2a61eb03c027
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 ${decls}
35 } // extern "C++"
37 #undef GetCurrentTime // Use GetTickCount() instead.
39 #endif // enabled
41 #pragma GCC diagnostic pop
43 #endif // !defined(mozilla_windows_h)