libc/uClibc: add wchar support
authorSimon Pasch <fpasch@googlemail.com>
Fri Nov 06 20:17:30 2009 +0100 (2009-11-06)
changeset 1639bdf7ab3588c6
parent 1638 27165f6184f2
child 1640 3d8f6d826f21
libc/uClibc: add wchar support
config/libc/uClibc.in
scripts/build/libc/uClibc.sh
     1.1 --- a/config/libc/uClibc.in	Tue Nov 17 22:29:50 2009 +0100
     1.2 +++ b/config/libc/uClibc.in	Fri Nov 06 20:17:30 2009 +0100
     1.3 @@ -136,9 +136,19 @@
     1.4  
     1.5  config LIBC_UCLIBC_LOCALES
     1.6      bool
     1.7 +    select LIBC_UCLIBC_WCHAR
     1.8      prompt "Add support for locales"
     1.9      default n
    1.10      help
    1.11        Say y if you want uClibc to support localisation.
    1.12  
    1.13        Note that seems to be broken on recent uClibc releases.
    1.14 +
    1.15 +config LIBC_UCLIBC_WCHAR
    1.16 +    bool
    1.17 +    prompt "Add support for WCHAR"
    1.18 +    default n
    1.19 +    help
    1.20 +      Say y if you want uClibc to support WCHAR.
    1.21 +
    1.22 +      Maybe this is needed, if you're building a C++-Compiler
     2.1 --- a/scripts/build/libc/uClibc.sh	Tue Nov 17 22:29:50 2009 +0100
     2.2 +++ b/scripts/build/libc/uClibc.sh	Fri Nov 06 20:17:30 2009 +0100
     2.3 @@ -292,14 +292,23 @@
     2.4  ENDSED
     2.5      fi
     2.6  
     2.7 +    # WCHAR support
     2.8 +    if [ "${CT_LIBC_UCLIBC_WCHAR}" = "y" ] ; then
     2.9 +       cat >>"${munge_file}" <<-ENDSED
    2.10 +s/^.*UCLIBC_HAS_WCHAR.*/UCLIBC_HAS_WCHAR=y/
    2.11 +ENDSED
    2.12 +    else
    2.13 +       cat >>"${munge_file}" <<-ENDSED
    2.14 +s/^.*UCLIBC_HAS_WCHAR.*/UCLIBC_HAS_WCHAR=n/
    2.15 +ENDSED
    2.16 +    fi
    2.17 +
    2.18      # Force on options needed for C++ if we'll be making a C++ compiler.
    2.19      # I'm not sure locales are a requirement for doing C++... Are they?
    2.20      if [ "${CT_CC_LANG_CXX}" = "y" ]; then
    2.21          cat >>"${munge_file}" <<-ENDSED
    2.22  s/^# DO_C99_MATH is not set/DO_C99_MATH=y/
    2.23  s/^# UCLIBC_CTOR_DTOR is not set/UCLIBC_CTOR_DTOR=y/
    2.24 -# Add these three lines when doing C++?
    2.25 -s/^# UCLIBC_HAS_WCHAR is not set/UCLIBC_HAS_WCHAR=y/
    2.26  #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/
    2.27  s/^# UCLIBC_HAS_GNU_GETOPT is not set/UCLIBC_HAS_GNU_GETOPT=y/
    2.28  ENDSED