Add support for __FreeBSD_kernel__ kernel

Add support for kfreebsd-i386 and kfreebsd-amd64 Debian arch with
thanks to Pierre Chifflier <chifflier@cpe.fr>.
This commit is contained in:
Thomas Preud'homme
2010-09-10 21:09:07 +02:00
parent 2887f40f76
commit 776364f395
5 changed files with 21 additions and 13 deletions

View File

@ -21,7 +21,8 @@
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#if !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__OpenBSD__)
#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) \
&& !defined(__DragonFly__) && !defined(__OpenBSD__)
#include <malloc.h>
#endif
@ -35,7 +36,8 @@
#define CONFIG_TCC_MALLOC_HOOKS
#define HAVE_MEMALIGN
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__dietlibc__) \
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
|| defined(__DragonFly__) || defined(__dietlibc__) \
|| defined(__UCLIBC__) || defined(__OpenBSD__) || defined(_WIN32)
#warning Bound checking does not support malloc (etc.) in this environment.
#undef CONFIG_TCC_MALLOC_HOOKS