* grub-core/lib/posix_wrap/string.h (memcpy) [GRUB_UTIL]:

New inline function.
	* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (memcpy) [GRUB_UTIL]:
	Likewise.
	(memset) [GRUB_UTIL]: Likewise.
	(memcmp) [GRUB_UTIL]: Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-10-23 23:28:23 +02:00
parent 4e94ae6575
commit 4defb8d59b
3 changed files with 37 additions and 1 deletions

View file

@ -1,3 +1,12 @@
2011-10-23 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/lib/posix_wrap/string.h (memcpy) [GRUB_UTIL]:
New inline function.
* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (memcpy) [GRUB_UTIL]:
Likewise.
(memset) [GRUB_UTIL]: Likewise.
(memcmp) [GRUB_UTIL]: Likewise.
2011-10-23 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/misc.h (grub_memcpy): Declare grub_memcpy with static

View file

@ -87,6 +87,25 @@ fips_mode (void)
return 0;
}
#define memset grub_memset
#ifdef GRUB_UTIL
static inline void *
memcpy (void *dest, const void *src, grub_size_t n)
{
return grub_memcpy (dest, src, n);
}
static inline void *
memset (void *s, int c, grub_size_t n)
{
return grub_memset (s, c, n);
}
static inline int
memcmp (const void *s1, const void *s2, grub_size_t n)
{
return grub_memcmp (s1, s2, n);
}
#endif
#endif

View file

@ -39,4 +39,12 @@ strcasecmp (const char *s1, const char *s2)
return grub_strcasecmp (s1, s2);
}
#ifdef GRUB_UTIL
static inline void *
memcpy (void *dest, const void *src, grub_size_t n)
{
return grub_memcpy (dest, src, n);
}
#endif
#endif