newlib: limited unicode support

git-svn-id: svn://kolibrios.org@6627 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2016-10-28 02:28:17 +00:00
parent 67d979178e
commit c48b963b16
4 changed files with 25 additions and 11 deletions

View File

@ -78,6 +78,7 @@ CORE_SRCS:= \
ctype/iswupper.c \ ctype/iswupper.c \
ctype/iswxdigit.c \ ctype/iswxdigit.c \
ctype/isxdigit.c \ ctype/isxdigit.c \
ctype/jp2uc.c \
ctype/toascii.c \ ctype/toascii.c \
ctype/tolower.c \ ctype/tolower.c \
ctype/toupper.c \ ctype/toupper.c \

View File

@ -62,6 +62,7 @@ CORE_SRCS = {
"ctype/iswupper.c", "ctype/iswupper.c",
"ctype/iswxdigit.c", "ctype/iswxdigit.c",
"ctype/isxdigit.c", "ctype/isxdigit.c",
"ctype/jp2uc.c",
"ctype/toascii.c", "ctype/toascii.c",
"ctype/tolower.c", "ctype/tolower.c",
"ctype/toupper.c", "ctype/toupper.c",

View File

@ -17,8 +17,6 @@
* printf/scanf enabled */ * printf/scanf enabled */
#define _WANT_IO_C99_FORMATS #define _WANT_IO_C99_FORMATS
#define __DYNAMIC_REENT__
/* long long type support in IO functions like printf/scanf enabled */ /* long long type support in IO functions like printf/scanf enabled */
#define _WANT_IO_LONG_LONG #define _WANT_IO_LONG_LONG
@ -36,10 +34,10 @@
/* #undef _WANT_REENT_SMALL */ /* #undef _WANT_REENT_SMALL */
/* Multibyte supported */ /* Multibyte supported */
/* #undef _MB_CAPABLE */ #define _MB_CAPABLE
/* MB_LEN_MAX */ /* MB_LEN_MAX */
#define _MB_LEN_MAX 1 #define _MB_LEN_MAX 2
/* ICONV enabled */ /* ICONV enabled */
/* #undef _ICONV_ENABLED */ /* #undef _ICONV_ENABLED */
@ -64,6 +62,21 @@
/* True if long double supported and it is equal to double. */ /* True if long double supported and it is equal to double. */
/* #undef _LDBL_EQ_DBL */ /* #undef _LDBL_EQ_DBL */
/* Define if wide char orientation is supported. */
#define _WIDE_ORIENT 1
/* Define if unbuffered stream file optimization is supported. */
#define _UNBUF_STREAM_OPT 1
/* Define if lite version of exit supported. */
/* #undef _LITE_EXIT */
/* Define if declare atexit data as global. */
/* #undef _REENT_GLOBAL_ATEXIT */
/* Define if small footprint nano-formatted-IO implementation used. */
/* #undef _NANO_FORMATTED_IO */
/* /*
* Iconv encodings enabled ("to" direction) * Iconv encodings enabled ("to" direction)
*/ */
@ -172,6 +185,8 @@
/* #undef _ICONV_FROM_ENCODING_WIN_1257 */ /* #undef _ICONV_FROM_ENCODING_WIN_1257 */
/* #undef _ICONV_FROM_ENCODING_WIN_1258 */ /* #undef _ICONV_FROM_ENCODING_WIN_1258 */
#define __DYNAMIC_REENT__
#ifdef STATIC_LIBC #ifdef STATIC_LIBC
#define BUILD_LIBC #define BUILD_LIBC
#endif #endif

View File

@ -151,15 +151,15 @@ extern int _EXFUN(__svfwscanf_r,(struct _reent *,FILE *, _CONST wchar_t *,va_
extern int _EXFUN(__ssvfwscanf_r,(struct _reent *,FILE *, _CONST wchar_t *,va_list)); extern int _EXFUN(__ssvfwscanf_r,(struct _reent *,FILE *, _CONST wchar_t *,va_list));
extern int _EXFUN(__svfiwscanf_r,(struct _reent *,FILE *, _CONST wchar_t *,va_list)); extern int _EXFUN(__svfiwscanf_r,(struct _reent *,FILE *, _CONST wchar_t *,va_list));
extern int _EXFUN(__ssvfiwscanf_r,(struct _reent *,FILE *, _CONST wchar_t *,va_list)); extern int _EXFUN(__ssvfiwscanf_r,(struct _reent *,FILE *, _CONST wchar_t *,va_list));
int _EXFUN(_svfprintf_r,(struct _reent *, FILE *, const char *, int _EXFUN(_svfprintf_r,(struct _reent *, FILE *, const char *,
va_list) va_list)
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); _ATTRIBUTE ((__format__ (__printf__, 3, 0))));
int _EXFUN(_svfiprintf_r,(struct _reent *, FILE *, const char *, int _EXFUN(_svfiprintf_r,(struct _reent *, FILE *, const char *,
va_list) va_list)
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); _ATTRIBUTE ((__format__ (__printf__, 3, 0))));
int _EXFUN(_svfwprintf_r,(struct _reent *, FILE *, const wchar_t *, int _EXFUN(_svfwprintf_r,(struct _reent *, FILE *, const wchar_t *,
va_list)); va_list));
int _EXFUN(_svfiwprintf_r,(struct _reent *, FILE *, const wchar_t *, int _EXFUN(_svfiwprintf_r,(struct _reent *, FILE *, const wchar_t *,
va_list)); va_list));
extern FILE *_EXFUN(__sfp,(struct _reent *)); extern FILE *_EXFUN(__sfp,(struct _reent *));
extern int _EXFUN(__sflags,(struct _reent *,_CONST char*, int*)); extern int _EXFUN(__sflags,(struct _reent *,_CONST char*, int*));
@ -263,14 +263,11 @@ extern _READ_WRITE_RETURN_TYPE _EXFUN(__swrite64,(struct _reent *, void *,
#define ORIENT(fp,ori) \ #define ORIENT(fp,ori) \
do \ do \
{ \ { \
if (!((fp)->_flags & __SORD)) \
{ \
(fp)->_flags |= __SORD; \ (fp)->_flags |= __SORD; \
if (ori > 0) \ if (ori > 0) \
(fp)->_flags2 |= __SWID; \ (fp)->_flags2 |= __SWID; \
else \ else \
(fp)->_flags2 &= ~__SWID; \ (fp)->_flags2 &= ~__SWID; \
} \
} \ } \
while (0) while (0)
#else #else