dietlibc support

This commit is contained in:
bellard 2004-10-02 14:03:39 +00:00
parent 8da6027e73
commit c52df4de38

View File

@ -36,7 +36,7 @@
#define HAVE_MEMALIGN #define HAVE_MEMALIGN
#ifdef __FreeBSD__ #if defined(__FreeBSD__) || defined(__dietlibc__)
#warning Bound checking not fully supported on FreeBSD #warning Bound checking not fully supported on FreeBSD
#undef CONFIG_TCC_MALLOC_HOOKS #undef CONFIG_TCC_MALLOC_HOOKS
#undef HAVE_MEMALIGN #undef HAVE_MEMALIGN
@ -782,7 +782,7 @@ void *__bound_calloc(size_t nmemb, size_t size)
{ {
void *ptr; void *ptr;
size = size * nmemb; size = size * nmemb;
ptr = __bound_malloc(size); ptr = __bound_malloc(size, NULL);
if (!ptr) if (!ptr)
return NULL; return NULL;
memset(ptr, 0, size); memset(ptr, 0, size);