Re: Problems with C/C++ compilers
Dmitry Belyavsky <[email protected]> Fri, 12 Jul 2019 12:42:43 +0300
| Newsgroups | gmane.text.xml.xmlsec |
|---|---|
| Message-ID | <CADqLbzJ-rS9BqMjS=tX7yzb0+mfmOcG7H=o+qcd5G5BFyetwFQ@mail.gmail.com> |
--===============0776307815== Content-Type: multipart/alternative; boundary="00000000000018c187058d78bcd2" --00000000000018c187058d78bcd2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Alexey, Thank you! That was the clue. BTW, is this definition available in public headers of xmlsec? On Fri, Jul 12, 2019 at 12:05 AM Aleksey Sanin <[email protected]> wrote: > Make sure you have -DXMLSEC_NO_SIZE_T=3D1 defined (if it is defined > during xmlsec library compilation). > > Aleksey > > On 7/11/19 11:17 AM, Roumen Petrov wrote: > > Dmitry Belyavsky wrote: > >> Hello, > >> > >> We have a rather ancient instance of XMLSec (smth like 1.2.20) and a > >> homebrew =D0=A1++ wrapper around it. > >> > >> I came across that a call of sizeof() for various structures in C and > C++ > >> give different results causing Bad Things when I try to access various > >> fields of these structures. > > > > No idea. > > > > If I remember well all public headers are in following format: > > ... > > <<<include external headers>>> > > > > #ifdef __cplusplus > > extern "C" { > > #endif /* __cplusplus */ > > > > <<< xmlsec related code >>> > > > > #ifdef __cplusplus > > } > > #endif /* __cplusplus */ > > > > > >> Is there any cheap way to fix this behavior? > > Dunno, as all xmlsec is "C" code. > > If is not compiler defect then sample code may help to find reason. > > > > Roumen > > _______________________________________________ > > xmlsec mailing list > > [email protected] > > http://www.aleksey.com/mailman/listinfo/xmlsec > _______________________________________________ > xmlsec mailing list > [email protected] > http://www.aleksey.com/mailman/listinfo/xmlsec > --=20 SY, Dmitry Belyavsky --00000000000018c187058d78bcd2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr">Dear Alexey,</div><div dir=3D"ltr"><br></= div><div>Thank you!</div><div>That was the clue.</div><div><br></div><div>B= TW, is this definition available in public headers of xmlsec?</div><br><div= class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, Jul 12= , 2019 at 12:05 AM Aleksey Sanin <<a href=3D"mailto:[email protected]"= >[email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_quo= te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204= );padding-left:1ex">Make sure you have -DXMLSEC_NO_SIZE_T=3D1 defined (if i= t is defined<br> during xmlsec library compilation).<br> <br> Aleksey<br> <br> On 7/11/19 11:17 AM, Roumen Petrov wrote:<br> > Dmitry Belyavsky wrote:<br> >> Hello,<br> >><br> >> We have a rather ancient instance of XMLSec (smth like 1.2.20) and= a<br> >> homebrew =D0=A1++ wrapper around it.<br> >><br> >> I came across that a call of sizeof() for various structures in C = and C++<br> >> give different results causing Bad Things when I try to access var= ious<br> >> fields of these structures.<br> > <br> > No idea.<br> > <br> > If I remember well all public headers are in following format:<br> > ...<br> > <<<include external headers>>><br> > <br> > #ifdef __cplusplus<br> > extern "C" {<br> > #endif /* __cplusplus */<br> > <br> >=C2=A0 =C2=A0<<< xmlsec related code=C2=A0 >>><br> > <br> > #ifdef __cplusplus<br> > }<br> > #endif /* __cplusplus */<br> > <br> > <br> >> Is there any cheap way to fix this behavior?<br> > Dunno, as all xmlsec is "C" code.<br> > If is not compiler defect then sample code may help to find reason.<br= > > <br> > Roumen<br> > _______________________________________________<br> > xmlsec mailing list<br> > <a href=3D"mailto:[email protected]" target=3D"_blank">xmlsec@aleksey= .com</a><br> > <a href=3D"http://www.aleksey.com/mailman/listinfo/xmlsec" rel=3D"nore= ferrer" target=3D"_blank">http://www.aleksey.com/mailman/listinfo/xmlsec</a= ><br> _______________________________________________<br> xmlsec mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]<= /a><br> <a href=3D"http://www.aleksey.com/mailman/listinfo/xmlsec" rel=3D"noreferre= r" target=3D"_blank">http://www.aleksey.com/mailman/listinfo/xmlsec</a><br> </blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"= class=3D"gmail_signature">SY, Dmitry Belyavsky</div></div> --00000000000018c187058d78bcd2-- --===============0776307815== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KeG1sc2VjIG1h aWxpbmcgbGlzdAp4bWxzZWNAYWxla3NleS5jb20KaHR0cDovL3d3dy5hbGVrc2V5LmNvbS9tYWls bWFuL2xpc3RpbmZvL3htbHNlYwo= --===============0776307815==--