1 /* 2 * Copyright 2016 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 #ifndef SkLeanWindows_DEFINED 8 #define SkLeanWindows_DEFINED 9 10 #include "include/private/base/SkFeatures.h" // IWYU pragma: keep 11 12 #ifdef SK_BUILD_FOR_WIN 13 // https://devblogs.microsoft.com/oldnewthing/20091130-00/?p=15863 14 # ifndef WIN32_LEAN_AND_MEAN 15 # define WIN32_LEAN_AND_MEAN 16 # define WIN32_IS_MEAN_WAS_LOCALLY_DEFINED 17 # endif 18 # ifndef NOMINMAX 19 # define NOMINMAX 20 # define NOMINMAX_WAS_LOCALLY_DEFINED 21 # endif 22 # 23 # include <windows.h> 24 # 25 # ifdef WIN32_IS_MEAN_WAS_LOCALLY_DEFINED 26 # undef WIN32_IS_MEAN_WAS_LOCALLY_DEFINED 27 # undef WIN32_LEAN_AND_MEAN 28 # endif 29 # ifdef NOMINMAX_WAS_LOCALLY_DEFINED 30 # undef NOMINMAX_WAS_LOCALLY_DEFINED 31 # undef NOMINMAX 32 # endif 33 #endif 34 35 #endif // SkLeanWindows_DEFINED 36