libc/wchar: remove unnecessary config

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong 2022-05-31 13:55:11 +08:00 committed by Xiang Xiao
parent 9899dd0ec0
commit 035840a770
48 changed files with 56 additions and 257 deletions

View File

@ -86,10 +86,8 @@ namespace std
// Wide character operations
#ifdef CONFIG_LIBC_WCHAR
using ::mbtowc;
using ::wctomb;
#endif
// Memory Management

View File

@ -41,8 +41,6 @@ namespace std
using ::wint_t;
using ::wctype_t;
using ::size_t;
#ifdef CONFIG_LIBC_WCHAR
using ::btowc;
using ::fwprintf;
using ::fwscanf;
@ -126,7 +124,6 @@ namespace std
using ::wmemset;
using ::wprintf;
using ::wscanf;
#endif
};
#endif // __INCLUDE_CXX_CWCHAR

View File

@ -204,13 +204,11 @@ FAR char *itoa(int val, FAR char *str, int base);
/* Wide character operations */
#ifdef CONFIG_LIBC_WCHAR
int mblen(FAR const char *s, size_t n);
int mbtowc(FAR wchar_t *pwc, FAR const char *s, size_t n);
size_t mbstowcs(FAR wchar_t *dst, FAR const char *src, size_t len);
int wctomb(FAR char *s, wchar_t wchar);
size_t wcstombs(FAR char *dst, FAR const wchar_t *src, size_t len);
#endif
/* Memory Management */

View File

@ -17,7 +17,6 @@ source "libs/libc/dlfcn/Kconfig"
source "libs/libc/modlib/Kconfig"
source "libs/libc/grp/Kconfig"
source "libs/libc/pwd/Kconfig"
source "libs/libc/wchar/Kconfig"
source "libs/libc/locale/Kconfig"
source "libs/libc/lzf/Kconfig"
source "libs/libc/time/Kconfig"

View File

