[xmlsec] Include file order
Peter Budai
peterbudai at hotmail.com
Sat Jun 9 00:59:26 PDT 2018
I’ll send a PR shortly, no problem
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
________________________________
From: Aleksey Sanin <aleksey at aleksey.com>
Sent: Friday, June 8, 2018 6:44:29 PM
To: Peter Budai; xmlsec at aleksey.com
Subject: Re: [xmlsec] Include file order
Interesting. Looks like libxslt is now including some windows crypto
code that triggered this issue.
I think changing includes order should be fine. Nothing in xmlsec
should depend on includes order. Do you mind sending a PR?
Aleksey
On 6/8/18 2:44 AM, Peter Budai wrote:
>
>
> With the latest release I have noticed that the build under MSYS2/MINGW
> is failing with the following message:
>
> ../../../src/openssl/x509.c:109:66: error: expected declaration
> specifiers or '...' before '(' token
>
> static xmlChar* xmlSecOpenSSLX509NameWrite (X509_NAME* nm);
>
> ^
>
> ../../../src/openssl/x509.c: In function
> 'xmlSecOpenSSLX509SubjectNameNodeWrite':
>
>
>
> More detailed build log you can see here:
> https://ci.appveyor.com/project/peterbud/xmlsec/build/job/sc82e41xseg7c391#L494
>
>
>
> The problem in my understanding is that Windows headers also #define
> some names that openssl uses too. Openssl headers #undef the offending
> names before reusing them. But if those offending Windows headers get
> included _/after/_ the openssl headers the namespace gets polluted.
>
>
>
> As a solution I have changed the include order in the openssl/x509.c and
> openssl/x50vfy.c files, aka moved the openssl includes as the last files
> to include, and that solved the problem, I was able to compile and
> execute all the tests.
>
>
>
> However I’m not sue this is the right solution. Any opinion?
>
>
>
> Peter
>
>
>
> _______________________________________________
> xmlsec mailing list
> xmlsec at aleksey.com
> http://www.aleksey.com/mailman/listinfo/xmlsec
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aleksey.com/pipermail/xmlsec/attachments/20180609/731defad/attachment.html>
More information about the xmlsec
mailing list