1 // Copyright 2018 The Dawn Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #ifndef COMMON_WINDOWS_WITH_UNDEFS_H_ 16 #define COMMON_WINDOWS_WITH_UNDEFS_H_ 17 18 #include "common/Platform.h" 19 20 #if !defined(DAWN_PLATFORM_WINDOWS) 21 # error "windows_with_undefs.h included on non-Windows" 22 #endif 23 24 // This header includes <windows.h> but removes all the extra defines that conflict with identifiers 25 // in internal code. It should never be included in something that is part of the public interface. 26 #include <windows.h> 27 28 // Macros defined for ANSI / Unicode support 29 #undef CreateWindow 30 #undef GetMessage 31 32 // Macros defined to produce compiler intrinsics 33 #undef MemoryBarrier 34 35 // Macro defined as an alias of GetTickCount 36 #undef GetCurrentTime 37 38 #endif // COMMON_WINDOWS_WITH_UNDEFS_H_ 39