<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">With the latest release I have noticed that the build under MSYS2/MINGW is failing with the following message:</p>
<p class="MsoNormal"><span style="font-family:"Courier New"">../../../src/openssl/x509.c:109:66: error: expected declaration specifiers or '...' before '(' token<o:p></o:p></span></p>
<div id="L495">
<p class="MsoNormal"><span style="font-family:"Courier New"">static xmlChar* xmlSecOpenSSLX509NameWrite (X509_NAME* nm);<o:p></o:p></span></p>
</div>
<div id="L496">
<p class="MsoNormal"><span style="font-family:"Courier New"">^<o:p></o:p></span></p>
</div>
<div id="L497">
<p class="MsoNormal"><span style="font-family:"Courier New"">../../../src/openssl/x509.c: In function 'xmlSecOpenSSLX509SubjectNameNodeWrite':<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">More detailed build log you can see here: <a href="https://ci.appveyor.com/project/peterbud/xmlsec/build/job/sc82e41xseg7c391#L494">
https://ci.appveyor.com/project/peterbud/xmlsec/build/job/sc82e41xseg7c391#L494</a></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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 _<i>after</i>_ the
openssl headers the namespace gets polluted.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">However I’m not sue this is the right solution. Any opinion?</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Peter<o:p></o:p></p>
</div>
</body>
</html>