mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-10 13:29:58 -05:00
Use AM_ICONV to determine what needs to be done for iconv support. (closes #19)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1012 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
c32176b0ad
commit
519aa9b2ef
3 changed files with 12 additions and 7 deletions
|
|
@ -34,7 +34,7 @@
|
|||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_ICONV_H
|
||||
#ifdef HAVE_ICONV
|
||||
#include <iconv.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -168,14 +168,15 @@ char* pa_utf8_filter (const char *str) {
|
|||
return utf8_validate(str, new_str);
|
||||
}
|
||||
|
||||
#ifdef HAVE_ICONV_H
|
||||
#ifdef HAVE_ICONV
|
||||
|
||||
static char* iconv_simple(const char *str, const char *to, const char *from) {
|
||||
char *new_str;
|
||||
size_t len, inlen;
|
||||
|
||||
iconv_t cd;
|
||||
char *inbuf, *outbuf;
|
||||
ICONV_CONST char *inbuf;
|
||||
char *outbuf;
|
||||
size_t res, inbytes, outbytes;
|
||||
|
||||
cd = iconv_open(to, from);
|
||||
|
|
@ -187,7 +188,7 @@ static char* iconv_simple(const char *str, const char *to, const char *from) {
|
|||
assert(new_str);
|
||||
|
||||
while (1) {
|
||||
inbuf = (char*)str; /* Brain dead prototype for iconv() */
|
||||
inbuf = (ICONV_CONST char*)str; /* Brain dead prototype for iconv() */
|
||||
inbytes = inlen;
|
||||
outbuf = new_str;
|
||||
outbytes = len;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue