From: Bruno Haible Date: Tue, 26 Jul 2005 13:37:11 +0000 (+0000) Subject: Fix compilation error on systems without iconv(). X-Git-Tag: v0.15~456 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52131065446fd04b4946f78573c14d5f81971d32;p=thirdparty%2Fgettext.git Fix compilation error on systems without iconv(). --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index f9ea1165c..41c91486a 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,9 @@ +2005-07-26 Bruno Haible + + Fix compilation error on systems without iconv(). + * xgettext.c (convert_string): Remove fallback macro definition. + (from_current_source_encoding) [!HAVE_ICONV]: Just abort here. + 2005-07-17 Bruno Haible * po-lex.c (mb_width): Remove gcc warnings on platform with unsigned diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c index 40844ecc4..be4d8b30c 100644 --- a/gettext-tools/src/xgettext.c +++ b/gettext-tools/src/xgettext.c @@ -1642,14 +1642,6 @@ extract_from_file (const char *file_name, extractor_ty extractor, -#if !HAVE_ICONV -/* If we don't have iconv(), the only supported values for - xgettext_global_source_encoding and thus also for - xgettext_current_source_encoding are ASCII and UTF-8. - convert_string() should not be called in this case. */ -#define convert_string(cd,string,context) (abort (), (string)) -#endif - /* Convert the given string from xgettext_current_source_encoding to the output file encoding (i.e. ASCII or UTF-8). The resulting string is either the argument string, or freshly allocated. @@ -1678,6 +1670,7 @@ Please specify the source encoding through --from-code.\n"), } else if (xgettext_current_source_encoding != po_charset_utf8) { +#if HAVE_ICONV struct conversion_context context; context.from_code = xgettext_current_source_encoding; @@ -1685,6 +1678,13 @@ Please specify the source encoding through --from-code.\n"), context.from_filename = file_name; string = convert_string (xgettext_current_source_iconv, string, &context); +#else + /* If we don't have iconv(), the only supported values for + xgettext_global_source_encoding and thus also for + xgettext_current_source_encoding are ASCII and UTF-8. + convert_string() should not be called in this case. */ + abort (); +#endif } return (char *) string;