[geos-devel] Portability
Martin Davis
mbdavis at VividSolutions.com
Fri Aug 30 15:43:12 EDT 2002
Actually, the original max/__max discrepancy arose due to incompatibilities between VC++6 and VC++7 ! For some reason VC++6 didn't recognize the STL max, only the function __max. I'm sure the incompatibilities between MSVC and GCC will be even worse.
We've already implemented a similar idea to Norman's, via the platform.h file (although compiler.h might be a better name). I like his clever template functions for min and max. Hopefully there won't be too many more of these, though, or we'll be reinventing a lot of wheels.
Yury, do you think the STLPort idea might be a better way of handling this?
Martin Davis, Senior Technical Specialist
Vivid Solutions Inc.
Suite #1A-2328 Government Street Victoria, B.C. V8T 5G5
Phone: (250) 385 6040 Fax: (250) 385 6046
EMail: mbdavis at vividsolutions.com Web: www.vividsolutions.com
> -----Original Message-----
> From: Paul Ramsey [mailto:pramsey at refractions.net]
> Sent: Friday, August 30, 2002 12:10 PM
> To: geos-devel at geos.refractions.net
> Subject: [geos-devel] Portability
>
>
> So, working through the compilation bit by bit, some problems
> seem to be:
>
> - occasionally stdio.h is not declared where it is needed (maybe VC++
> papers over this automatically)
> - the compiler cannot find declarations for __min() and __max(),
> although it *can* find declarations for min() and max(). What is the
> difference between them? In GeometryCollection.cpp line 55,
> __max() is
> used while an almost identical function just above it uses max().
>
> P.
>
> --
> __
> /
> | Paul Ramsey
> | Refractions Research
> | Email: pramsey at refractions.net
> | Phone: (250) 885-0632
> \_
>
>
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel
>
More information about the geos-devel
mailing list