Changeset 13385

Show
Ignore:
Timestamp:
12/19/07 00:21:20 (7 months ago)
Author:
mloskot
Message:

Fixed CPLIsNan definitions for Visual C++.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/port/cpl_port.h

    r12841 r13385  
    287287/* -------------------------------------------------------------------- */ 
    288288/*      Handle isnan() and isinf().  Note that isinf() and isnan()      */ 
    289 /*      are supposed to be macros according to C99.  Some systems       */ 
    290 /*      (ie. Tru64) don't have isinf() at all, so if the macro is       */ 
    291 /*      not defined we just assume nothing is infinite.  This may       */ 
    292 /*      mean we have no real CPLIsInf() on systems with an isinf()      */ 
     289/*      are supposed to be macros according to C99, defined in math.h   */ 
     290/*      Some systems (ie. Tru64) don't have isinf() at all, so if       */ 
     291/*      the macro is not defined we just assume nothing is infinite.    */ 
     292/*      This may mean we have no real CPLIsInf() on systems with isinf()*/ 
    293293/*      function but no corresponding macro, but I can live with        */ 
    294294/*      that since it isn't that important a test.                      */ 
    295295/* -------------------------------------------------------------------- */ 
    296296#ifdef _MSC_VER 
     297#  include <float.h> 
    297298#  define CPLIsNan(x) _isnan(x) 
    298299#  define CPLIsInf(x) (!_isnan(x) && !_finite(x))