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.
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
@@ -26,9 +26,6 @@
|
||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||
#cmakedefine off_t long
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#cmakedefine pid_t int
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
#cmakedefine size_t unsigned
|
||||
|
||||
|
11
configure
vendored
11
configure
vendored
@@ -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 :
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -26,9 +26,6 @@
|
||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||
#undef off_t
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef pid_t
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
#undef size_t
|
||||
|
||||
|
@@ -45,9 +45,6 @@
|
||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||
#undef off_t
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef pid_t
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
#undef size_t
|
||||
|
||||
|
Reference in New Issue
Block a user