Changeset 12066

Show
Ignore:
Timestamp:
09/04/07 12:41:28 (10 months ago)
Author:
retsios
Message:

Solve the "Failed to initialize PROJ.4" error message that gdalinfo reports on a GRIB dataset, when GDAL is compiled with Visual Studio .NET. The error message was traced back to unwanted "rounding" in the "pow" function.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • spike/grib/degrib18/degrib/degrib1.cpp

    r12065 r12066  
    2525#include "metaname.h" 
    2626#include "clock.h" 
     27 
     28#define pow(a,b) pow((double)(a),b) // prevent Visual Studio 7 from using int pow(int,int) 
    2729 
    2830/* default missing data value (see: bitmap GRIB1: sect3 and sect4) */ 
  • spike/grib/degrib18/degrib/engribapi.c

    r10749 r12066  
    2424#include "memwatch.h" 
    2525#endif 
     26 
     27#define pow(a,b) pow((double)(a),b) // prevent Visual Studio 7 from using int pow(int,int) 
    2628 
    2729#define GRIB2MISSING_1 (int) (0xff) 
  • spike/grib/degrib18/degrib/grib2api.c

    r10749 r12066  
    2323#include "myassert.h" 
    2424//#include "config.h" /*config.h created by configure - ADT mod*/ 
     25 
     26#define pow(a,b) pow((double)(a),b) // prevent Visual Studio 7 from using int pow(int,int) 
    2527 
    2628/* Declare the external FORTRAN routine 
  • spike/grib/degrib18/degrib/inventory.cpp

    r10749 r12066  
    3333 
    3434#define SECT0LEN_BYTE 16 
     35 
     36#define pow(a,b) pow((double)(a),b) // prevent Visual Studio 7 from using int pow(int,int) 
    3537 
    3638typedef union { 
  • spike/grib/degrib18/degrib/metaparse.cpp

    r12065 r12066  
    2828#include "memendian.h" 
    2929#include "myutil.h" 
     30 
     31#define pow(a,b) pow((double)(a),b) // prevent Visual Studio 7 from using int pow(int,int) 
    3032 
    3133/***************************************************************************** 
  • spike/grib/degrib18/degrib/tdlpack.cpp

    r10749 r12066  
    1414#include "memwatch.h" 
    1515#endif 
     16 
     17#define pow(a,b) pow((double)(a),b) // prevent Visual Studio 7 from using int pow(int,int) 
    1618 
    1719#define GRIB_UNSIGN_INT3(a,b,c) ((a<<16)+(b<<8)+c)