tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

windows-h-wrapper.template.h (1279B)


      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/. */
      6 
      7 #ifndef mozilla_windows_h
      8 #define mozilla_windows_h
      9 
     10 // Include the "real" windows.h header.
     11 //
     12 // Also turn off deprecation warnings, as we may be wrapping deprecated fns.
     13 
     14 #pragma GCC system_header
     15 #include_next <windows.h>
     16 
     17 #pragma GCC diagnostic push
     18 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
     19 
     20 // Check if the header should be disabled
     21 #if defined(MOZ_DISABLE_WINDOWS_WRAPPER)
     22 #  define MOZ_WINDOWS_WRAPPER_DISABLED_REASON "explicitly disabled"
     23 
     24 #elif !defined(__cplusplus)
     25 #  define MOZ_WINDOWS_WRAPPER_DISABLED_REASON "non-C++ source file"
     26 
     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++" {
     32 
     33 // clang-format off
     34 ${decls}
     35 // clang-format on
     36 
     37 }  // extern "C++"
     38 
     39 #  undef GetCurrentTime // Use GetTickCount() instead.
     40 
     41 #endif  // enabled
     42 
     43 #pragma GCC diagnostic pop
     44 
     45 #endif  // !defined(mozilla_windows_h)