_mingw_unicode.h 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #if !defined(_INC_CRT_UNICODE_MACROS)
  7. /* _INC_CRT_UNICODE_MACROS defined based on UNICODE flag */
  8. #if defined(UNICODE)
  9. # define _INC_CRT_UNICODE_MACROS 1
  10. # define __MINGW_NAME_AW(func) func##W
  11. # define __MINGW_NAME_AW_EXT(func,ext) func##W##ext
  12. # define __MINGW_NAME_UAW(func) func##_W
  13. # define __MINGW_NAME_UAW_EXT(func,ext) func##_W_##ext
  14. # define __MINGW_STRING_AW(str) L##str /* same as TEXT() from winnt.h */
  15. # define __MINGW_PROCNAMEEXT_AW "W"
  16. #else
  17. # define _INC_CRT_UNICODE_MACROS 2
  18. # define __MINGW_NAME_AW(func) func##A
  19. # define __MINGW_NAME_AW_EXT(func,ext) func##A##ext
  20. # define __MINGW_NAME_UAW(func) func##_A
  21. # define __MINGW_NAME_UAW_EXT(func,ext) func##_A_##ext
  22. # define __MINGW_STRING_AW(str) str /* same as TEXT() from winnt.h */
  23. # define __MINGW_PROCNAMEEXT_AW "A"
  24. #endif
  25. #define __MINGW_TYPEDEF_AW(type) \
  26. typedef __MINGW_NAME_AW(type) type;
  27. #define __MINGW_TYPEDEF_UAW(type) \
  28. typedef __MINGW_NAME_UAW(type) type;
  29. #endif /* !defined(_INC_CRT_UNICODE_MACROS) */