UCS-4 seems to be more portable than WCHAR_T.

SVN revision: 27304
This commit is contained in:
Kim Woelders 2006-11-30 22:03:20 +00:00
parent 0ebd06ba81
commit b429c405f8
2 changed files with 6 additions and 0 deletions

View File

@ -68,6 +68,7 @@ AC_C_INLINE
AC_C___ATTRIBUTE__
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
AC_CHECK_SIZEOF(wchar_t, 4)
AC_CHECK_FUNCS(getcwd)
AC_CHECK_FUNCS(mkdir)

View File

@ -164,8 +164,13 @@ EwcOpen(int utf8)
else
enc = nl_langinfo(CODESET);
#if SIZEOF_WCHAR_T == 4
iconv_cd_str2wcs = iconv_open("UCS-4", enc);
iconv_cd_wcs2str = iconv_open(enc, "UCS-4");
#else
iconv_cd_str2wcs = iconv_open("WCHAR_T", enc);
iconv_cd_wcs2str = iconv_open(enc, "WCHAR_T");
#endif
if (iconv_cd_str2wcs != BAD_CD && iconv_cd_wcs2str != BAD_CD)
return 0;