win32-headers.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
  2. #pragma once
  3. #ifndef WIN32_LEAN_AND_MEAN
  4. #define WIN32_LEAN_AND_MEAN
  5. #endif
  6. #ifndef NOMINMAX
  7. #define NOMINMAX
  8. #endif
  9. #ifndef NOKERNEL
  10. #define NOKERNEL
  11. #endif
  12. #ifndef NOUSER
  13. #define NOUSER
  14. #endif
  15. #ifndef NOSERVICE
  16. #define NOSERVICE
  17. #endif
  18. #ifndef NOSOUND
  19. #define NOSOUND
  20. #endif
  21. #ifndef NOMCX
  22. #define NOMCX
  23. #endif
  24. #ifndef NOGDI
  25. #define NOGDI
  26. #endif
  27. #ifndef NOMSG
  28. #define NOMSG
  29. #endif
  30. #ifndef NOMB
  31. #define NOMB
  32. #endif
  33. #ifndef NOCLIPBOARD
  34. #define NOCLIPBOARD
  35. #endif
  36. // dbghelp seems to require windows.h.
  37. // clang-format off
  38. #include <windows.h>
  39. #include <dbghelp.h>
  40. // clang-format on
  41. #undef VOID
  42. #undef DELETE
  43. #undef IN
  44. #undef THIS
  45. #undef CONST
  46. #undef NAN
  47. #undef UNKNOWN
  48. #undef NONE
  49. #undef ANY
  50. #undef IGNORE
  51. #undef STRICT
  52. #undef GetObject
  53. #undef CreateSemaphore
  54. #undef Yield
  55. #undef RotateRight32
  56. #undef RotateLeft32
  57. #undef RotateRight64
  58. #undef RotateLeft64
  59. #else
  60. #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined."
  61. #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)