Added windows-specific code to allow for alloca usage.

This commit is contained in:
Ward Fisher 2013-03-19 19:52:32 +00:00
parent 0d37707254
commit 8c4fe8775a
4 changed files with 13 additions and 0 deletions

View File

@ -187,6 +187,7 @@ MACRO(print_conf_summary)
MESSAGE(STATUS "\tBuilding netCDF-4:\t\t" ${ENABLE_NETCDF_4})
MESSAGE(STATUS "\tBuilding DAP Support:\t\t" ${ENABLE_DAP})
MESSAGE(STATUS "\tBuilding Utilities:\t\t" ${BUILD_UTILITIES})
MESSAGE(STATUS "\tHDF5_ROOT_DIR:\t\t:" ${HDF5_ROOT_DIR})
IF(CMAKE_PREFIX_PATH)
MESSAGE(STATUS "\tCMake Prefix Path:\t\t" "${CMAKE_PREFIX_PATH}")
ENDIF()

View File

@ -14,6 +14,10 @@ for more info.
#include <stddef.h> /* size_t, ptrdiff_t */
#include <errno.h> /* netcdf functions sometimes return system errors */
/* Required for alloca on Windows */
#if defined(_WIN32) || defined(_WIN64)
#include <malloc.h>
#endif
#ifdef _WIN64
#include <sys/stat.h>

View File

@ -23,6 +23,9 @@
#endif
#include "nc3dispatch.h"
#if defined(_WIN32) || defined(_WIN64)
#include <malloc.h>
#endif
#undef MIN /* system may define MIN somewhere and complain */
#define MIN(mm,nn) (((mm) < (nn)) ? (mm) : (nn))

View File

@ -6,6 +6,11 @@
#include "config.h"
#if defined(_WIN32) || defined(_WIN64)
#include <malloc.h>
#endif
#ifdef _AIX
#include <netinet/in.h>
#endif