@ -23,7 +23,7 @@
"b16sin","fixedmath.h","","b16_t","b16_t"
"b16sqr","fixedmath.h","!defined(CONFIG_HAVE_LONG_LONG)","b16_t","b16_t"
"basename","libgen.h","","FAR char *","FAR char *"
"btowc","wchar.h","defined(CONFIG_LIBC_WCHAR)","wint_t","int"
"btowc","wchar.h","","wint_t","int"
"calloc","stdlib.h","","FAR void *","size_t","size_t"
"cfgetspeed","termios.h","defined(CONFIG_SERIAL_TERMIOS)","speed_t","FAR const struct termios *"
"cfsetspeed","termios.h","defined(CONFIG_SERIAL_TERMIOS)","int","FAR struct termios *","speed_t"
@ -103,19 +103,19 @@
"ispunct","ctype.h","","int","int"
"isspace","ctype.h","","int","int"
"isupper","ctype.h","","int","int"
"iswalnum","wctype.h","defined(CONFIG_LIBC_WCHAR)","int","wint_t"
"iswalpha","wctype.h","defined(CONFIG_LIBC_WCHAR)","int","wint_t"
"iswblank","wctype.h","defined(CONFIG_LIBC_WCHAR)","int","wint_t"
"iswcntrl","wctype.h","defined(CONFIG_LIBC_WCHAR)","int","wint_t"
"iswctype","wctype.h","defined(CONFIG_LIBC_WCHAR)","int","wint_t","wctype_t"
"iswdigit","wctype.h","defined(CONFIG_LIBC_WCHAR)","int","wint_t"
"iswgraph","wctype.h","defined(CONFIG_LIBC_WCHAR)","int","wint_t"
"iswlower","wctype.h","defined(CONFIG_LIBC_WCHAR)","int","wint_t"
"iswprint","wctype.h","defined(CONFIG_LIBC_WCHAR)","int","wint_t"
"iswpunct","wctype.h","defined(CONFIG_LIBC_WCHAR)","int","wint_t"
"iswspace","wctype.h","defined(CONFIG_LIBC_WCHAR)","int","wint_t"
"iswupper","wctype.h","defined(CONFIG_LIBC_WCHAR)","int","wint_t"
"iswxdigit","wctype.h","defined(CONFIG_LIBC_WCHAR)","int","wint_t"
"iswalnum","wctype.h","","int","wint_t"
"iswalpha","wctype.h","","int","wint_t"
"iswblank","wctype.h","","int","wint_t"
"iswcntrl","wctype.h","","int","wint_t"
"iswctype","wctype.h","","int","wint_t","wctype_t"
"iswdigit","wctype.h","","int","wint_t"
"iswgraph","wctype.h","","int","wint_t"
"iswlower","wctype.h","","int","wint_t"
"iswprint","wctype.h","","int","wint_t"
"iswpunct","wctype.h","","int","wint_t"
"iswspace","wctype.h","","int","wint_t"
"iswupper","wctype.h","","int","wint_t"
"iswxdigit","wctype.h","","int","wint_t"
"isxdigit","ctype.h","","int","int"
"labs","stdlib.h","","long int","long int"
"lib_dumpbuffer","debug.h","","void","FAR const char *","FAR const uint8_t *","unsigned int"
@ -125,13 +125,13 @@
"mallinfo","malloc.h","","struct mallinfo","void"
"malloc","stdlib.h","","FAR void *","size_t"
"malloc_size","malloc.h","","size_t","FAR void *"
"mblen","stdlib.h","defined(CONFIG_LIBC_WCHAR)","int","FAR const char *","size_t"
"mbrlen","wchar.h","defined(CONFIG_LIBC_WCHAR)","size_t","FAR const char *","size_t","FAR mbstate_t *"
"mbrtowc","wchar.h","defined(CONFIG_LIBC_WCHAR)","size_t","FAR wchar_t *","FAR const char *","size_t","FAR mbstate_t *"
"mbsnrtowcs","wchar.h","defined(CONFIG_LIBC_WCHAR)","size_t","FAR wchar_t *","FAR const char **","size_t","size_t","FAR mbstate_t *"
"mbsrtowcs","wchar.h","defined(CONFIG_LIBC_WCHAR)","size_t","FAR wchar_t *","FAR const char **","size_t","FAR mbstate_t *"
"mbstowcs","stdlib.h","defined(CONFIG_LIBC_WCHAR)","size_t","FAR wchar_t *","FAR const char *","size_t"
"mbtowc","stdlib.h","defined(CONFIG_LIBC_WCHAR)","int","FAR wchar_t *","FAR const char *","size_t"
"mblen","stdlib.h","","int","FAR const char *","size_t"
"mbrlen","wchar.h","","size_t","FAR const char *","size_t","FAR mbstate_t *"
"mbrtowc","wchar.h","","size_t","FAR wchar_t *","FAR const char *","size_t","FAR mbstate_t *"
"mbsnrtowcs","wchar.h","","size_t","FAR wchar_t *","FAR const char **","size_t","size_t","FAR mbstate_t *"
"mbsrtowcs","wchar.h","","size_t","FAR wchar_t *","FAR const char **","size_t","FAR mbstate_t *"
"mbstowcs","stdlib.h","","size_t","FAR wchar_t *","FAR const char *","size_t"
"mbtowc","stdlib.h","","int","FAR wchar_t *","FAR const char *","size_t"
"memccpy","string.h","","FAR void *","FAR void *","FAR const void *","int","size_t"
"memchr","string.h","","FAR void *","FAR const void *","int","size_t"
"memcmp","string.h","","int","FAR const void *","FAR const void *","size_t"
@ -250,7 +250,7 @@
"strtoumax","inttypes.h","","uintmax_t","FAR const char *","FAR char **","int"
"strxfrm","string.h","defined(CONFIG_LIBC_LOCALE)","size_t","FAR char *","FAR const char *","size_t"
"swab","unistd.h","","void","FAR const void *","FAR void *","ssize_t"
"swprintf","wchar.h","defined(CONFIG_LIBC_WCHAR)","int","FAR wchar_t *","size_t","FAR const wchar_t *","..."
"swprintf","wchar.h","","int","FAR wchar_t *","size_t","FAR const wchar_t *","..."
"syslog","syslog.h","","void","int","FAR const IPTR char *","..."
"tcflush","termios.h","defined(CONFIG_SERIAL_TERMIOS)","int","int","int"
"tcgetattr","termios.h","defined(CONFIG_SERIAL_TERMIOS)","int","int","FAR struct termios *"
@ -259,8 +259,8 @@
"time","time.h","","time_t","FAR time_t *"
"tolower","ctype.h","","int","int"
"toupper","ctype.h","","int","int"
"towlower","wchar.h","defined(CONFIG_LIBC_WCHAR)","wint_t","wint_t"
"towupper","wchar.h","defined(CONFIG_LIBC_WCHAR)","wint_t","wint_t"
"towlower","wchar.h","","wint_t","wint_t"
"towupper","wchar.h","","wint_t","wint_t"
"truncate","unistd.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","FAR const char *","off_t"
"ub16divub16","fixedmath.h","!defined(CONFIG_HAVE_LONG_LONG)","ub16_t","ub16_t","ub16_t"
"ub16mulub16","fixedmath.h","!defined(CONFIG_HAVE_LONG_LONG)","ub16_t","ub16_t","ub16_t"
@ -276,28 +276,28 @@
"vsprintf","stdio.h","","int","FAR char *","FAR const IPTR char *","va_list"
"vsscanf","stdio.h","","int","FAR const char *","FAR const IPTR char *","va_list"
"vsyslog","syslog.h","","void","int","FAR const IPTR char *","va_list"
"wcrtomb","wchar.h","defined(CONFIG_LIBC_WCHAR)","size_t","FAR char *","wchar_t","FAR mbstate_t *"
"wcscmp","wchar.h","defined(CONFIG_LIBC_WCHAR)","int","FAR const wchar_t *","FAR const wchar_t *"
"wcscoll","wchar.h","defined(CONFIG_LIBC_WCHAR)","int","FAR const wchar_t *","FAR const wchar_t *"
"wcsftime","wchar.h","defined(CONFIG_LIBC_WCHAR)","size_t","FAR wchar_t *","size_t","FAR const wchar_t *","FAR const struct tm *"
"wcslcpy","wchar.h","defined(CONFIG_LIBC_WCHAR)","size_t","FAR wchar_t *","FAR const wchar_t *","size_t"
"wcslen","wchar.h","defined(CONFIG_LIBC_WCHAR)","size_t","FAR const wchar_t *"
"wcsnrtombs","wchar.h","defined(CONFIG_LIBC_WCHAR)","size_t","FAR char *","FAR const wchar_t **","size_t","size_t","FAR mbstate_t *"
"wcsrtombs","wchar.h","defined(CONFIG_LIBC_WCHAR)","size_t","FAR char *","FAR const wchar_t **","size_t","FAR mbstate_t *"
"wcstod","wchar.h","defined(CONFIG_LIBC_WCHAR)","double","FAR const wchar_t *","FAR wchar_t **"
"wcstof","wchar.h","defined(CONFIG_LIBC_WCHAR)","float","FAR const wchar_t *","FAR wchar_t **"
"wcstol","wchar.h","defined(CONFIG_LIBC_WCHAR)","long int","FAR const wchar_t *","FAR wchar_t **","int"
"wcstold","wchar.h","defined(CONFIG_LIBC_WCHAR)","long double","FAR const wchar_t *","FAR wchar_t **"
"wcstoll","wchar.h","defined(CONFIG_LIBC_WCHAR)","long long int","FAR const wchar_t *","FAR wchar_t **","int"
"wcstombs","stdlib.h","defined(CONFIG_LIBC_WCHAR)","size_t","FAR char *","FAR const wchar_t *","size_t"
"wcstoul","wchar.h","defined(CONFIG_LIBC_WCHAR)","unsigned long int","FAR const wchar_t *","FAR wchar_t **","int"
"wcsxfrm","wchar.h","defined(CONFIG_LIBC_WCHAR)","size_t","FAR wchar_t *","FAR const wchar_t *","size_t"
"wctob","wchar.h","defined(CONFIG_LIBC_WCHAR)","int","wint_t"
"wctomb","stdlib.h","defined(CONFIG_LIBC_WCHAR)","int","FAR char *","wchar_t"
"wctype","wctype.h","defined(CONFIG_LIBC_WCHAR)","wctype_t","FAR const char *"
"wmemchr","wchar.h","defined(CONFIG_LIBC_WCHAR)","FAR wchar_t *","FAR const wchar_t *","wchar_t","size_t"
"wmemcmp","wchar.h","defined(CONFIG_LIBC_WCHAR)","int","FAR const wchar_t *","FAR const wchar_t *","size_t"
"wmemcpy","wchar.h","defined(CONFIG_LIBC_WCHAR)","FAR wchat_t *","FAR wchar_t *","FAR const wchar_t *","size_t"
"wmemmove","wchar.h","defined(CONFIG_LIBC_WCHAR)","FAR wchat_t *","FAR wchar_t *","FAR const wchar_t *","size_t"
"wmemset","wchar.h","defined(CONFIG_LIBC_WCHAR)","FAR wchat_t *","FAR wchar_t *","wchar_t","size_t"
"wcrtomb","wchar.h","","size_t","FAR char *","wchar_t","FAR mbstate_t *"
"wcscmp","wchar.h","","int","FAR const wchar_t *","FAR const wchar_t *"
"wcscoll","wchar.h","","int","FAR const wchar_t *","FAR const wchar_t *"
"wcsftime","wchar.h","","size_t","FAR wchar_t *","size_t","FAR const wchar_t *","FAR const struct tm *"
"wcslcpy","wchar.h","","size_t","FAR wchar_t *","FAR const wchar_t *","size_t"
"wcslen","wchar.h","","size_t","FAR const wchar_t *"
"wcsnrtombs","wchar.h","","size_t","FAR char *","FAR const wchar_t **","size_t","size_t","FAR mbstate_t *"
"wcsrtombs","wchar.h","","size_t","FAR char *","FAR const wchar_t **","size_t","FAR mbstate_t *"
"wcstod","wchar.h","","double","FAR const wchar_t *","FAR wchar_t **"
"wcstof","wchar.h","","float","FAR const wchar_t *","FAR wchar_t **"
"wcstol","wchar.h","","long int","FAR const wchar_t *","FAR wchar_t **","int"
"wcstold","wchar.h","","long double","FAR const wchar_t *","FAR wchar_t **"
"wcstoll","wchar.h","","long long int","FAR const wchar_t *","FAR wchar_t **","int"
"wcstombs","stdlib.h","","size_t","FAR char *","FAR const wchar_t *","size_t"
"wcstoul","wchar.h","","unsigned long int","FAR const wchar_t *","FAR wchar_t **","int"
"wcsxfrm","wchar.h","","size_t","FAR wchar_t *","FAR const wchar_t *","size_t"
"wctob","wchar.h","","int","wint_t"
"wctomb","stdlib.h","","int","FAR char *","wchar_t"
"wctype","wctype.h","","wctype_t","FAR const char *"
"wmemchr","wchar.h","","FAR wchar_t *","FAR const wchar_t *","wchar_t","size_t"
"wmemcmp","wchar.h","","int","FAR const wchar_t *","FAR const wchar_t *","size_t"
"wmemcpy","wchar.h","","FAR wchat_t *","FAR wchar_t *","FAR const wchar_t *","size_t"
"wmemmove","wchar.h","","FAR wchat_t *","FAR wchar_t *","FAR const wchar_t *","size_t"
"wmemset","wchar.h","","FAR wchat_t *","FAR wchar_t *","wchar_t","size_t"
"writev","sys/uio.h","","ssize_t","int","FAR const struct iovec *","int"

