Do not define rename() when compiling with TI libc

PUBLISHED_FROM=e9878fc5d55b0b2da854573a7a84e8e14e2f301d
This commit is contained in:
Deomid Ryabkov 2016-07-13 22:39:00 +03:00 committed by Cesanta Bot
parent 68dd8d277d
commit ab208b71c4
2 changed files with 3 additions and 1 deletions

View File

@ -1 +1 @@
docker.cesanta.com:5000/cc3200-build:1.2.0-r3
docker.cesanta.com:5000/cc3200-build:1.2.0-r5

View File

@ -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
* 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 r = -1;
from = drop_dir(from);
@ -10208,6 +10209,7 @@ int rename(const char *from, const char *to) {
DBG(("rename(%s, %s) = %d", from, to, r));
return r;
}
#endif /* MG_TI_NO_HOST_INTERFACE || defined(_NEWLIB_VERSION) */
#if MG_TI_NO_HOST_INTERFACE
int unlink(const char *filename) {