libc:Add macro restrictions to code that uses floating point numbers

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
anjiahao 2024-05-15 10:39:58 +08:00 • committed by Xiang Xiao
parent bed1845333
commit 3fdff878bc
11 changed files with 46 additions and 17 deletions

View file

@ -217,7 +217,7 @@ time_t time(FAR time_t *timep);
#ifdef CONFIG_HAVE_DOUBLE
double difftime(time_t time1, time_t time0);
#else
#elif defined(CONFIG_HAVE_FLOAT)
float difftime(time_t time1, time_t time0);
#endif

View file

@ -202,7 +202,9 @@ FAR wchar_t *wcsstr(FAR const wchar_t *, FAR const wchar_t *);
#ifdef CONFIG_HAVE_DOUBLE
double wcstod(FAR const wchar_t *, FAR wchar_t **);
#endif
#ifdef CONFIG_HAVE_FLOAT
float wcstof(FAR const wchar_t *, FAR wchar_t **);
#endif
FAR wchar_t *wcstok(FAR wchar_t *, FAR const wchar_t *, FAR wchar_t **);
long int wcstol(FAR const wchar_t *, FAR wchar_t **, int);
#ifdef CONFIG_HAVE_LONG_DOUBLE