summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChoe Hwanjin <choe.hwanjin@gmail.com>2011-07-18 23:30:24 +0900
committerChoe Hwanjin <choe.hwanjin@gmail.com>2011-07-18 23:30:24 +0900
commit6c4265504571dd3176f6a3a62f94658e4a94d61a (patch)
tree22efb5ef84ecf86afe96790b5ec95a923332e097 /tools
parent5ab14fa01d32432b8d7ce68789898d3380dd3ed8 (diff)
downloadlibhangul-6c4265504571dd3176f6a3a62f94658e4a94d61a.tar.gz
AM_ICONV 매크로 사용
freebsd에서 컴파일 오류가 발생하는 것을 막기 위한 것 git-svn-id: http://kldp.net/svn/hangul/libhangul/trunk@262 8f00fcd2-89fc-0310-932e-b01be5b65e01
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am2
-rw-r--r--tools/hangul.c6
2 files changed, 6 insertions, 2 deletions
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;