mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 18:57:16 +08:00
Modify the link mode, compile each component to static library first and then link them
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1405 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
Vendored
+3
-3
@@ -22,13 +22,13 @@
|
||||
#ifdef __RT_THREAD__
|
||||
#include <rtthread.h>
|
||||
#define PNG_MAX_MALLOC_64K
|
||||
#define PNG_NO_STDIO
|
||||
|
||||
#ifndef RT_USING_NEWLIB
|
||||
#define PNG_NO_WRITE_SUPPORTED
|
||||
#define PNG_NO_STDIO
|
||||
#define PNG_NO_SETJMP_SUPPORTED
|
||||
#define malloc rtgui_malloc
|
||||
#define free rtgui_free
|
||||
#define malloc rtgui_malloc
|
||||
#define free rtgui_free
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
Vendored
+21
@@ -291,6 +291,7 @@ void zcfree (voidpf opaque, voidpf ptr)
|
||||
|
||||
#ifndef MY_ZCALLOC /* Any system without a special alloc function */
|
||||
|
||||
#ifdef RT_USING_RTGUI
|
||||
extern voidp rtgui_malloc OF((uInt size));
|
||||
extern voidp rtgui_calloc OF((uInt items, uInt size));
|
||||
extern void rtgui_free OF((voidpf ptr));
|
||||
@@ -312,5 +313,25 @@ void zcfree (opaque, ptr)
|
||||
rtgui_free(ptr);
|
||||
if (opaque) return; /* make compiler happy */
|
||||
}
|
||||
#else
|
||||
voidpf zcalloc (opaque, items, size)
|
||||
voidpf opaque;
|
||||
unsigned items;
|
||||
unsigned size;
|
||||
{
|
||||
if (opaque) items += size - size; /* make compiler happy */
|
||||
return sizeof(uInt) > 2 ? (voidpf)rt_malloc(items * size) :
|
||||
(voidpf)rt_calloc(items, size);
|
||||
}
|
||||
|
||||
void zcfree (opaque, ptr)
|
||||
voidpf opaque;
|
||||
voidpf ptr;
|
||||
{
|
||||
rt_free(ptr);
|
||||
if (opaque) return; /* make compiler happy */
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* MY_ZCALLOC */
|
||||
|
||||
Reference in New Issue
Block a user