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 &lt;<a href=3D"mailto:[email protected]"=
>[email protected]</a>&gt; 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>
&gt; Dmitry Belyavsky wrote:<br>
&gt;&gt; Hello,<br>
&gt;&gt;<br>
&gt;&gt; We have a rather ancient instance of XMLSec (smth like 1.2.20) and=
 a<br>
&gt;&gt; homebrew =D0=A1++ wrapper around it.<br>
&gt;&gt;<br>
&gt;&gt; I came across that a call of sizeof() for various structures in C =
and C++<br>
&gt;&gt; give different results causing Bad Things when I try to access var=
ious<br>
&gt;&gt; fields of these structures.<br>
&gt; <br>
&gt; No idea.<br>
&gt; <br>
&gt; If I remember well all public headers are in following format:<br>
&gt; ...<br>
&gt; &lt;&lt;&lt;include external headers&gt;&gt;&gt;<br>
&gt; <br>
&gt; #ifdef __cplusplus<br>
&gt; extern &quot;C&quot; {<br>
&gt; #endif /* __cplusplus */<br>
&gt; <br>
&gt;=C2=A0 =C2=A0&lt;&lt;&lt; xmlsec related code=C2=A0 &gt;&gt;&gt;<br>
&gt; <br>
&gt; #ifdef __cplusplus<br>
&gt; }<br>
&gt; #endif /* __cplusplus */<br>
&gt; <br>
&gt; <br>
&gt;&gt; Is there any cheap way to fix this behavior?<br>
&gt; Dunno, as all xmlsec is &quot;C&quot; code.<br>
&gt; If is not compiler defect then sample code may help to find reason.<br=
>
&gt; <br>
&gt; Roumen<br>
&gt; _______________________________________________<br>
&gt; xmlsec mailing list<br>
&gt; <a href=3D"mailto:[email protected]" target=3D"_blank">xmlsec@aleksey=
.com</a><br>
&gt; <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==--