Can't render this file because it has a wrong number of fields in line 2.

View File

@ -26,13 +26,10 @@ CSRCS += lib_itoa.c lib_labs.c lib_llabs.c lib_realpath.c lib_bsearch.c
CSRCS += lib_rand.c lib_qsort.c lib_srand.c lib_strtol.c
CSRCS += lib_strtoll.c lib_strtoul.c lib_strtoull.c lib_strtod.c lib_strtof.c
CSRCS += lib_strtold.c lib_checkbase.c lib_mktemp.c lib_mkstemp.c lib_mkdtemp.c
CSRCS += lib_aligned_alloc.c lib_posix_memalign.c lib_valloc.c
CSRCS += lib_aligned_alloc.c lib_posix_memalign.c lib_valloc.c lib_mblen.c
CSRCS += lib_mbtowc.c lib_wctomb.c lib_mbstowcs.c lib_wcstombs.c
CSRCS += lib_atexit.c lib_cxa_atexit.c lib_onexit.c
ifeq ($(CONFIG_LIBC_WCHAR),y)
CSRCS += lib_mblen.c lib_mbtowc.c lib_wctomb.c
CSRCS += lib_mbstowcs.c lib_wcstombs.c
endif
ifeq ($(CONFIG_PSEUDOTERM),y)
CSRCS += lib_ptsname.c lib_ptsnamer.c lib_unlockpt.c lib_openpty.c

