libc: Don't define localtime[_r] to macro when CONFIG_LIBC_LOCALTIME not define

since libc++ declare these function in ctime by:
using ::localtime[_r];

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic0bb68b44c0cab838ab7cc34baee2aaa3ca8a9b5
This commit is contained in:
Xiang Xiao
2020-07-16 12:09:54 +08:00
committed by Brennan Ashton
parent 11f8b7c974
commit e1ecb3e27c
12 changed files with 19 additions and 70 deletions
-9
View File
@@ -100,13 +100,6 @@
#define TIME_UTC 1
#ifndef CONFIG_LIBC_LOCALTIME
/* Local time is the same as gmtime in this implementation */
# define localtime(c) gmtime(c)
# define localtime_r(c,r) gmtime_r(c,r)
#endif
/********************************************************************************
* Public Types
********************************************************************************/
@@ -206,10 +199,8 @@ time_t mktime(FAR struct tm *tp);
FAR struct tm *gmtime(FAR const time_t *timep);
FAR struct tm *gmtime_r(FAR const time_t *timep, FAR struct tm *result);
#ifdef CONFIG_LIBC_LOCALTIME
FAR struct tm *localtime(FAR const time_t *timep);
FAR struct tm *localtime_r(FAR const time_t *timep, FAR struct tm *result);
#endif
size_t strftime(FAR char *s, size_t max, FAR const char *format,
FAR const struct tm *tm);