<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><div style="text-align: left;"><br></div>Hi:<br><br>Thank you for the patch, it works correctly. I applied to my working copy of<br>trunk and It compiles without problem.<br><br>One more question, I had a problem with function VSI_STAT64<br>being undefined. I added the following define in src/port/cpl_config.h <br><br>#define VSI_STAT64 stat<br><br>it compiles, but I am not sure if this is correct or it can<br>cause some problems later.<br><br>Regards<br>Godofredo Contreras<br><br><br><br><hr id="stopSpelling">> From: even.rouault@mines-paris.org<br>> To: frdcn@hotmail.com<br>> Subject: Re: [gdal-dev] Problems building gdal for win ce<br>> Date: Wed, 2 Jul 2008 23:10:26 +0200<br>> CC: gdal-dev@lists.osgeo.org<br>> <br>> Try the attached patch. Please confirm if it works (I've no WINCE available) <br>> and I'll commit that<br>> <br>> Index: port/cpl_strtod.cpp<br>> ===================================================================<br>> --- port/cpl_strtod.cpp (révision 14798)<br>> +++ port/cpl_strtod.cpp (copie de travail)<br>> @@ -145,6 +145,56 @@<br>> /* CPLStrtodDelim() */<br>> /************************************************************************/<br>> <br>> +static void CPLReplacePointByLocalePoint(char* pszNumber, char point)<br>> +{<br>> +#if defined(WIN32CE)<br>> + static char byPoint = 0;<br>> + if (byPoint == 0)<br>> + {<br>> + char szBuf[16];<br>> + sprintf(szBuf, "%.1f", 1.0);<br>> + byPoint = szBuf[1];<br>> + }<br>> + if (point != byPoint)<br>> + {<br>> + int i = 0;<br>> +<br>> + while ( pszNumber[i] )<br>> + {<br>> + if ( pszNumber[i] == point )<br>> + {<br>> + pszNumber[i] = byPoint;<br>> + break;<br>> + }<br>> + i++;<br>> + }<br>> + }<br>> +#else<br>> + struct lconv *poLconv = localeconv();<br>> + if ( poLconv<br>> + && poLconv->decimal_point<br>> + && strlen(poLconv->decimal_point) > 0 )<br>> + {<br>> + int i = 0;<br>> + char byPoint = poLconv->decimal_point[0];<br>> +<br>> + if (point != byPoint)<br>> + {<br>> + while ( pszNumber[i] )<br>> + {<br>> + if ( pszNumber[i] == point )<br>> + {<br>> + pszNumber[i] = byPoint;<br>> + break;<br>> + }<br>> + i++;<br>> + }<br>> + }<br>> + }<br>> +#endif<br>> +}<br>> +<br>> +<br>> /**<br>> * Converts ASCII string to floating point number using specified delimiter.<br>> *<br>> @@ -170,30 +220,12 @@<br>> /* with the one, taken from locale settings and use standard strtod() */<br>> /* on that buffer. */<br>> /* -------------------------------------------------------------------- */<br>> -<br>> - struct lconv *poLconv = localeconv();<br>> char *pszNumber = CPLStrdup( nptr );<br>> double dfValue;<br>> int nError;<br>> <br>> - if ( poLconv<br>> - && poLconv->decimal_point<br>> - && strlen(poLconv->decimal_point) > 0 )<br>> - {<br>> - int i = 0;<br>> - char byPoint = poLconv->decimal_point[0];<br>> + CPLReplacePointByLocalePoint(pszNumber, point);<br>> <br>> - while ( pszNumber[i] )<br>> - {<br>> - if ( pszNumber[i] == point )<br>> - {<br>> - pszNumber[i] = byPoint;<br>> - break;<br>> - }<br>> - i++;<br>> - }<br>> - }<br>> -<br>> dfValue = strtod( pszNumber, endptr );<br>> nError = errno;<br>> <br>> @@ -263,29 +295,12 @@<br>> /* on that buffer. */<br>> /* -------------------------------------------------------------------- */<br>> <br>> - struct lconv *poLconv = localeconv();<br>> char *pszNumber = CPLStrdup( nptr );<br>> double dfValue;<br>> int nError;<br>> <br>> - if ( poLconv<br>> - && poLconv->decimal_point<br>> - && strlen(poLconv->decimal_point) > 0 )<br>> - {<br>> - int i = 0;<br>> - char byPoint = poLconv->decimal_point[0];<br>> + CPLReplacePointByLocalePoint(pszNumber, point);<br>> <br>> - while ( pszNumber[i] )<br>> - {<br>> - if ( pszNumber[i] == point )<br>> - {<br>> - pszNumber[i] = byPoint;<br>> - break;<br>> - }<br>> - i++;<br>> - }<br>> - }<br>> -<br>> dfValue = strtof( pszNumber, endptr );<br>> nError = errno;<br>> <br>> <br>> Le Wednesday 02 July 2008 22:27:31 godofredo contreras, vous avez écrit :<br>> > Hi:<br>> ><br>> > I´m trying to compile gdal for windows mobile, using windows mobile 5 sdk<br>> > and visual studio 2005 but I´m getting an undefined reference to<br>> > localeconv in method CPLStrtodDelim and undefined reference to<br>> > GDALWarpCutlineMasker in method GDALWarpOperation::WarpRegionToBuffer.<br>> ><br>> > Have someone had this problems, any idea to solve them?<br>> ><br>> > Thanks in advance<br>> > Godofredo Contreras<br>> ><br>> > _________________________________________________________________<br>> > Don't get caught with egg on your face. Play chicktionary!<br>> > http://club.live.com/chicktionary.aspx?icid=chick_wlhmtextlink1_feb<br>> <br>> <br><br /><hr />Windows Live Hotmail is giving away Zunes. Enter for your chance to win. <a href='http://www.windowslive-hotmail.com/ZuneADay/?locale=en-US&ocid=TXT_TAGLM_Mobile_Zune_V3' target='_new'>Enter Now!</a></body>
</html>