Merge branch 'mem2' of https://github.com/Unidata/netcdf-c into mem2

This commit is contained in:
Ward Fisher 2015-06-01 15:43:49 -06:00
commit 45bf3ee259
3 changed files with 22 additions and 2 deletions

View File

@ -356,6 +356,7 @@ extern const char* NCDAP_urllookup(void* dapurl, const char* param);
# define MSC_NCDISPATCH_EXTRA __declspec(dllimport)
# endif
MSC_NCDISPATCH_EXTRA extern char* NC_findtestserver(const char*, const char**);
MSC_NCDISPATCH_EXTRA extern int nc_open_mem(const char*, int, size_t, void*, int*);
#else
extern char* NC_findtestserver(const char*,const char**);
#endif

View File

@ -13,6 +13,20 @@
extern "C" {
#endif
/* Declaration modifiers for DLL support (MSC et al) */
#if defined(DLL_NETCDF) /* define when library is a DLL */
# if defined(DLL_EXPORT) /* define when building the library */
# define MSC_EXTRA __declspec(dllexport)
# else
# define MSC_EXTRA __declspec(dllimport)
# endif
#include <io.h>
#else
#define MSC_EXTRA
#endif /* defined(DLL_NETCDF) */
# define EXTERNL MSC_EXTRA extern
/**
Open a netCDF file with the contents taken from a block of memory.
@ -58,7 +72,7 @@ status = nc_open_mem("foo.nc", 0, size, memory, &ncid);
if (status != NC_NOERR) handle_error(status);
@endcode
*/
extern int
EXTERNL int
nc_open_mem(const char* path, int mode, size_t size, void* memory, int* ncidp);
#if defined(__cplusplus)

View File

@ -25,6 +25,10 @@ int opterr;
int optind;
#endif
#ifndef HAVE_SSIZE_T
typedef int ssize_t;
#endif
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
@ -34,6 +38,7 @@ int optind;
#include <locale.h>
#endif /* HAVE_LOCALE_H */
#include <netcdf.h>
#include <netcdf_mem.h>
#include "utils.h"
#include "nccomps.h"
#include "nctime0.h" /* new iso time and calendar stuff */
@ -43,7 +48,7 @@ int optind;
#include "indent.h"
#include "isnan.h"
#include "cdl.h"
#include "netcdf_mem.h"
#define int64_t long long
#define uint64_t unsigned long long