patch-kern_misc_c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. --- grub-1.97.1.orig/kern/misc.c 2009-11-09 16:48:16.000000000 +0100
  2. +++ grub-1.97.1/kern/misc.c 2009-11-29 11:48:55.492463135 +0100
  3. @@ -51,23 +51,6 @@ grub_memmove (void *dest, const void *sr
  4. return dest;
  5. }
  6. -#ifndef APPLE_CC
  7. -void *memmove (void *dest, const void *src, grub_size_t n)
  8. - __attribute__ ((alias ("grub_memmove")));
  9. -/* GCC emits references to memcpy() for struct copies etc. */
  10. -void *memcpy (void *dest, const void *src, grub_size_t n)
  11. - __attribute__ ((alias ("grub_memmove")));
  12. -#else
  13. -void *memcpy (void *dest, const void *src, grub_size_t n)
  14. -{
  15. - return grub_memmove (dest, src, n);
  16. -}
  17. -void *memmove (void *dest, const void *src, grub_size_t n)
  18. -{
  19. - return grub_memmove (dest, src, n);
  20. -}
  21. -#endif
  22. -
  23. char *
  24. grub_strcpy (char *dest, const char *src)
  25. {
  26. @@ -182,10 +165,6 @@ grub_memcmp (const void *s1, const void
  27. return 0;
  28. }
  29. -#ifndef APPLE_CC
  30. -int memcmp (const void *s1, const void *s2, grub_size_t n)
  31. - __attribute__ ((alias ("grub_memcmp")));
  32. -#endif
  33. int
  34. grub_strcmp (const char *s1, const char *s2)
  35. @@ -467,10 +446,6 @@ grub_memset (void *s, int c, grub_size_t
  36. return s;
  37. }
  38. -#ifndef APPLE_CC
  39. -void *memset (void *s, int c, grub_size_t n)
  40. - __attribute__ ((alias ("grub_memset")));
  41. -#endif
  42. grub_size_t
  43. grub_strlen (const char *s)
  44. @@ -1002,11 +977,6 @@ grub_abort (void)
  45. grub_exit ();
  46. }
  47. -#ifndef APPLE_CC
  48. -/* GCC emits references to abort(). */
  49. -void abort (void) __attribute__ ((alias ("grub_abort")));
  50. -#endif
  51. -
  52. #ifdef NEED_ENABLE_EXECUTE_STACK
  53. /* Some gcc versions generate a call to this function
  54. in trampolines for nested functions. */