mirror of
https://github.com/mirror/wget.git
synced 2024-12-28 05:40:08 +08:00
Skip iconv() usage if HAVE_ICONV is not defined
This helps on broken iconv implementations, e.g. Solaris. Reported-by: Mojca Miklavec
This commit is contained in:
parent
67cb37ce5a
commit
0ec46cb109
10
src/iri.c
10
src/iri.c
@ -121,6 +121,7 @@ check_encoding_name (const char *encoding)
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef HAVE_ICONV
|
||||
/* Do the conversion according to the passed conversion descriptor cd. *out
|
||||
will contain the transcoded string on success. *out content is
|
||||
unspecified otherwise. */
|
||||
@ -212,6 +213,15 @@ do_conversion (const char *tocode, const char *fromcode, char const *in_org, siz
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
static bool
|
||||
do_conversion (const char *tocode _GL_UNUSED, const char *fromcode _GL_UNUSED,
|
||||
char const *in_org _GL_UNUSED, size_t inlen _GL_UNUSED, char **out)
|
||||
{
|
||||
*out = NULL;
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Try converting string str from locale to UTF-8. Return a new string
|
||||
on success, or str on error or if conversion isn't needed. */
|
||||
|
@ -1549,6 +1549,7 @@ append_uri_pathel (const char *b, const char *e, bool escaped,
|
||||
append_null (dest);
|
||||
}
|
||||
|
||||
#ifdef HAVE_ICONV
|
||||
static char *
|
||||
convert_fname (char *fname)
|
||||
{
|
||||
@ -1627,6 +1628,13 @@ convert_fname (char *fname)
|
||||
|
||||
return converted_fname;
|
||||
}
|
||||
#else
|
||||
static char *
|
||||
convert_fname (char *fname)
|
||||
{
|
||||
return fname;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Append to DEST the directory structure that corresponds the
|
||||
directory part of URL's path. For example, if the URL is
|
||||
|
Loading…
Reference in New Issue
Block a user