From c7b6b37e1d821340eb0be0195e5b725efd1c4d43 Mon Sep 17 00:00:00 2001 From: gord Date: Tue, 30 May 2000 15:58:09 +0000 Subject: [PATCH] Change grub_memmove to use void * --- ChangeLog | 5 +++++ stage2/char_io.c | 8 ++++---- stage2/shared.h | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1acb5b72f..5f8203a4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-05-29 Chip Salzenberg + + * stage2/shared.h (grub_memmove): Prototype to use void *. + * stage2/char_io.c (grub_memmove): Define likewise. + 2000-05-30 Gordon Matzigkeit * docs/user-ref.texi (Stage2 errors): Update error messages. diff --git a/stage2/char_io.c b/stage2/char_io.c index aa86cd573..5335ed5d1 100644 --- a/stage2/char_io.c +++ b/stage2/char_io.c @@ -846,8 +846,8 @@ memcheck (int addr, int len) return ! errnum; } -char * -grub_memmove (char *to, const char *from, int len) +void * +grub_memmove (void *to, const void *from, int len) { if (memcheck ((int) to, len)) { @@ -873,8 +873,8 @@ grub_memmove (char *to, const char *from, int len) "cld" : "=&c" (d0), "=&S" (d1), "=&D" (d2) : "0" (len), - "1" (len - 1 + from), - "2" (len - 1 + to) + "1" (len - 1 + (const char *) from), + "2" (len - 1 + (char *) to) : "memory"); } } diff --git a/stage2/shared.h b/stage2/shared.h index 31a40053b..56ad95115 100644 --- a/stage2/shared.h +++ b/stage2/shared.h @@ -698,7 +698,7 @@ int grub_sprintf (char *buffer, const char *format, ...); int grub_tolower (int c); int grub_isspace (int c); int grub_strncat (char *s1, const char *s2, int n); -char *grub_memmove (char *to, const char *from, int len); +void *grub_memmove (void *to, const void *from, int len); void *grub_memset (void *start, int c, int len); int grub_strncat (char *s1, const char *s2, int n); char *grub_strstr (const char *s1, const char *s2);