<html xmlns:v="urn:schemas-microsoft-com:vml" 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=us-ascii">
<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:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Arial",sans-serif;
        color:black;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="FR">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR"><o:p> </o:p></span></p>
<p class="MsoNormal">The binary omkdepend.exe crashes when it is compiled with visual studio in 64 bits.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The compilation gives the following warning:<o:p></o:p></p>
<p class="MsoNormal">pr.c(105) : warning C4047: 'initializing' : 'char *' differs in levels of indirection from 'int'<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">It’s because the function TranslateFileNameD2U() is not declared. So, visual studio considers that this function is returning an int (instead of char*). The size of a pointer is 64 bits and the size of an int is 32 bits. At runtime, it
 gives a crash because it converts the pointer to an int and convert back to a pointer.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The following patch resolves the crash:<o:p></o:p></p>
<p class="MsoNormal">src/tool/omkdepend/pr.c:<o:p></o:p></p>
<p class="MsoNormal">/* $XConsortium: pr.c,v 1.17 94/04/17 20:10:38 gildea Exp $ */<o:p></o:p></p>
<p class="MsoNormal">/*<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Copyright (c) 1993, 1994  X Consortium<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Permission is hereby granted, free of charge, to any person obtaining a copy<o:p></o:p></p>
<p class="MsoNormal">of this software and associated documentation files (the "Software"), to deal<o:p></o:p></p>
<p class="MsoNormal">in the Software without restriction, including without limitation the rights<o:p></o:p></p>
<p class="MsoNormal">to use, copy, modify, merge, publish, distribute, sublicense, and/or sell<o:p></o:p></p>
<p class="MsoNormal">copies of the Software, and to permit persons to whom the Software is<o:p></o:p></p>
<p class="MsoNormal">furnished to do so, subject to the following conditions:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The above copyright notice and this permission notice shall be included in<o:p></o:p></p>
<p class="MsoNormal">all copies or substantial portions of the Software.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<o:p></o:p></p>
<p class="MsoNormal">IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<o:p></o:p></p>
<p class="MsoNormal">FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE<o:p></o:p></p>
<p class="MsoNormal">X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN<o:p></o:p></p>
<p class="MsoNormal">AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN<o:p></o:p></p>
<p class="MsoNormal">CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Except as contained in this notice, the name of the X Consortium shall not be<o:p></o:p></p>
<p class="MsoNormal">used in advertising or otherwise to promote the sale, use or other dealings<o:p></o:p></p>
<p class="MsoNormal">in this Software without prior written authorization from the X Consortium.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">*/<o:p></o:p></p>
<p class="MsoNormal">+#ifdef __WIN32__<o:p></o:p></p>
<p class="MsoNormal">+#include "gnuwin32.h"<o:p></o:p></p>
<p class="MsoNormal">+#endif<o:p></o:p></p>
<p class="MsoNormal">#include "def.h"<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Daniel.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>