PreExternalInclude.h 1.1 KB

123456789101112131415161718192021222324252627282930
  1. // DO NOT PUT #pragma once or include guard check here
  2. // This header is designed to be able to be included multiple times
  3. // As external code and 3rd party headers can collide with our platform defines or compiler emulation,
  4. // this header can be used to disable them. The corresponding 'PostExternalInclude.h' enables the emulation
  5. // and platform defines again.
  6. //
  7. // Usage:
  8. // #include "PreExternalInclude.h"
  9. // #include "SomeExternalCode.h"
  10. // #include "3rdParty.h"
  11. // #include "PostExternalInclude.h"
  12. #if DETAIL__PREEXTERNALINCLUDE_HAS_BEEN_INCLUDED
  13. #error "PreExternalInclude.h has been included more than once or PostExternalInclude.h is missing."
  14. #endif
  15. #include "Internal/UndefineCompilerMacros.h"
  16. #include "Internal/UndefineCoreMacros.h"
  17. #define DETAIL__PREEXTERNALINCLUDE_HAS_BEEN_INCLUDED
  18. // detect whether windows SDK winuser.h has been included before, to
  19. // optionally restore some state afterwards (some 3rd party libraries
  20. // include windows.h which defines a lot of names as macros)
  21. #if defined(_WINUSER_)
  22. # define DETAIL__WINUSER_H_HAS_BEEN_INCLUDED 1
  23. #else
  24. # define DETAIL__WINUSER_H_HAS_BEEN_INCLUDED 0
  25. #endif