diff --git a/CMakeLists.txt b/CMakeLists.txt index b1a26ff3e8..88c9bb6bde 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1218,6 +1218,7 @@ CHECK_TYPE_SIZE("ssize_t" SIZEOF_SSIZE_T) if(SIZEOF_SSIZE_T) set(HAVE_SSIZE_T TRUE) endif(SIZEOF_SSIZE_T) + CHECK_TYPE_SIZE("ptrdiff_t" SIZEOF_PTRDIFF_T) if(SIZEOF_PTRDIFF_T) set(HAVE_PTRDIFF_T TRUE) diff --git a/config.h.cmake.in b/config.h.cmake.in index 00e062f760..cadc16d6fa 100644 --- a/config.h.cmake.in +++ b/config.h.cmake.in @@ -582,6 +582,9 @@ with zip */ /* The size of `size_t', as computed by sizeof. */ #cmakedefine SIZEOF_SIZE_T ${SIZEOF_SIZE_T} +/* The size of `ssize_t', as computed by sizeof. */ +#cmakedefine SIZEOF_SSIZE_T ${SIZEOF_SSIZE_T} + /* The size of `uint', as computed by sizeof. */ #cmakedefine SIZEOF_UINT ${SIZEOF_UINT} diff --git a/include/ncconfigure.h b/include/ncconfigure.h index 2c766c8e00..8c17752d6b 100644 --- a/include/ncconfigure.h +++ b/include/ncconfigure.h @@ -28,9 +28,6 @@ #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef __APPLE__ /* GCC strikes again */ #ifndef uint typedef unsigned int uint;