From: Matthew Fernandez Date: Thu, 8 Sep 2022 00:27:49 +0000 (-0700) Subject: CMake: remove checking and fallback for 'ssize_t' X-Git-Tag: 7.0.3~6^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6b613094f239c4981cce606eca7cb6293c40848;p=graphviz CMake: remove checking and fallback for 'ssize_t' It seems all contemporary supported platforms except Windows have `ssize_t`. Furthermore, `int` is not a suitable fallback for a platform that does not have `ssize_t`. --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a63d78e3..aa7afc989 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Support for the Intel C Compiler in the Autotools build system has been removed. #2298 +* Fallback typedefs for `ssize_t` have been removed from the CMake build system. ### Fixed diff --git a/cmake/config_checks.cmake b/cmake/config_checks.cmake index 337af26d0..8046df3e3 100644 --- a/cmake/config_checks.cmake +++ b/cmake/config_checks.cmake @@ -26,13 +26,6 @@ check_function_exists( setmode HAVE_SETMODE ) check_function_exists( sincos HAVE_SINCOS ) check_function_exists( srand48 HAVE_SRAND48 ) -# Type checks -# The function check_size_type also checks if the type exists -# and sets HAVE_${VARIABLE} accordingly. -include(CheckTypeSize) - -check_type_size( ssize_t SSIZE_T ) - # Library checks set( HAVE_ANN ${ANN_FOUND} ) if(with_expat AND EXPAT_FOUND) diff --git a/config-cmake.h.in b/config-cmake.h.in index 5d17cc5c5..c850d221b 100644 --- a/config-cmake.h.in +++ b/config-cmake.h.in @@ -22,17 +22,10 @@ #cmakedefine HAVE_SINCOS #cmakedefine HAVE_SRAND48 -// Types -#cmakedefine HAVE_SSIZE_T - // Typedefs for missing types -#ifndef HAVE_SSIZE_T #ifdef _MSC_VER #include typedef SSIZE_T ssize_t; -#else -typedef int ssize_t; -#endif #endif // Libraries