nasty_macros.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #ifndef SUPPORT_NASTY_MACROS_H
  9. #define SUPPORT_NASTY_MACROS_H
  10. #define NASTY_MACRO This should not be expanded!!!
  11. #define _A NASTY_MACRO
  12. #define _B NASTY_MACRO
  13. #define _C NASTY_MACRO
  14. #define _D NASTY_MACRO
  15. #define _E NASTY_MACRO
  16. #define _F NASTY_MACRO
  17. #define _G NASTY_MACRO
  18. #define _H NASTY_MACRO
  19. #define _I NASTY_MACRO
  20. #define _J NASTY_MACRO
  21. #define _K NASTY_MACRO
  22. #define _L NASTY_MACRO
  23. // Because FreeBSD uses _M in its <sys/types.h>, and it is hard to avoid
  24. // including that header, only define _M for other operating systems.
  25. #ifndef __FreeBSD__
  26. #define _M NASTY_MACRO
  27. #endif
  28. #define _N NASTY_MACRO
  29. #define _O NASTY_MACRO
  30. #define _P NASTY_MACRO
  31. #define _Q NASTY_MACRO
  32. #define _R NASTY_MACRO
  33. #define _S NASTY_MACRO
  34. #define _T NASTY_MACRO
  35. #define _U NASTY_MACRO
  36. #define _V NASTY_MACRO
  37. #define _W NASTY_MACRO
  38. #define _X NASTY_MACRO
  39. #define _Y NASTY_MACRO
  40. #define _Z NASTY_MACRO
  41. // tchar.h defines these macros on Windows.
  42. #define _UI NASTY_MACRO
  43. #define _PUC NASTY_MACRO
  44. #define _CPUC NASTY_MACRO
  45. #define _PC NASTY_MACRO
  46. #define _CRPC NASTY_MACRO
  47. #define _CPC NASTY_MACRO
  48. // yvals.h on MINGW defines this macro
  49. #define _C2 NASTY_MACRO
  50. // Test that libc++ doesn't use names reserved by WIN32 API Macros.
  51. // NOTE: Obviously we can only define these on non-windows platforms.
  52. #ifndef _WIN32
  53. #define __allocator NASTY_MACRO
  54. #define __deallocate NASTY_MACRO
  55. #define __out NASTY_MACRO
  56. #endif
  57. #define __output NASTY_MACRO
  58. #define __input NASTY_MACRO
  59. #define __acquire NASTY_MACRO
  60. #define __release NASTY_MACRO
  61. #endif // SUPPORT_NASTY_MACROS_H