libiconv_android.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. --- a/libcharset/lib/localcharset.c 2015-06-10 11:55:25.933870724 +0200
  2. +++ b/libcharset/lib/localcharset.c 2015-06-10 11:55:39.578063493 +0200
  3. @@ -47,7 +47,7 @@
  4. #if !defined WIN32_NATIVE
  5. # include <unistd.h>
  6. -# if HAVE_LANGINFO_CODESET
  7. +# if HAVE_LANGINFO_CODESET && !(defined __ANDROID__)
  8. # include <langinfo.h>
  9. # else
  10. # if 0 /* see comment below */
  11. @@ -124,7 +124,7 @@ get_charset_aliases (void)
  12. cp = charset_aliases;
  13. if (cp == NULL)
  14. {
  15. -#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
  16. +#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__ || defined __ANDROID__)
  17. const char *dir;
  18. const char *base = "charset.alias";
  19. char *file_name;
  20. @@ -338,6 +338,9 @@ get_charset_aliases (void)
  21. "CP54936" "\0" "GB18030" "\0"
  22. "CP65001" "\0" "UTF-8" "\0";
  23. # endif
  24. +# if defined __ANDROID__
  25. + cp = "*" "\0" "UTF-8" "\0";
  26. +# endif
  27. #endif
  28. charset_aliases = cp;
  29. @@ -361,7 +364,7 @@ locale_charset (void)
  30. const char *codeset;
  31. const char *aliases;
  32. -#if !(defined WIN32_NATIVE || defined OS2)
  33. +#if !(defined WIN32_NATIVE || defined OS2 || defined __ANDROID__)
  34. # if HAVE_LANGINFO_CODESET