From 3aa4345d78faf0da502ea5313a16f039d42a038b Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Tue, 12 Feb 2002 12:40:46 +0000 Subject: [PATCH] r1188: Fix compile problem if iconv.h is missing (reported by Jim Knoble). --- ROX-Filer/Help/Changes | 4 ++++ ROX-Filer/src/gconvert.c | 12 +++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ROX-Filer/Help/Changes b/ROX-Filer/Help/Changes index a1aa3f75..12c9a086 100644 --- a/ROX-Filer/Help/Changes +++ b/ROX-Filer/Help/Changes @@ -2,6 +2,10 @@ A RISC OS-like filer for X by Thomas Leonard +12-Feb-2002 +~~~~~~~~~~~ +Fix compile problem if iconv.h is missing (reported by Jim Knoble). + 11-Feb-2002 ~~~~~~~~~~~ Updated Spanish translation (Marcelo Ramos). diff --git a/ROX-Filer/src/gconvert.c b/ROX-Filer/src/gconvert.c index c5d17c7e..6424cf36 100644 --- a/ROX-Filer/src/gconvert.c +++ b/ROX-Filer/src/gconvert.c @@ -48,6 +48,7 @@ #include "gconvert.h" +#ifdef HAVE_ICONV_H static gboolean g_utf8_get_charset_internal (const char **a) { @@ -83,9 +84,12 @@ g_utf8_get_charset_internal (const char **a) static int utf8_locale_cache = -1; static const char *utf8_charset_cache = NULL; +#endif + gboolean g_get_charset (const char **charset) { +#ifdef HAVE_ICONV_H if (utf8_locale_cache != -1) { if (charset) @@ -96,10 +100,12 @@ g_get_charset (const char **charset) if (charset) *charset = utf8_charset_cache; return utf8_locale_cache; +#else + *charset = "UTF-8"; + return 1; +#endif } -/* unicode_strchr */ - #ifdef HAVE_ICONV_H size_t g_iconv (GIConv converter, @@ -312,4 +318,4 @@ g_locale_from_utf8 (const gchar *utf8string, charset, "UTF-8", bytes_read, bytes_written, error); } -#endif +#endif /* GTK2 */ -- 2.11.4.GIT