From f63526e89a6abc78fc9f48f4dcd1fae6737d5db1 Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Tue, 2 Apr 2013 21:32:53 +0000 Subject: [PATCH] --- CMakeLists.txt | 1 + config.h.in.cmake | 3 +++ include/ncconfigure.h | 11 +++++++---- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 75f70d9b6..e0e1149f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -643,6 +643,7 @@ CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H) CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H) CHECK_INCLUDE_FILE("pstdint.h" HAVE_PSTDINT_H) CHECK_INCLUDE_FILE("endian.h" HAVE_ENDIAN_H) +CHECK_INCLUDE_FILE("BaseTsd.h" HAVE_BASETSD_H) # Type checks CHECK_TYPE_SIZE("double" SIZEOF_DOUBLE) diff --git a/config.h.in.cmake b/config.h.in.cmake index f323a7aac..25473e5be 100644 --- a/config.h.in.cmake +++ b/config.h.in.cmake @@ -185,6 +185,9 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_MALLOC_H @HAVE_MALLOC_H@ +/* Define to 1 if you have the BaseTsd.h header file. */ +#cmakedefine HAVE_BASETSD_H @HAVE_BASETSD_H@ + /* The size of `double` as computed by sizeof. */ #cmakedefine SIZEOF_DOUBLE @SIZEOF_DOUBLE@ /* The size of `float` as computed by sizeof. */ diff --git a/include/ncconfigure.h b/include/ncconfigure.h index f5a3ce31a..48f586865 100644 --- a/include/ncconfigure.h +++ b/include/ncconfigure.h @@ -22,12 +22,15 @@ defined. extern char* strdup(const char*); #endif - -#ifndef SIZEOF_SSIZE_T -#undef ssize_t -#define ssize_t int +#if HAVE_BASETSD_H +#include #endif +//#ifndef SIZEOF_SSIZE_T +//#undef ssize_t +//#define ssize_t int +//#endif + /* handle null arguments */