stralign_s.h 784 B

123456789101112131415161718192021222324252627
  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 __STRALIGN_H_S_
  7. #define __STRALIGN_H_S_
  8. #include <stralign.h>
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #if !defined(_X86_) && defined(_WSTRING_S_DEFINED)
  13. #if defined(__cplusplus) && defined(_WConst_Return)
  14. static __inline PUWSTR ua_wcscpy_s(PUWSTR Destination,size_t DestinationSize,PCUWSTR Source) {
  15. if(WSTR_ALIGNED(Source) && WSTR_ALIGNED(Destination)) return (wcscpy_s((PWSTR)Destination,DestinationSize,(PCWSTR)Source)==0 ? Destination : NULL);
  16. return uaw_wcscpy((PCUWSTR)String,Character);
  17. }
  18. #endif
  19. #endif
  20. #ifdef __cplusplus
  21. }
  22. #endif
  23. #endif