Commit 7e46c68f authored by Mike Hibler's avatar Mike Hibler

Hack around a prototype change for iconv() in 10.2.

parent f8c38a66
......@@ -77,6 +77,12 @@ PLIST_SUB+= TRANSICU="@comment "
.endif
.endif
.if (${TRANSCODER} == "IconvFBSD")
. if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1002000
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-iconv-hack
. endif
.endif
USE_LDCONFIG= yes
XERCESWRKSRC= ${WRKSRC}/src/xercesc
......
--- src/xercesc/util/Transcoders/IconvFBSD/IconvFBSDTransService.cpp.orig 2015-08-15 15:38:13.448251370 -0600
+++ src/xercesc/util/Transcoders/IconvFBSD/IconvFBSDTransService.cpp 2015-08-15 15:40:07.093628703 -0600
@@ -340,7 +340,7 @@
size_t bLen = 2;
ICONV_LOCK;
- if (::iconv (fCDTo, (const char**) &ptr, &len,
+ if (::iconv (fCDTo, (char**) &ptr, &len,
&pTmpArr, &bLen) == (size_t) -1)
return 0;
tmpArr[1] = toupper (*((unsigned char *)tmpArr));
@@ -349,7 +349,7 @@
pTmpArr = wcbuf;
bLen = fUChSize;
ptr = tmpArr;
- if (::iconv (fCDFrom, (const char **)&ptr, &len,
+ if (::iconv (fCDFrom, (char **)&ptr, &len,
&pTmpArr, &bLen) == (size_t) -1)
return 0;
mbcToXMLCh (wcbuf, (XMLCh*) &ch);
@@ -372,7 +372,7 @@
size_t bLen = 2;
ICONV_LOCK;
- if (::iconv (fCDTo, (const char**) &ptr, &len,
+ if (::iconv (fCDTo, (char**) &ptr, &len,
&pTmpArr, &bLen) == (size_t) -1)
return 0;
tmpArr[1] = tolower (*((unsigned char*)tmpArr));
@@ -381,7 +381,7 @@
pTmpArr = wcbuf;
bLen = fUChSize;
ptr = tmpArr;
- if (::iconv (fCDFrom, (const char **)&ptr, &len,
+ if (::iconv (fCDFrom, (char **)&ptr, &len,
&pTmpArr, &bLen) == (size_t) -1)
return 0;
mbcToXMLCh (wcbuf, (XMLCh*) &ch);
@@ -405,7 +405,7 @@
{
ICONV_LOCK;
- if (::iconv (fCDTo, (const char**) &ptr, &len,
+ if (::iconv (fCDTo, (char**) &ptr, &len,
&pTmpArr, &bLen) == (size_t) -1)
return 0;
}
@@ -499,7 +499,7 @@
size_t toLen ) const
{
ICONV_LOCK;
- return ::iconv (fCDFrom, &fromPtr, fromLen, toPtr, &toLen);
+ return ::iconv (fCDFrom, (char**)&fromPtr, fromLen, toPtr, &toLen);
}
size_t IconvFBSDCD::iconvTo ( const char *fromPtr,
@@ -508,7 +508,7 @@
size_t toLen ) const
{
ICONV_LOCK;
- return ::iconv (fCDTo, &fromPtr, fromLen, toPtr, &toLen);
+ return ::iconv (fCDTo, (char**)&fromPtr, fromLen, toPtr, &toLen);
}
#endif /* !XML_USE_LIBICONV */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment