diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Src/system.h | 13 | ||||
-rw-r--r-- | Src/utils.c | 6 |
3 files changed, 12 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog index 2e011e029..ca8f88484 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-12-15 Peter Stephenson <pws@csr.com> + * 22085 and back off 22075: Src/system.h, Src/utils.c: we + may need <langinfo.h> even with MULTIBYTE_SUPPORT to get iconv. + * 22076: INSTALL, Etc/FAQ.yo: more information on multibyte handling. diff --git a/Src/system.h b/Src/system.h index 3b698161a..33804e71a 100644 --- a/Src/system.h +++ b/Src/system.h @@ -703,11 +703,10 @@ extern short ospeed; */ # include <wchar.h> # include <wctype.h> -#else -# ifdef HAVE_LANGINFO_H -# include <langinfo.h> -# ifdef HAVE_ICONV -# include <iconv.h> -# endif -# endif +#endif +#ifdef HAVE_LANGINFO_H +# include <langinfo.h> +# ifdef HAVE_ICONV +# include <iconv.h> +# endif #endif diff --git a/Src/utils.c b/Src/utils.c index e391bc281..4fb52cff5 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -3918,7 +3918,7 @@ dquotedzputs(char const *s, FILE *stream) } #endif -# if defined(HAVE_NL_LANGINFO) && defined(CODESET) && !defined(__STDC_ISO_10646__) && !defined(MULTIBYTE_SUPPORT) +# if defined(HAVE_NL_LANGINFO) && defined(CODESET) && !defined(__STDC_ISO_10646__) /* Convert a character from UCS4 encoding to UTF-8 */ static size_t @@ -3983,7 +3983,7 @@ getkeystring(char *s, int *len, int fromwhere, int *misc) char svchar = '\0'; int meta = 0, control = 0; int i; -#if defined(HAVE_WCHAR_H) && defined(HAVE_WCTOMB) && (defined(__STDC_ISO_10646__) || defined(MULTIBYTE_SUPPORT)) +#if defined(HAVE_WCHAR_H) && defined(HAVE_WCTOMB) && defined(__STDC_ISO_10646__) wint_t wval; size_t count; #else @@ -4092,7 +4092,7 @@ getkeystring(char *s, int *len, int fromwhere, int *misc) *misc = wval; return s+1; } -#if defined(HAVE_WCHAR_H) && defined(HAVE_WCTOMB) && (defined(__STDC_ISO_10646__) || defined(MULTIBYTE_SUPPORT)) +#if defined(HAVE_WCHAR_H) && defined(HAVE_WCTOMB) && defined(__STDC_ISO_10646__) count = wctomb(t, (wchar_t)wval); if (count == (size_t)-1) { zerr("character not in range", NULL, 0); |