[polypaudio-commits] r1012 - in /trunk: configure.ac src/Makefile.am src/polyp/utf8.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Mon Jun 12 07:18:21 PDT 2006


Author: ossman
Date: Mon Jun 12 16:18:19 2006
New Revision: 1012

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1012&root=polypaudio&view=rev
Log:
Use AM_ICONV to determine what needs to be done for iconv support. (closes #19)

Modified:
    trunk/configure.ac
    trunk/src/Makefile.am
    trunk/src/polyp/utf8.c

Modified: trunk/configure.ac
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/configure.ac?rev=1012&root=polypaudio&r1=1011&r2=1012&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Mon Jun 12 16:18:19 2006
@@ -165,7 +165,7 @@
 AC_HEADER_STDC
 
 # POSIX
-AC_CHECK_HEADERS([arpa/inet.h glob.h grp.h iconv.h netdb.h netinet/in.h \
+AC_CHECK_HEADERS([arpa/inet.h glob.h grp.h netdb.h netinet/in.h \
     netinet/in_systm.h netinet/ip.h netinet/tcp.h pwd.h sched.h \
     sys/resource.h sys/select.h sys/socket.h sys/wait.h \
     syslog.h])
@@ -269,6 +269,10 @@
 #### Large File-Support (LFS) ####
 
 AC_SYS_LARGEFILE
+
+#### [lib]iconv ####
+
+AM_ICONV
 
 ###################################
 #      External libraries         #

Modified: trunk/src/Makefile.am
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/Makefile.am?rev=1012&root=polypaudio&r1=1011&r2=1012&view=diff
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Mon Jun 12 16:18:19 2006
@@ -420,7 +420,7 @@
 
 libpolyp_la_CFLAGS = $(AM_CFLAGS)
 libpolyp_la_LDFLAGS = -version-info $(LIBPOLYP_VERSION_INFO)
-libpolyp_la_LIBADD = $(AM_LIBADD) $(WINSOCK_LIBS)
+libpolyp_la_LIBADD = $(AM_LIBADD) $(WINSOCK_LIBS) $(LIBICONV)
 
 if HAVE_X11
 libpolyp_la_CFLAGS += $(X_CFLAGS)
@@ -587,7 +587,7 @@
 
 libpolypcore_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBOIL_CFLAGS)
 libpolypcore_la_LDFLAGS = -version-info $(LIBPOLYPCORE_VERSION_INFO)
-libpolypcore_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSNDFILE_LIBS) $(WINSOCK_LIBS) $(LIBOIL_LIBS)
+libpolypcore_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSNDFILE_LIBS) $(WINSOCK_LIBS) $(LIBOIL_LIBS) $(LIBICONV)
 
 ###################################
 #   Plug-in support libraries     #

Modified: trunk/src/polyp/utf8.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polyp/utf8.c?rev=1012&root=polypaudio&r1=1011&r2=1012&view=diff
==============================================================================
--- trunk/src/polyp/utf8.c (original)
+++ trunk/src/polyp/utf8.c Mon Jun 12 16:18:19 2006
@@ -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 @@
     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 @@
     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;




More information about the pulseaudio-commits mailing list