View File

@ -25,8 +25,6 @@
#include <stdlib.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -43,5 +41,3 @@ int mblen(FAR const char *s, size_t n)
{
return mbtowc(NULL, s, n);
}
#endif

View File

@ -25,8 +25,6 @@
#include <stdlib.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -43,5 +41,3 @@ size_t mbstowcs(FAR wchar_t *dst, FAR const char *src, size_t len)
{
return mbsrtowcs(dst, &src, len, NULL);
}
#endif

View File

@ -32,12 +32,9 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdlib.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -69,4 +66,3 @@ int mbtowc(FAR wchar_t *pwc, FAR const char *s, size_t n)
return (*s != '\0');
}
#endif

View File

@ -25,8 +25,6 @@
#include <stdlib.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -39,5 +37,3 @@ size_t wcstombs(FAR char *dst, FAR const wchar_t *src, size_t len)
{
return wcsrtombs(dst, &src, len, NULL);
}
#endif /* CONFIG_LIBC_WCHAR */

View File

@ -34,15 +34,11 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <string.h>
#include <stdlib.h>
#include <wchar.h>
#include <errno.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -73,4 +69,3 @@ int wctomb(FAR char *s, wchar_t wc)
*s = (char)wc;
return 1;
}
#endif

View File

@ -1,14 +0,0 @@
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
#menu "Wide character support"
config LIBC_WCHAR
bool "Enable wide-characters (Unicode) support"
default n
---help---
By default, wide-characters support is disabled.
#endmenu # Wide character support

