From d48ef70ecd46acf9e104befed50b42699d3824cc Mon Sep 17 00:00:00 2001 From: "xiongyihui3@gmail.com" Date: Tue, 13 Nov 2012 15:21:01 +0000 Subject: 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 --- components/libc/newlib/syscalls.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'components/libc/newlib') 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 -- cgit v1.3.1