From bad2e992ef68df994dd14b516d5df314846c0d9a Mon Sep 17 00:00:00 2001 From: "bernard.xiong@gmail.com" Date: Wed, 29 Jun 2011 14:41:12 +0000 Subject: [PATCH] remove sprint, malloc, free function link when using Keil MDK compiler. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1549 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- components/external/jpeg/jerror.c | 3 +++ components/external/jpeg/jmemnobs.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/components/external/jpeg/jerror.c b/components/external/jpeg/jerror.c index b1cbe5d675..a763db1c68 100644 --- a/components/external/jpeg/jerror.c +++ b/components/external/jpeg/jerror.c @@ -32,6 +32,9 @@ #define EXIT_FAILURE 1 #endif +/* sprintf wrapper for RT-Thread */ +#include +#define sprintf rt_sprintf /* * Create the message string table. diff --git a/components/external/jpeg/jmemnobs.c b/components/external/jpeg/jmemnobs.c index eb8c337725..37d3b45097 100644 --- a/components/external/jpeg/jmemnobs.c +++ b/components/external/jpeg/jmemnobs.c @@ -25,6 +25,10 @@ extern void * malloc JPP((size_t size)); extern void free JPP((void *ptr)); #endif +/* memory wrapper for RT-Thread */ +#include +#define malloc rt_malloc +#define free rt_free /* * Memory allocation and freeing are controlled by the regular library