diff options
| author | [email protected] <[email protected]> | 2012-11-13 15:21:01 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2012-11-13 15:21:01 +0000 |
| commit | d48ef70ecd46acf9e104befed50b42699d3824cc (patch) | |
| tree | 68000464881cc63a0d467bb8665fb9a8b826450b /components/libc | |
| parent | ee2344c582e08135abddf74e398fb2d630107227 (diff) | |
In stm32fx's stm32_rom.ld, add symbol - '_stext' to support lua a. Update lua's README.TXT
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2410 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/libc')
| -rw-r--r-- | components/libc/newlib/syscalls.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/components/libc/newlib/syscalls.c b/components/libc/newlib/syscalls.c index 6f670c8ef2..4405c5ce71 100644 --- a/components/libc/newlib/syscalls.c +++ b/components/libc/newlib/syscalls.c @@ -197,7 +197,6 @@ _wait_r(struct _reent *ptr, int *status) _ssize_t _write_r(struct _reent *ptr, int fd, const void *buf, size_t nbytes) { -#ifndef RT_USING_DFS if (fd < 3) { rt_device_t console_device; @@ -207,13 +206,13 @@ _write_r(struct _reent *ptr, int fd, const void *buf, size_t nbytes) if (console_device != 0) rt_device_write(console_device, 0, buf, nbytes); return nbytes; } - return 0; -#else - _ssize_t rc; + else + { + _ssize_t rc; - rc = write(fd, buf, nbytes); - return rc; -#endif + rc = write(fd, buf, nbytes); + return rc; + } } #endif |
