libc: Implement local_t related functions
since local_t isn't really implemented on NuttX, we can simply redirect to the non-locale version. Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
decf7d0ad9
commit
cdc781bdfd
|
@ -32,6 +32,26 @@
|
|||
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define isalnum_l(c, l) isalnum(c)
|
||||
#define isalpha_l(c, l) isalpha(c)
|
||||
#define isascii_l(c, l) isascii(c)
|
||||
#define isblank_l(c, l) isblank(c)
|
||||
#define iscntrl_l(c, l) iscntrl(c)
|
||||
#define isdigit_l(c, l) isdigit(c)
|
||||
#define isgraph_l(c, l) isgraph(c)
|
||||
#define islower_l(c, l) islower(c)
|
||||
#define isprint_l(c, l) isprint(c)
|
||||
#define ispunct_l(c, l) ispunct(c)
|
||||
#define isspace_l(c, l) isspace(c)
|
||||
#define isupper_l(c, l) isupper(c)
|
||||
#define isxdigit_l(c, l) isxdigit(c)
|
||||
#define tolower_l(c, l) tolower(c)
|
||||
#define toupper_l(c, l) toupper(c)
|
||||
|
||||
/****************************************************************************
|
||||
* Inline Functions
|
||||
****************************************************************************/
|
||||
|
|
|
@ -66,6 +66,12 @@
|
|||
# define environ get_environ_ptr()
|
||||
#endif
|
||||
|
||||
#define strtof_l(s, e, l) strtof(s, e)
|
||||
#define strtod_l(s, e, l) strtod(s, e)
|
||||
#define strtold_l(s, e, l) strtold(s, e)
|
||||
#define strtoll_l(s, e, b, l) strtoll(s, e, b)
|
||||
#define strtoull_l(s, e, b, l) strtoull(s, e, b)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Type Definitions
|
||||
****************************************************************************/
|
||||
|
|
|
@ -35,6 +35,14 @@
|
|||
|
||||
#include <nuttx/b2c.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define strcoll_l(s1, s2, l) strcoll(s1, s2)
|
||||
#define strerror_l(e, l) strerror(e)
|
||||
#define strxfrm_l(s1, s2, n, l) strxfrm(s1, s2, n)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
|
|
@ -53,6 +53,9 @@
|
|||
#define bzero(s,n) (void)memset(s,0,n)
|
||||
#endif
|
||||
|
||||
#define strcasecmp_l(s1, s2, l) strcasecmp(s1, s2)
|
||||
#define strncasecmp_l(s1, s2, n, l) strncasecmp(s1, s2, n)
|
||||
|
||||
/****************************************************************************
|
||||
* Inline Functions
|
||||
****************************************************************************/
|
||||
|
|
|
@ -91,9 +91,10 @@
|
|||
|
||||
#define TIME_UTC 1
|
||||
|
||||
/* Redirect the timelocal */
|
||||
/* Redirect the timelocal and strftime_l */
|
||||
|
||||
#define timelocal mktime
|
||||
#define timelocal mktime
|
||||
#define strftime_l(s, m, f, t, l) strftime(s, m, f, t)
|
||||
|
||||
/********************************************************************************
|
||||
* Public Types
|
||||
|
|
|
@ -65,6 +65,14 @@
|
|||
# define NULL ((FAR void *)0)
|
||||
#endif
|
||||
|
||||
#define wcsftime_l(s, m, f, t, l) wcsftime(s, m, f, t)
|
||||
#define wcscasecmp_l(s1, s2, l) wcscasecmp(s1, s2)
|
||||
#define wcsncasecmp_l(s1, s2, n, l) wcsncasecmp(s1, s2, n)
|
||||
#define wcscoll_l(s1, s2, l) wcscoll(s1, s2)
|
||||
#define wcstold_l(s, e, l) wcstold(s, e)
|
||||
#define wcstoull_l(s, e, l) wcstoull(s, e)
|
||||
#define wcsxfrm_l(s1, s2, n, l) wcsxfrm(s1, s2, n)
|
||||
|
||||
/****************************************************************************
|
||||
* Type Definitions
|
||||
****************************************************************************/
|
||||
|
|
|
@ -52,6 +52,25 @@
|
|||
#define WC_UPPER 11
|
||||
#define WC_XDIGIT 12
|
||||
|
||||
#define iswalnum_l(c, l) iswalnum(c)
|
||||
#define iswalpha_l(c, l) iswalpha(c)
|
||||
#define iswblank_l(c, l) iswblank(c)
|
||||
#define iswcntrl_l(c, l) iswcntrl(c)
|
||||
#define iswdigit_l(c, l) iswdigit(c)
|
||||
#define iswgraph_l(c, l) iswgraph(c)
|
||||
#define iswlower_l(c, l) iswlower(c)
|
||||
#define iswprint_l(c, l) iswprint(c)
|
||||
#define iswpunct_l(c, l) iswpunct(c)
|
||||
#define iswspace_l(c, l) iswspace(c)
|
||||
#define iswupper_l(c, l) iswupper(c)
|
||||
#define iswxdigit_l(c, l) iswxdigit(c)
|
||||
#define iswctype_l(c, d, l) iswctype(c, d)
|
||||
#define towlower_l(c, l) towlower(c)
|
||||
#define towupper_l(c, l) towupper(c)
|
||||
#define towctrans_l(c, d, l) towctrans(c, d)
|
||||
#define wctrans_l(p, l) wctrans(p)
|
||||
#define wctype_l(p, l) wctype(p)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue