strcat.c 571 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (C) 2002 Manuel Novoa III
  3. * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  4. *
  5. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. */
  7. #include "_string.h"
  8. #ifdef WANT_WIDE
  9. # define __Wstrcat __wcscat
  10. # define Wstrcat wcscat
  11. #else
  12. # define __Wstrcat __strcat
  13. # define Wstrcat strcat
  14. #endif
  15. Wchar attribute_hidden *__Wstrcat(Wchar * __restrict s1, register const Wchar * __restrict s2)
  16. {
  17. register Wchar *s = s1;
  18. while (*s++);
  19. --s;
  20. while ((*s++ = *s2++) != 0);
  21. return s1;
  22. }
  23. strong_alias(__Wstrcat,Wstrcat)