Fixing debug.stm32f4: uncommented memcpy and memset aliases, placed them under #ifndef LIBC_MUSL.

This commit is contained in:
Ruben Ayrapetyan 2014-07-30 13:57:40 +04:00
parent d8c721f57a
commit 56daef38eb
2 changed files with 36 additions and 30 deletions

View File

@ -231,10 +231,12 @@ ifeq ($(OPTION_MCU),disable)
ifeq ($(OPTION_MUSL),enable)
CC := musl-$(CC)
DEFINES_JERRY += -DLIBC_MUSL
CFLAGS_COMMON += -static
else
CFLAGS_COMMON += -fsanitize=address
endif
ifeq ($(OPTION_COLOR),enable)
CFLAGS_COMMON += -fdiagnostics-color=always
endif

View File

@ -18,36 +18,40 @@
*/
#include "jerry-libc.h"
//
///**
// * memcpy alias to __memcpy (for compiler usage)
// */
//extern void *memcpy(void *s1, const void*s2, size_t n);
//
///**
// * memset alias to __memset (for compiler usage)
// */
//extern void *memset(void *s, int c, size_t n);
//
///**
// * memcpy alias to __memcpy (for compiler usage)
// */
//void* memcpy(void *s1, /**< destination */
// const void* s2, /**< source */
// size_t n) /**< bytes number */
//{
// return __memcpy(s1, s2, n);
//} /* memcpy */
//
///**
// * memset alias to __memset (for compiler usage)
// */
//void* memset(void *s, /**< area to set values in */
// int c, /**< value to set */
// size_t n) /**< area size */
//{
// return __memset(s, c, n);
//} /* memset */
FIXME( #ifndef LIBC_MUSL should be removed from here when own libc will be implemented )
#ifndef LIBC_MUSL
/**
* memcpy alias to __memcpy (for compiler usage)
*/
extern void *memcpy(void *s1, const void*s2, size_t n);
/**
* memset alias to __memset (for compiler usage)
*/
extern void *memset(void *s, int c, size_t n);
/**
* memcpy alias to __memcpy (for compiler usage)
*/
void* memcpy(void *s1, /**< destination */
const void* s2, /**< source */
size_t n) /**< bytes number */
{
return __memcpy(s1, s2, n);
} /* memcpy */
/**
* memset alias to __memset (for compiler usage)
*/
void* memset(void *s, /**< area to set values in */
int c, /**< value to set */
size_t n) /**< area size */
{
return __memset(s, c, n);
} /* memset */
#endif /* LIBC_MUSL */
/**
* memset