Additional 64-bit windows compatibilities.

This commit is contained in:
Ward Fisher 2012-12-04 23:06:31 +00:00
parent e66b07f9a5
commit 5c000a325e
4 changed files with 15 additions and 11 deletions

View File

@ -1,10 +1,13 @@
#ifndef CONFIG_H
#define CONFIG_H
#define HAVE_CONFIG_H
/* Eliminate a number of warnings which come up based on deprecated
POSIX naming conventions. */
#ifdef _MSC_VER
/* Disable a few warnings under Visual Studio, for the
time being. */
#include <io.h>
#include <io.h>
#pragma warning( disable: 4018 4996 4244 4305 )
#define unlink _unlink
#define open _open
@ -23,15 +26,15 @@
#define write _write
#define snprintf _snprintf
#ifndef strcasecmp
//#define strcasecmp stricmp
#define strcasecmp _stricmp
#define snprintf _snprintf
#endif
#define strtoll _strtoi64
#endif
#ifndef CONFIG_H
#define CONFIG_H
#define HAVE_CONFIG_H
/* Cache Size, other variables for HDF5 */
#define DEFAULT_CHUNK_SIZE ${DEFAULT_CHUNK_SIZE}
#define DEFAULT_CHUNKS_IN_CACHE ${DEFAULT_CHUNKS_IN_CACHE}

View File

@ -14,6 +14,11 @@ for more info.
#include <stddef.h> /* size_t, ptrdiff_t */
#include <errno.h> /* netcdf functions sometimes return system errors */
#ifdef _WIN64
#include <sys/stat.h>
#endif
/*! The nc_type type is just an int. */
typedef int nc_type;

View File

@ -8,8 +8,8 @@
#include "dcetab.h"
#ifdef WIN32
#define strcasecmp stricmp
#define snprintf _snprintf
#endif
/* For consistency with Java parser */

View File

@ -7,10 +7,6 @@
#include "ocinternal.h"
#include "ocdebug.h"
#ifdef WIN32
#define strcasecmp stricmp
#define snprintf _snprintf
#endif
/* For consistency with Java parser */
#define null NULL