FreeBSD Bugzilla – Attachment 186721 Details for
Bug 215393
devel/boost-libs: bad encoding conversion with base iconv()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
boost.locale patch
boost.locale.patch (text/plain), 5.36 KB, created by
Tijl Coosemans
on 2017-09-25 21:20:44 UTC
(
hide
)
Description:
boost.locale patch
Filename:
MIME Type:
Creator:
Tijl Coosemans
Created:
2017-09-25 21:20:44 UTC
Size:
5.36 KB
patch
obsolete
>Index: devel/boost-libs/files/patch-libs_locale_src_encoding_iconv_codepage.ipp >=================================================================== >--- devel/boost-libs/files/patch-libs_locale_src_encoding_iconv_codepage.ipp (nonexistent) >+++ devel/boost-libs/files/patch-libs_locale_src_encoding_iconv_codepage.ipp (working copy) >@@ -0,0 +1,15 @@ >+--- libs/locale/src/encoding/iconv_codepage.ipp.orig 2017-09-02 09:56:14 UTC >++++ libs/locale/src/encoding/iconv_codepage.ipp >+@@ -44,6 +44,12 @@ class iconverter_base { (public) >+ { >+ close(); >+ cvt_ = iconv_open(to,from); >++#if defined(ICONV_SET_ILSEQ_INVALID) && defined(__FreeBSD__) >++ if(cvt_ != (iconv_t)(-1)) { >++ int ilseq_invalid = 1; >++ iconvctl(cvt_,ICONV_SET_ILSEQ_INVALID,&ilseq_invalid); >++ } >++#endif >+ how_ = how; >+ return cvt_ != (iconv_t)(-1); >+ } > >Property changes on: devel/boost-libs/files/patch-libs_locale_src_encoding_iconv_codepage.ipp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: devel/boost-libs/files/patch-libs_locale_src_posix_codecvt.cpp >=================================================================== >--- devel/boost-libs/files/patch-libs_locale_src_posix_codecvt.cpp (nonexistent) >+++ devel/boost-libs/files/patch-libs_locale_src_posix_codecvt.cpp (working copy) >@@ -0,0 +1,26 @@ >+--- libs/locale/src/posix/codecvt.cpp.orig 2017-09-02 09:56:14 UTC >++++ libs/locale/src/posix/codecvt.cpp >+@@ -42,6 +42,10 @@ namespace impl_posix { >+ if(d == (iconv_t)(-1)) { >+ throw std::runtime_error("Unsupported encoding" + encoding); >+ } >++#if defined(ICONV_SET_ILSEQ_INVALID) && defined(__FreeBSD__) >++ int ilseq_invalid = 1; >++ iconvctl(d,ICONV_SET_ILSEQ_INVALID,&ilseq_invalid); >++#endif >+ for(unsigned c=0;c<256;c++) { >+ char ibuf[2] = { char(c) , 0 }; >+ char *in = ibuf; >+@@ -187,6 +191,12 @@ namespace impl_posix { >+ if(d!=(iconv_t)(-1)) >+ return; >+ d=iconv_open(to,from); >++#if defined(ICONV_SET_ILSEQ_INVALID) && defined(__FreeBSD__) >++ if(d != (iconv_t)(-1)) { >++ int ilseq_invalid = 1; >++ iconvctl(d,ICONV_SET_ILSEQ_INVALID,&ilseq_invalid); >++ } >++#endif >+ } >+ >+ static char const *utf32_encoding() > >Property changes on: devel/boost-libs/files/patch-libs_locale_src_posix_codecvt.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: devel/boost-libs/files/patch-libs_locale_src_util_iconv.hpp >=================================================================== >--- devel/boost-libs/files/patch-libs_locale_src_util_iconv.hpp (nonexistent) >+++ devel/boost-libs/files/patch-libs_locale_src_util_iconv.hpp (working copy) >@@ -0,0 +1,39 @@ >+--- libs/locale/src/util/iconv.hpp.orig 2017-09-02 09:56:14 UTC >++++ libs/locale/src/util/iconv.hpp >+@@ -12,27 +12,7 @@ >+ >+ namespace boost { >+ namespace locale { >+-#if defined(__ICONV_F_HIDE_INVALID) && defined(__FreeBSD__) >+ extern "C" { >+- typedef size_t (*const_iconv_ptr_type)(iconv_t d,char const **in,size_t *insize,char **out,size_t *outsize,uint32_t,size_t *); >+- typedef size_t (*nonconst_iconv_ptr_type)(iconv_t d,char **in,size_t *insize,char **out,size_t *outsize,uint32_t,size_t *); >+- } >+- inline size_t do_iconv(const_iconv_ptr_type ptr,iconv_t d,char **in,size_t *insize,char **out,size_t *outsize) >+- { >+- char const **rin = const_cast<char const **>(in); >+- return ptr(d,rin,insize,out,outsize,__ICONV_F_HIDE_INVALID,0); >+- } >+- inline size_t do_iconv(nonconst_iconv_ptr_type ptr,iconv_t d,char **in,size_t *insize,char **out,size_t *outsize) >+- { >+- return ptr(d,in,insize,out,outsize,__ICONV_F_HIDE_INVALID,0); >+- } >+- inline size_t call_iconv(iconv_t d,char **in,size_t *insize,char **out,size_t *outsize) >+- { >+- char const **rin = const_cast<char const **>(in); >+- return do_iconv(__iconv, d, in,insize,out,outsize); >+- } >+-#else >+- extern "C" { >+ typedef size_t (*gnu_iconv_ptr_type)(iconv_t d,char const **in,size_t *insize,char **out,size_t *outsize); >+ typedef size_t (*posix_iconv_ptr_type)(iconv_t d,char **in,size_t *insize,char **out,size_t *outsize); >+ } >+@@ -49,8 +29,6 @@ namespace boost { >+ { >+ return do_iconv( iconv, d, in,insize,out,outsize); >+ } >+-#endif >+- >+ } // locale >+ } // boost >+ > >Property changes on: devel/boost-libs/files/patch-libs_locale_src_util_iconv.hpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 215393
:
178070
|
178071
|
178072
|
178073
|
178074
|
186691
|
186721
|
186738