mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-25 14:28:20 +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:
@@ -10,7 +10,8 @@
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2009-05-27 Yi.qiu The first version.
|
||||
* 2010-07-18 Bernard add stat and statfs structure definitions.
|
||||
* 2010-07-18 Bernard add stat and statfs structure definitions.
|
||||
* 2011-05-16 Yi.qiu Change parameter name of rename, "new" is C++ key word.
|
||||
*/
|
||||
#ifndef __DFS_POSIX_H__
|
||||
#define __DFS_POSIX_H__
|
||||
@@ -100,7 +101,7 @@ int close(int d);
|
||||
int read(int fd, void *buf, size_t len);
|
||||
int write(int fd, const void *buf, size_t len);
|
||||
off_t lseek(int fd, off_t offset, int whence);
|
||||
int rename(const char* old, const char* new );
|
||||
int rename(const char *from, const char *to);
|
||||
int unlink(const char *pathname);
|
||||
int stat(const char *file, struct stat *buf);
|
||||
int fstat(int fildes, struct stat *buf);
|
||||
|
||||
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 */
|
||||
|
||||
@@ -176,15 +176,15 @@ struct timeval {
|
||||
#include <dfs_posix.h>
|
||||
#else
|
||||
typedef rt_uint16_t mode_t;
|
||||
#define O_RDONLY 0000000
|
||||
#define O_WRONLY 0000001
|
||||
#define O_RDWR 0000002
|
||||
#define O_ACCMODE 0000003
|
||||
#define O_CREAT 0000100
|
||||
#define O_EXCL 0000200
|
||||
#define O_TRUNC 0001000
|
||||
#define O_APPEND 0002000
|
||||
#define O_DIRECTORY 0200000
|
||||
#define O_RDONLY 0x0000000
|
||||
#define O_WRONLY 0x0000001
|
||||
#define O_RDWR 0x0000002
|
||||
#define O_ACCMODE 0x0000003
|
||||
#define O_CREAT 0x0000100
|
||||
#define O_EXCL 0x0000200
|
||||
#define O_TRUNC 0x0001000
|
||||
#define O_APPEND 0x0002000
|
||||
#define O_DIRECTORY 0x0200000
|
||||
#endif
|
||||
|
||||
#elif defined (__GNUC__) /* GNU GCC Compiler, with minilibc */
|
||||
|
||||
Reference in New Issue
Block a user