View File

@ -18,8 +18,6 @@
#
############################################################################
ifeq ($(CONFIG_LIBC_WCHAR),y)
# Add the internal C files to the build
CSRCS += lib_wcscmp.c lib_wcslen.c lib_wmemchr.c lib_wmemcmp.c lib_wmemcpy.c
@ -34,5 +32,3 @@ CSRCS += lib_mbrlen.c lib_mbsrtowcs.c lib_wcsrtombs.c
DEPPATH += --dep-path wchar
VPATH += :wchar
endif

View File

@ -32,15 +32,11 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -75,4 +71,3 @@ wint_t btowc(int c)
return pwc;
}
#endif

View File

@ -38,16 +38,12 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -64,5 +60,3 @@ size_t mbrlen(FAR const char *s, size_t n, FAR mbstate_t *ps)
{
return mbrtowc(NULL, s, n, ps);
}
#endif

View File

@ -32,16 +32,12 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -74,4 +70,3 @@ size_t mbrtowc(FAR wchar_t *pwc, FAR const char *s,
return retval;
}
#endif

View File

@ -26,8 +26,6 @@
#include <string.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -90,5 +88,3 @@ size_t mbsnrtowcs(FAR wchar_t *dst, FAR const char **src, size_t nms,
*src += i;
return i;
}
#endif /* CONFIG_LIBC_WCHAR */

View File

@ -38,8 +38,6 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
@ -47,8 +45,6 @@
#include <wchar.h>
#include <stdint.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -66,5 +62,3 @@ size_t mbsrtowcs(FAR wchar_t *dst, FAR const char **src,
{
return mbsnrtowcs(dst, src, SIZE_MAX, len, ps);
}
#endif

View File

@ -22,8 +22,6 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <stdarg.h>
#include <stdio.h>
@ -32,8 +30,6 @@
#include <nuttx/streams.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -62,5 +58,3 @@ int swprintf(FAR wchar_t *buf, size_t maxlen, FAR const wchar_t *fmt, ...)
return n;
}
#endif /* CONFIG_LIBC_WCHAR */

View File

@ -34,15 +34,12 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <string.h>
#include <wchar.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -71,4 +68,3 @@ size_t wcrtomb(FAR char *s, wchar_t wc, FAR mbstate_t *ps)
return retval;
}
#endif

View File

@ -34,12 +34,9 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <string.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -69,4 +66,3 @@ int wcscmp(FAR const wchar_t *s1, FAR const wchar_t *s2)
return *s1 - *--s2;
}
#endif

View File

@ -34,12 +34,9 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <string.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -61,5 +58,3 @@ int wcscoll(FAR const wchar_t *a, FAR const wchar_t *b)
{
return wcscmp(a, b);
}
#endif /* CONFIG_LIBC_WCHAR */

