libc/uClibc: add wchar support

This commit is contained in:
Simon Pasch 2009-11-06 20:17:30 +01:00
parent d5eb1f0dcf
commit a4980248f3
2 changed files with 21 additions and 2 deletions

View File

@ -136,9 +136,19 @@ config LIBC_UCLIBC_CONFIG_FILE
config LIBC_UCLIBC_LOCALES
bool
select LIBC_UCLIBC_WCHAR
prompt "Add support for locales"
default n
help
Say y if you want uClibc to support localisation.
Note that seems to be broken on recent uClibc releases.
config LIBC_UCLIBC_WCHAR
bool
prompt "Add support for WCHAR"
default n
help
Say y if you want uClibc to support WCHAR.
Maybe this is needed, if you're building a C++-Compiler

View File

@ -292,14 +292,23 @@ s/^# UCLIBC_HAS_LOCALE is not set/UCLIBC_HAS_LOCALE=y\\nUCLIBC_PREGENERATED_LOCA
ENDSED
fi
# WCHAR support
if [ "${CT_LIBC_UCLIBC_WCHAR}" = "y" ] ; then
cat >>"${munge_file}" <<-ENDSED
s/^.*UCLIBC_HAS_WCHAR.*/UCLIBC_HAS_WCHAR=y/
ENDSED
else
cat >>"${munge_file}" <<-ENDSED
s/^.*UCLIBC_HAS_WCHAR.*/UCLIBC_HAS_WCHAR=n/
ENDSED
fi
# Force on options needed for C++ if we'll be making a C++ compiler.
# I'm not sure locales are a requirement for doing C++... Are they?
if [ "${CT_CC_LANG_CXX}" = "y" ]; then
cat >>"${munge_file}" <<-ENDSED
s/^# DO_C99_MATH is not set/DO_C99_MATH=y/
s/^# UCLIBC_CTOR_DTOR is not set/UCLIBC_CTOR_DTOR=y/
# Add these three lines when doing C++?
s/^# UCLIBC_HAS_WCHAR is not set/UCLIBC_HAS_WCHAR=y/
#s/^# UCLIBC_HAS_LOCALE is not set/UCLIBC_HAS_LOCALE=y\\nUCLIBC_PREGENERATED_LOCALE_DATA=y\\n\\# UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA is not set\\n\\# UCLIBC_HAS_XLOCALE is not set/
s/^# UCLIBC_HAS_GNU_GETOPT is not set/UCLIBC_HAS_GNU_GETOPT=y/
ENDSED