From 244389699ed7f7c3429967db56eaa60d82fa35de Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 28 Jul 2021 14:00:37 +0200 Subject: [PATCH] Drop checks for pid_t from autoconf and CMake This type should always be defined in sys/types.h on any non-ancient Unix system, so don't bother checking for it, which is not only wasteful but can even be harmful because it can conflict with pid_t definitions in the other libraries under Windows, where we (wrongly) define it as int (which is actually a bug in autoconf, which was recently fixed, see https://savannah.gnu.org/support/index.php?110296) when using CMake. So just don't define it at all: it should be already defined under Unix and we don't use it under MSW anyhow. See https://github.com/microsoft/vcpkg/issues/19110 See #18150. --- build/cmake/setup.cmake | 2 +- build/cmake/setup.h.in | 3 --- configure | 11 ----------- configure.in | 2 -- setup.h.in | 3 --- setup.h_vms | 3 --- 6 files changed, 1 insertion(+), 23 deletions(-) diff --git a/build/cmake/setup.cmake b/build/cmake/setup.cmake index 45097e02d9..5c41065187 100644 --- a/build/cmake/setup.cmake +++ b/build/cmake/setup.cmake @@ -648,7 +648,7 @@ endif() # Check size and availability of various types set(SYSTYPES - pid_t size_t + size_t wchar_t int long short gid_t uid_t ) diff --git a/build/cmake/setup.h.in b/build/cmake/setup.h.in index b400d2eda9..bf6037b0cb 100644 --- a/build/cmake/setup.h.in +++ b/build/cmake/setup.h.in @@ -26,9 +26,6 @@ /* Define to `long' if doesn't define. */ #cmakedefine off_t long -/* Define to `int' if doesn't define. */ -#cmakedefine pid_t int - /* Define to `unsigned' if doesn't define. */ #cmakedefine size_t unsigned diff --git a/configure b/configure index 107a4e5fd1..26f5bf4f5f 100755 --- a/configure +++ b/configure @@ -29757,17 +29757,6 @@ _ACEOF fi -ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF - -fi - ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : diff --git a/configure.in b/configure.in index 57a7ba4610..e28342bafb 100644 --- a/configure.in +++ b/configure.in @@ -4088,8 +4088,6 @@ dnl defines mode_t if not already defined AC_TYPE_MODE_T dnl defines off_t if not already defined AC_TYPE_OFF_T -dnl defines pid_t if not already defined -AC_TYPE_PID_T dnl defines size_t if not already defined AC_TYPE_SIZE_T diff --git a/setup.h.in b/setup.h.in index 9ca552a4ce..53768487bb 100644 --- a/setup.h.in +++ b/setup.h.in @@ -26,9 +26,6 @@ /* Define to `long' if doesn't define. */ #undef off_t -/* Define to `int' if doesn't define. */ -#undef pid_t - /* Define to `unsigned' if doesn't define. */ #undef size_t diff --git a/setup.h_vms b/setup.h_vms index 261a3ea2c6..c9ebf676ff 100644 --- a/setup.h_vms +++ b/setup.h_vms @@ -45,9 +45,6 @@ /* Define to `long' if doesn't define. */ #undef off_t -/* Define to `int' if doesn't define. */ -#undef pid_t - /* Define to `unsigned' if doesn't define. */ #undef size_t