View File

@ -22,14 +22,12 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <time.h>
/****************************************************************************
* Public Functions
****************************************************************************/
#ifdef CONFIG_LIBC_WCHAR
size_t wcsftime(FAR wchar_t *s, size_t maxsize, FAR const wchar_t *format,
FAR const struct tm *tim_p)
{
@ -39,4 +37,3 @@ size_t wcsftime(FAR wchar_t *s, size_t maxsize, FAR const wchar_t *format,
return strftime((FAR char *)s, maxsize, (FAR char *)format, tim_p);
}
#endif

View File

@ -33,12 +33,9 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <string.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@ -90,4 +87,3 @@ size_t wcslcpy(FAR wchar_t *dst, FAR const wchar_t *src, size_t siz)
return (s - src - 1); /* count does not include NUL */
}
#endif

View File

@ -34,12 +34,9 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <string.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -66,4 +63,3 @@ size_t wcslen(FAR const wchar_t *s)
return p - s;
}
#endif

View File

@ -29,8 +29,6 @@
#include <stdio.h>
#include <errno.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -117,5 +115,3 @@ size_t wcsnrtombs(FAR char *dst, FAR const wchar_t **src, size_t nwc,
*src += i;
return i;
}
#endif /* CONFIG_LIBC_WCHAR */

View File

@ -24,8 +24,6 @@
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -42,5 +40,3 @@ size_t wcsrtombs(FAR char *dst, FAR const wchar_t **src,
{
return wcsnrtombs(dst, src, SIZE_MAX, len, ps);
}
#endif /* CONFIG_LIBC_WCHAR */

View File

@ -32,13 +32,9 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdlib.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -56,5 +52,3 @@ double wcstod(FAR const wchar_t *nptr, FAR wchar_t **endptr)
{
return strtod((FAR const char *)nptr, (FAR char **)endptr);
}
#endif /* CONFIG_LIBC_WCHAR */

View File

@ -32,13 +32,9 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdlib.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -56,5 +52,3 @@ float wcstof(FAR const wchar_t *nptr, FAR wchar_t **endptr)
{
return strtof((FAR const char *)nptr, (FAR char **)endptr);
}
#endif /* CONFIG_LIBC_WCHAR */

View File

@ -32,13 +32,9 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdlib.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -56,5 +52,3 @@ long int wcstol(FAR const wchar_t *nptr, FAR wchar_t **endptr, int base)
{
return strtol((FAR const char *)nptr, (FAR char **)endptr, base);
}
#endif /* CONFIG_LIBC_WCHAR */

View File

@ -32,13 +32,9 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdlib.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -56,5 +52,3 @@ long double wcstold(FAR const wchar_t *nptr, FAR wchar_t **endptr)
{
return strtold((FAR const char *)nptr, (FAR char **)endptr);
}
#endif /* CONFIG_LIBC_WCHAR */

View File

@ -32,13 +32,9 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdlib.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -57,5 +53,3 @@ long long int wcstoll(FAR const wchar_t *nptr,
{
return strtoll((FAR const char *)nptr, (FAR char **)endptr, base);
}
#endif /* CONFIG_LIBC_WCHAR */

View File

@ -32,13 +32,9 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdlib.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -57,5 +53,3 @@ unsigned long int wcstoul(FAR const wchar_t *nptr,
{
return strtoul((const char *)nptr, (char **)endptr, base);
}
#endif /* CONFIG_LIBC_WCHAR */

View File

@ -32,13 +32,9 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdlib.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -58,5 +54,3 @@ unsigned long long int wcstoull(FAR const wchar_t *nptr,
{
return strtoull((FAR const char *)nptr, (FAR char **)endptr, base);
}
#endif /* CONFIG_LIBC_WCHAR */

View File

@ -32,14 +32,10 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stddef.h>
#include <string.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -62,4 +58,3 @@ size_t wcsxfrm(FAR wchar_t *a, FAR const wchar_t *b, size_t n)
{
return wcslcpy(a, b, n);
}
#endif

View File

@ -34,16 +34,12 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#include <limits.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -59,4 +55,3 @@ int wctob(wint_t wc)
return wctomb(pmb, wc) == 1 ? pmb[0] : EOF;
}
#endif

View File

@ -32,13 +32,9 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <string.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -71,4 +67,3 @@ FAR wchar_t *wmemchr(FAR const wchar_t *s, wchar_t c, size_t n)
return NULL;
}
#endif

View File

@ -32,12 +32,9 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <string.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -71,4 +68,3 @@ int wmemcmp(FAR const wchar_t *s1, FAR const wchar_t *s2, size_t n)
return 0;
}
#endif

View File

@ -32,13 +32,9 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <string.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -57,4 +53,3 @@ FAR wchar_t *wmemcpy(FAR wchar_t *d, FAR const wchar_t *s, size_t n)
{
return memcpy(d, s, n * sizeof(wchar_t));
}
#endif

View File

@ -32,12 +32,9 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <string.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -56,4 +53,3 @@ FAR wchar_t *wmemmove(FAR wchar_t *d, FAR const wchar_t *s, size_t n)
{
return memmove(d, s, n * sizeof(wchar_t));
}
#endif

View File

@ -32,12 +32,9 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <string.h>
#include <wchar.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -66,4 +63,3 @@ FAR wchar_t *wmemset(FAR wchar_t *s, wchar_t c, size_t n)
return s;
}
#endif

