* include/grub/misc.h (grub_memcpy): Declare grub_memcpy with static

inline function rather than a define.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-10-23 23:25:06 +02:00
parent 18c575e5c5
commit 4e94ae6575
2 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2011-10-23 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/misc.h (grub_memcpy): Declare grub_memcpy with static
inline function rather than a define.
2011-10-23 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-setup.c: Add missing include.

View file

@ -49,14 +49,19 @@
#define COMPILE_TIME_ASSERT(cond) switch (0) { case 1: case !(cond): ; }
#define grub_dprintf(condition, fmt, args...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, fmt, ## args)
/* XXX: If grub_memmove is too slow, we must implement grub_memcpy. */
#define grub_memcpy(d,s,n) grub_memmove ((d), (s), (n))
void *EXPORT_FUNC(grub_memmove) (void *dest, const void *src, grub_size_t n);
char *EXPORT_FUNC(grub_strcpy) (char *dest, const char *src);
char *EXPORT_FUNC(grub_strncpy) (char *dest, const char *src, int c);
char *EXPORT_FUNC(grub_stpcpy) (char *dest, const char *src);
/* XXX: If grub_memmove is too slow, we must implement grub_memcpy. */
static inline void *
grub_memcpy (void *dest, const void *src, grub_size_t n)
{
return grub_memmove (dest, src, n);
}
static inline char *
grub_strcat (char *dest, const char *src)
{