Include host system's header files and don't compile our c library replacements in the sim.

This makes it possible to move the simulator code into the target tree (for Rockbox as an application).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26019 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2010-05-14 12:37:05 +00:00
parent 3d1a85695b
commit 3cca7e8650
4 changed files with 15 additions and 4 deletions

View file

@ -434,7 +434,9 @@ static const struct plugin_api rockbox_api = {
memset, memset,
memcpy, memcpy,
memmove, memmove,
#ifndef SIMULATOR
_ctype_, _ctype_,
#endif
atoi, atoi,
strchr, strchr,
strcat, strcat,

View file

@ -548,7 +548,9 @@ struct plugin_api {
void* (*memset)(void *dst, int c, size_t length); void* (*memset)(void *dst, int c, size_t length);
void* (*memcpy)(void *out, const void *in, size_t n); void* (*memcpy)(void *out, const void *in, size_t n);
void* (*memmove)(void *out, const void *in, size_t n); void* (*memmove)(void *out, const void *in, size_t n);
#ifndef SIMULATOR
const unsigned char *_rbctype_; const unsigned char *_rbctype_;
#endif
int (*atoi)(const char *str); int (*atoi)(const char *str);
char *(*strchr)(const char *s, int c); char *(*strchr)(const char *s, int c);
char *(*strcat)(char *s1, const char *s2); char *(*strcat)(char *s1, const char *s2);

View file

@ -21,12 +21,13 @@ timer.c
panic.c panic.c
debug.c debug.c
/* Common */ /* Standard library */
#if !defined(SIMULATOR) || defined(__MINGW32__) || defined(__CYGWIN__) #if !defined(SIMULATOR)
#if defined(__MINGW32__) || defined(__CYGWIN__)
libc/errno.c libc/errno.c
/* alsa on linux requires a more advanced sprintf, i.e. not ours */ /* alsa on linux requires a more advanced sprintf, i.e. not ours */
libc/sprintf.c libc/sprintf.c
#endif /* !defined(SIMULATOR) || defined(__MINGW32__) || defined(__CYGWIN__) */ #endif /* defined(__MINGW32__) || defined(__CYGWIN__) */
libc/atoi.c libc/atoi.c
libc/ctype.c libc/ctype.c
libc/memcmp.c libc/memcmp.c
@ -42,6 +43,9 @@ libc/strrchr.c
libc/strtok.c libc/strtok.c
libc/strstr.c libc/strstr.c
libc/mktime.c libc/mktime.c
#endif /* !defined(SIMULATOR)*/
/* Common */
common/config.c common/config.c
common/crc32.c common/crc32.c
#ifdef MI4_FORMAT #ifdef MI4_FORMAT

View file

@ -7,7 +7,10 @@
# $Id$ # $Id$
# #
INCLUDES += -I$(FIRMDIR)/libc/include -I$(FIRMDIR) -I$(FIRMDIR)/export -I$(FIRMDIR)/drivers -I$(FIRMDIR)/include INCLUDES += -I$(FIRMDIR) -I$(FIRMDIR)/export -I$(FIRMDIR)/drivers -I$(FIRMDIR)/include
ifndef SIMVER
INCLUDES += -I$(FIRMDIR)/libc/include
endif
FIRMLIB_SRC += $(call preprocess, $(FIRMDIR)/SOURCES) FIRMLIB_SRC += $(call preprocess, $(FIRMDIR)/SOURCES)
FIRMLIB_OBJ := $(call c2obj, $(FIRMLIB_SRC)) FIRMLIB_OBJ := $(call c2obj, $(FIRMLIB_SRC))