forked from enlightenment/efl
* fix compilation when iconv.h is detected but libiconv is not
* fix warning and clang report SVN revision: 45970
This commit is contained in:
parent
f285bc7ae9
commit
6ac6ee026c
|
@ -390,6 +390,10 @@ fi
|
|||
|
||||
AC_SUBST(iconv_libs)
|
||||
|
||||
if test "x${have_iconv}" = "xyes" ; then
|
||||
AC_DEFINE([HAVE_ICONV], [1], [Set to 1 if iconv library is installed])
|
||||
fi
|
||||
|
||||
|
||||
### Modules
|
||||
|
||||
|
|
|
@ -1365,7 +1365,9 @@ eina_log_print_cb_file(const Eina_Log_Domain *d, __UNUSED__ Eina_Log_Level level
|
|||
}
|
||||
#endif
|
||||
fprintf(f, "%s %s:%d %s() ", d->name, file, line, fnc);
|
||||
#ifdef EFL_HAVE_PTHREAD
|
||||
end:
|
||||
#endif
|
||||
vfprintf(f, fmt, args);
|
||||
putc('\n', f);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#ifdef HAVE_ICONV_H
|
||||
#ifdef HAVE_ICONV
|
||||
# include <errno.h>
|
||||
# include <iconv.h>
|
||||
#endif
|
||||
|
@ -354,10 +354,10 @@ eina_str_join_len(char *dst, size_t size, char sep, const char *a, size_t a_len,
|
|||
* @param text text to convert
|
||||
*
|
||||
*/
|
||||
#ifdef HAVE_ICONV
|
||||
EAPI char *
|
||||
eina_str_convert(const char *enc_from, const char *enc_to, const char *text)
|
||||
{
|
||||
#ifdef HAVE_ICONV_H
|
||||
iconv_t ic;
|
||||
char *new_txt, *inp, *outp;
|
||||
size_t inb, outb, outlen, tob, outalloc;
|
||||
|
@ -417,10 +417,14 @@ eina_str_convert(const char *enc_from, const char *enc_to, const char *text)
|
|||
}
|
||||
iconv_close(ic);
|
||||
return new_txt;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
EAPI char *
|
||||
eina_str_convert(const char *enc_from __UNUSED__, const char *enc_to __UNUSED__, const char *text __UNUSED__)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Put a \ before and Space( ), \ or ' in a string.
|
||||
|
|
Loading…
Reference in New Issue