From 6c4265504571dd3176f6a3a62f94658e4a94d61a Mon Sep 17 00:00:00 2001 From: Choe Hwanjin Date: Mon, 18 Jul 2011 23:30:24 +0900 Subject: =?UTF-8?q?AM=5FICONV=20=EB=A7=A4=ED=81=AC=EB=A1=9C=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit freebsd에서 컴파일 오류가 발생하는 것을 막기 위한 것 git-svn-id: http://kldp.net/svn/hangul/libhangul/trunk@262 8f00fcd2-89fc-0310-932e-b01be5b65e01 --- configure.ac | 1 + test/Makefile.am | 2 +- test/hangul.c | 6 +++++- tools/Makefile.am | 2 +- tools/hangul.c | 6 +++++- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index d4581d6..cb710fc 100644 --- a/configure.ac +++ b/configure.ac @@ -50,6 +50,7 @@ AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", gettext package name) AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION(0.11) +AM_ICONV # Checks for unit test framework PKG_PROG_PKG_CONFIG diff --git a/test/Makefile.am b/test/Makefile.am index e47221b..8c7c80b 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -3,7 +3,7 @@ noinst_PROGRAMS = hangul hanja hangul_CFLAGS = hangul_SOURCES = hangul.c -hangul_LDADD = ../hangul/libhangul.la $(LTLIBINTL) +hangul_LDADD = ../hangul/libhangul.la $(LTLIBINTL) $(LTLIBICONV) hanja_CFLAGS = hanja_SOURCES = hanja.c diff --git a/test/hangul.c b/test/hangul.c index 4023759..7f829a3 100644 --- a/test/hangul.c +++ b/test/hangul.c @@ -15,10 +15,14 @@ #define UCS4 "UCS-4LE" #endif +#ifndef ICONV_CONST +#define ICONV_CONST +#endif + void ucs4_to_utf8(char *buf, const ucschar *ucs4, size_t bufsize) { size_t n; - char* inbuf; + ICONV_CONST char* inbuf; size_t inbytesleft; char* outbuf; size_t outbytesleft; diff --git a/tools/Makefile.am b/tools/Makefile.am index 22f95fb..cf27653 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -3,4 +3,4 @@ bin_PROGRAMS = hangul hangul_SOURCES = hangul.c hangul_CFLAGS = -DLOCALEDIR=\"$(localedir)\" -hangul_LDADD = ../hangul/libhangul.la $(LTLIBINTL) +hangul_LDADD = ../hangul/libhangul.la $(LTLIBINTL) $(LTLIBICONV) diff --git a/tools/hangul.c b/tools/hangul.c index 3557106..bc6bba6 100644 --- a/tools/hangul.c +++ b/tools/hangul.c @@ -44,6 +44,10 @@ #define UCS4 "UCS-4LE" #endif +#ifndef ICONV_CONST +#define ICONV_CONST +#endif + static const char* program_name = "hangul"; static iconv_t cd_ucs4_to_utf8 = (iconv_t)-1; @@ -181,7 +185,7 @@ static int fputs_ucschar(const ucschar* str, FILE* stream) { char buf[512]; - char* inbuf; + ICONV_CONST char* inbuf; char* outbuf; size_t inbytesleft; size_t outbytesleft; -- cgit v1.2.1