View File

@ -18,8 +18,6 @@
#
############################################################################
ifeq ($(CONFIG_LIBC_WCHAR),y)
# Add the internal C files to the build
CSRCS += lib_wctype.c lib_iswctype.c lib_towlower.c lib_towupper.c
@ -28,5 +26,3 @@ CSRCS += lib_wctype.c lib_iswctype.c lib_towlower.c lib_towupper.c
DEPPATH += --dep-path wctype
VPATH += :wctype
endif

View File

@ -44,8 +44,6 @@
#include <wctype.h>
#include <errno.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -160,4 +158,3 @@ int iswctype(wint_t c, wctype_t desc)
return 0;
}
#endif

View File

@ -44,8 +44,6 @@
#include <ctype.h>
#include <wctype.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -65,4 +63,3 @@ wint_t towlower(wint_t c)
{
return (c < (wint_t)0x00ff ? (wint_t)tolower((int)c) : c);
}
#endif

View File

@ -44,8 +44,6 @@
#include <ctype.h>
#include <wctype.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -65,4 +63,3 @@ wint_t towupper(wint_t c)
{
return (c < (wint_t)0x00ff ? (wint_t)toupper((int)c) : c);
}
#endif

View File

@ -43,8 +43,6 @@
#include <wctype.h>
#include <errno.h>
#ifdef CONFIG_LIBC_WCHAR
/****************************************************************************
* Public Functions
****************************************************************************/
@ -144,4 +142,3 @@ wctype_t wctype(FAR const char *c)
return 0;
}
#endif

View File

@ -36,7 +36,6 @@ config LIBCXXMINI
config LIBCXX
bool "LLVM libc++ C++ Standard Library"
select HAVE_CXXINITIALIZE
select LIBC_WCHAR
select LIBC_LOCALE
---help---
LLVM "libc++" C++ Standard Library
@ -82,6 +81,10 @@ config CXX_RTTI
if UCLIBCXX
config UCLIBCXX_WCHAR
bool "Enable Wide Stream Support"
default n
config UCLIBCXX_BUFSIZE
int "IO Stream/Container Buffer Size"
default 32

View File

@ -53,7 +53,7 @@
/* String and I/O Stream Support */
#ifdef CONFIG_LIBC_WCHAR
#ifdef CONFIG_UCLIBCXX_WCHAR
# define __UCLIBCXX_HAS_WCHAR__ 1
#endif
#define __UCLIBCXX_IOSTREAM_BUFSIZE__ CONFIG_UCLIBCXX_BUFSIZE
@ -63,7 +63,7 @@
#define __UCLIBCXX_SUPPORT_COUT__ 1
#define __UCLIBCXX_SUPPORT_CERR__ 1
#define __UCLIBCXX_SUPPORT_CLOG__ 1
#ifdef CONFIG_LIBC_WCHAR
#ifdef CONFIG_UCLIBCXX_WCHAR
# define __UCLIBCXX_SUPPORT_WCIN__ 1
# define __UCLIBCXX_SUPPORT_WCOUT__ 1
# define __UCLIBCXX_SUPPORT_WCERR__ 1