[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gnu-libiconv] Portability fix for libiconv 1.13
From: |
Larry Jones |
Subject: |
[bug-gnu-libiconv] Portability fix for libiconv 1.13 |
Date: |
Tue, 30 Jun 2009 13:49:43 -0400 (EDT) |
There are compile errors in lib/iconv_open2.h if neither HAVE_WCRTOMB
nor HAVE_MBRTOWC is defined because struct wchar_conv_struct doesn't
contain a state member unless one of those macros is defined but the
code in iconv_open2.h accesses it unconditionally. I chose to fix it by
conditionalizing the access:
--- iconv_open2.h.orig Tue Sep 16 20:26:17 2008
+++ iconv_open2.h Sat Jun 27 16:33:07 2009
@@ -82,6 +82,8 @@
/* Initialize additional fields. */
if (from_wchar != to_wchar) {
struct wchar_conv_struct * wcd = (struct wchar_conv_struct *) cd;
+#if HAVE_WCRTOMB || HAVE_MBRTOWC
memset(&wcd->state,'\0',sizeof(mbstate_t));
+#endif
}
/* Done. */
-Larry Jones
Why can't I ever build character in a Miami condo or a casino somewhere?
-- Calvin
- [bug-gnu-libiconv] Portability fix for libiconv 1.13,
Larry Jones <=