uastrfnc.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. #ifndef _UASTRFNC_H_
  7. #define _UASTRFNC_H_
  8. #include <_mingw_unicode.h>
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #ifndef _X86_
  13. #define ALIGNMENT_MACHINE
  14. #endif
  15. #ifdef ALIGNMENT_MACHINE
  16. #define IS_ALIGNED(p) (((ULONG_PTR)(p) & (sizeof(*(p))-1))==0)
  17. UNALIGNED WCHAR *ualstrcpynW(UNALIGNED WCHAR *lpString1,UNALIGNED const WCHAR *lpString2,int iMaxLength);
  18. int ualstrcmpiW(UNALIGNED const WCHAR *dst,UNALIGNED const WCHAR *src);
  19. int ualstrcmpW(UNALIGNED const WCHAR *src,UNALIGNED const WCHAR *dst);
  20. size_t ualstrlenW(UNALIGNED const WCHAR *wcs);
  21. UNALIGNED WCHAR *ualstrcpyW(UNALIGNED WCHAR *dst,UNALIGNED const WCHAR *src);
  22. #else
  23. #define ualstrcpynW StrCpyNW
  24. #define ualstrcmpiW StrCmpIW
  25. #define ualstrcmpW StrCmpW
  26. #define ualstrlenW lstrlenW
  27. #define ualstrcpyW StrCpyW
  28. #endif
  29. #define ualstrcpynA lstrcpynA
  30. #define ualstrcmpiA lstrcmpiA
  31. #define ualstrcmpA lstrcmpA
  32. #define ualstrlenA lstrlenA
  33. #define ualstrcpyA lstrcpyA
  34. #define ualstrcpyn __MINGW_NAME_AW(ualstrcpyn)
  35. #define ualstrcmpi __MINGW_NAME_AW(ualstrcmpi)
  36. #define ualstrcmp __MINGW_NAME_AW(ualstrcmp)
  37. #define ualstrlen __MINGW_NAME_AW(ualstrlen)
  38. #define ualstrcpy __MINGW_NAME_AW(ualstrcpy)
  39. #ifdef __cplusplus
  40. }
  41. #endif
  42. #endif