uClibc-0.9.28.3-string-ops.patch.powerpc 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. diff -urpN uClibc-0.9.28.3/libc/string/powerpc/string.c uClibc-0.9.28.3-patched/libc/string/powerpc/string.c
  2. --- uClibc-0.9.28.3/libc/string/powerpc/string.c 2005-06-21 16:03:15.000000000 +0200
  3. +++ uClibc-0.9.28.3-patched/libc/string/powerpc/string.c 2008-03-27 00:22:16.000000000 +0100
  4. @@ -32,7 +32,7 @@
  5. #include <locale.h> /* for __LOCALE_C_ONLY */
  6. #ifdef L_memcpy
  7. -void attribute_hidden *__memcpy(void *to, const void *from, size_t n)
  8. +void *memcpy(void *to, const void *from, size_t n)
  9. /* PPC can do pre increment and load/store, but not post increment and load/store.
  10. Therefore use *++ptr instead of *ptr++. */
  11. {
  12. @@ -87,11 +87,10 @@ void attribute_hidden *__memcpy(void *to
  13. goto copy_chunks;
  14. goto lessthan8;
  15. }
  16. -strong_alias(__memcpy, memcpy);
  17. #endif
  18. #ifdef L_memmove
  19. -void attribute_hidden *__memmove(void *to, const void *from, size_t n)
  20. +void *memmove(void *to, const void *from, size_t n)
  21. {
  22. unsigned long rem, chunks, tmp1, tmp2;
  23. unsigned char *tmp_to;
  24. @@ -142,7 +141,6 @@ void attribute_hidden *__memmove(void *t
  25. goto copy_chunks;
  26. goto lessthan8;
  27. }
  28. -strong_alias(__memmove, memmove);
  29. #endif
  30. #ifdef L_memset
  31. @@ -156,7 +154,7 @@ static inline int expand_byte_word(int c
  32. : "=r" (c) : "0" (c));
  33. return c;
  34. }
  35. -void attribute_hidden *__memset(void *to, int c, size_t n)
  36. +void *memset(void *to, int c, size_t n)
  37. {
  38. unsigned long rem, chunks;
  39. unsigned char *tmp_to;
  40. @@ -202,12 +200,10 @@ void attribute_hidden *__memset(void *to
  41. goto copy_chunks;
  42. goto lessthan8;
  43. }
  44. -strong_alias(__memset, memset);
  45. #endif
  46. #ifdef L_bzero
  47. -weak_alias(__bzero,bzero);
  48. -void __bzero(void *s, size_t n)
  49. +void bzero(void *s, size_t n)
  50. {
  51. (void)memset(s, 0, n);
  52. }