From f460746a8b6d7625bf6861c1306007888c12e16c Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Mon, 26 Mar 2018 11:53:31 -0600 Subject: [PATCH 1/2] Silenced warning in CMakeLists.txt --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7400faa34..8cfe9625d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ ## This is a CMake file, part of Unidata's netCDF package. -# Copyright 2012-2014, see the COPYRIGHT file for more information. +# Copyright 2012-2018, see the COPYRIGHT file for more information. # ################################## @@ -1284,7 +1284,7 @@ CHECK_TYPE_SIZE("size_t" SIZEOF_SIZE_T) CHECK_TYPE_SIZE("ssize_t" SIZEOF_SSIZE_T) IF(SIZEOF_SSIZE_T) SET(HAVE_SSIZE_T TRUE) -ENDIF(SIZEOF_PTRDIFF_T) +ENDIF(SIZEOF_SSIZE_T) CHECK_TYPE_SIZE("ptrdiff_t" SIZEOF_PTRDIFF_T) IF(SIZEOF_PTRDIFF_T) SET(HAVE_PTRDIFF_T TRUE) From ed6de1be8901d2c85cdf5c6fc9ec46814f86d012 Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Mon, 26 Mar 2018 15:35:48 -0600 Subject: [PATCH 2/2] Fixed an issue where ssize_t was being either incorrectly type-def'd, or double type-def'd --- include/ncconfigure.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/include/ncconfigure.h b/include/ncconfigure.h index 54cb3a803..cfe20b312 100644 --- a/include/ncconfigure.h +++ b/include/ncconfigure.h @@ -26,10 +26,12 @@ defined and missing types defined. extern char* strdup(const char*); #endif +/* #ifndef HAVE_SSIZE_T -#define ssize_t long +typedef long ssize_t; +#define HAVE_SSIZE_T #endif - +*/ /* handle null arguments */ #ifndef nulldup #ifdef HAVE_STRDUP @@ -39,6 +41,13 @@ char *nulldup(const char* s); #endif #endif +#ifdef _MSC_VER +#ifndef HAVE_SSIZE_T +#include +typedef SSIZE_T ssize_t; +#endif +#endif + #ifndef HAVE_STRLCAT #ifdef _MSC_VER /* Windows strlcat_s is equivalent to strlcat, but different arg order */