[geos-devel] Building latest CVS HEAD with MSVC++ 8.0

strk at refractions.net strk at refractions.net
Wed Feb 22 17:58:30 EST 2006


It is ok for me to get rid of it, but can you provide the alternative ?
I'm pretty busy with port and refactoring so I can't take care
of that in the short term.

If i'm not wrong Yury provided a replacement for it in the past.
Should be somewhere burned inside GEOS source code :)

Probably a good way to find it is find Math.round() in JTS and
compare with GEOS version of the corresponding class. Volunteers ?

--strk;


On Wed, Feb 22, 2006 at 02:49:54PM -0700, Charlie Savage wrote:
> Take a look at an email from today on the MingW mailing list about round 
> (attached below).
> 
> Strk - can we get rid of the use of round in geos?  If not, then I think 
> we have to have an implement in the GEOS source tree.
> 
> Charlie
> 
> 
> 
> Mark Bourne wrote:
> 
> 
> >> I get the same results as the original poster using Windows 2000, SP4,
> >> GCC 3.2.3
> >> Where are the functions round() and nearbyint() defined? I don't think
> >> they're standard C functions?
> >  
> 
> They are most definitely standard functions with precise semanitcs. 
> round() and friends are specified in both SUSv3 (aka POSIX) which
> mirrors IEC-9899 aka C99.  Section 7.12.9.6 defines them as:
> 
>  The round functions round their argument to the nearest 
>  integer value in floating-point format, rounding halfway
>  cases away from zero, regardless of the current rounding
>  direction.
> 
> So there can be no ambiguity here.
> 
> Since MSVCRT does not implment full C99 compliance these functions come
> from -lmingwex (libmingwex.a) which is part of mingw-runtime, hence the
> suggestion by Ross R:
> 
> 
> >> Update the version of the MinGW runtime that
> >> you're using.  Old versions of of the runtime
> >> incorrectly rounded away from zero, instead of
> >> rounding to nearest.
> >  
> 
> Brian
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> MinGW-users mailing list
> MinGW-users at lists.sourceforge.net
> 
> You may change your MinGW Account Options or unsubscribe at:
> https://lists.sourceforge.net/lists/listinfo/mingw-users
> 
> 
> 
> 
> 
> 
> 
> 
> Mateusz Łoskot wrote:
> >Charlie Savage wrote:
> >>
> >>Yes, I build geos with VC++ 8 fairly frequently.  I have a VC 
> >>solution/project I can send you if you'd like.  The one hang-up at 
> >>the moment is that VC++ does not have a round function in math.h, 
> >>which is used in HotPixel::scale for example.
> >
> >Hi Charlie,
> >Yes, I also build GEOS quite often with VC++ 8.0.
> >Latest problem is caused by that round function which is not
> >available in VC++.
> >Besides that VC++ does not support this function, it's not C++
> >standard function. ANSI/ISO C++ does not list [1] it as supported 
> >function from C library. Second, not all features from C are supported 
> >by C++ by default ;-)
> >
> >BTW, here I ask about round on MSDN forums
> >http://forums.microsoft.com/msdn/showpost.aspx?postid=260134
> >
> >[1] Standard for Programming Language C++ (working draft), Apendix C:
> >"7 - The C++ Standard library provides 209 standard functions from the 
> >C library, as shown in Table 102.$"
> >
> >And the Appendinx C does not include round in Table 102. So, it's not 
> >supported by C++.
> >
> >Cheers



> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel


-- 
---------------------------------------------------------------------------
State-collected Geographic Data is public property   
Sign the petition: http://petition.publicgeodata.org        
                                                      




More information about the geos-devel mailing list