Commit ab208b71 authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by Cesanta Bot

Do not define rename() when compiling with TI libc

PUBLISHED_FROM=e9878fc5d55b0b2da854573a7a84e8e14e2f301d
parent 68dd8d27
docker.cesanta.com:5000/cc3200-build:1.2.0-r3 docker.cesanta.com:5000/cc3200-build:1.2.0-r5
...@@ -10192,6 +10192,7 @@ ssize_t _write(int fd, const void *buf, size_t count) { ...@@ -10192,6 +10192,7 @@ ssize_t _write(int fd, const void *buf, size_t count) {
* On Newlib we override rename directly too, because the default * On Newlib we override rename directly too, because the default
* implementation using _link and _unlink doesn't work for us. * implementation using _link and _unlink doesn't work for us.
*/ */
#if MG_TI_NO_HOST_INTERFACE || defined(_NEWLIB_VERSION)
int rename(const char *from, const char *to) { int rename(const char *from, const char *to) {
int r = -1; int r = -1;
from = drop_dir(from); from = drop_dir(from);
...@@ -10208,6 +10209,7 @@ int rename(const char *from, const char *to) { ...@@ -10208,6 +10209,7 @@ int rename(const char *from, const char *to) {
DBG(("rename(%s, %s) = %d", from, to, r)); DBG(("rename(%s, %s) = %d", from, to, r));
return r; return r;
} }
#endif /* MG_TI_NO_HOST_INTERFACE || defined(_NEWLIB_VERSION) */
#if MG_TI_NO_HOST_INTERFACE #if MG_TI_NO_HOST_INTERFACE
int unlink(const char *filename) { int unlink(const char *filename) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment