This commit is contained in:
Ward Fisher 2012-09-11 19:53:47 +00:00
parent 53843f134e
commit d6c7112481
7 changed files with 32 additions and 5 deletions

View File

@ -400,6 +400,8 @@ CHECK_FUNCTION_EXISTS(getpagesize HAVE_GETPAGESIZE)
CHECK_FUNCTION_EXISTS(sysconf HAVE_SYSCONF)
CHECK_FUNCTION_EXISTS(mremap HAVE_MREMAP)
CHECK_FUNCTION_EXISTS(getrlimit HAVE_GETRLIMIT)
CHECK_FUNCTION_EXISTS(isnan HAVE_DECL_ISNAN)
CHECK_FUNCTION_EXISTS(isinf HAVE_DECL_ISINF)
#CHECK_SYMBOL_EXISTS(RLIM_INFINITY "resource.h" HAVE_RLIM_INFINITY)
#INCLUDE_DIRECTORIES(${RESOURCE_H_PATH})
@ -472,12 +474,13 @@ MESSAGE(STATUS "Linking with: ${ALL_TLL_LIBS}")
# Enable Utilities.
IF (BUILD_UTILITIES)
INCLUDE_DIRECTORIES(ncdump)
ADD_SUBDIRECTORY(ncgen)
ADD_SUBDIRECTORY(ncgen3)
ADD_SUBDIRECTORY(ncdump)
ENDIF()
# Enable tests.
# Enable tests
IF(ENABLE_TESTS)
ADD_SUBDIRECTORY(nctest)
ADD_SUBDIRECTORY(nc_test)

View File

@ -204,6 +204,8 @@
#cmakedefine HAVE_GETPAGESIZE
#cmakedefine HAVE_SYSCONF
#cmakedefine HAVE_MREMAP
#cmakedefine HAVE_DECL_ISINF
#cmakedefine HAVE_DECL_ISNAN
/* Some linux systems have getrlimit, but
no definition of RLIM_INFINITY */

View File

@ -21,6 +21,12 @@
#include "utils.h"
#include "dimmap.h"
#ifdef _MSC_VER
#include "XGetopt.h"
#define snprintf _snprintf
int opterr;
#endif
/* default bytes of memory we are willing to allocate for variable
* values during copy */
#define COPY_BUFFER_SIZE (5000000)

View File

@ -7,6 +7,7 @@
#include "includes.h"
#include "bytebuffer.h"
#include "isnan.h"
#include <math.h>
static char stmp[256];

View File

@ -11,6 +11,12 @@
#include <getopt.h>
#endif
#ifdef _MSC_VER
#include "XGetopt.h"
#define snprintf _snprintf
int opterr;
#endif
/* Default is netcdf-3 mode 1 */
#define DFALTCMODE 0

View File

@ -6,6 +6,9 @@
* $Header: /upc/share/CVS/netcdf-3/ncgen/ncgen.h,v 1.18 2010/06/01 15:34:53 ed Exp $
*********************************************************************/
#ifdef _MSC_VER
#include <float.h>
#endif
#ifdef USE_NETCDF4
#define CLASSICONLY 0
@ -40,14 +43,19 @@
/* Must be a better way to do this */
#ifndef INFINITE
#define NANF (0.0f/0.0f)
#ifdef _MSC_VER
#define INFINITE (DBL_MAX+DBL_MAX)
#define NAN (INFINITE-INFINITE)
#define NANF NAN
#else
#define INFINITE (1.0/0.0)
#define NAN (0.0/0.0)
#define NANF (0.0f/0.0f)
#endif
#define INFINITEF (1.0f/0.0f)
#define NEGINFINITEF (-INFINITEF)
#define INFINITE (1.0/0.0)
#define NEGINFINITE (-INFINITEF)
#endif
/* nc_class is one of:
NC_GRP NC_DIM NC_VAR NC_ATT NC_TYPE
*/

View File

@ -1335,9 +1335,10 @@ ID ([A-Za-z_]|{UTF8})([A-Z.@#\[\]a-z_0-9+-]|{UTF8})*
* down here because we want the user's section 1 to have been scanned first.
* The user has a chance to override it with an option.
*/
#ifndef _MSC_VER
#include <unistd.h>
#endif
#endif
#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif