Win32: Allow some mingw implemeations to use old msvcrt

This commit is contained in:
Nobuyoshi Nakada 2025-11-19 22:51:09 +09:00
parent f3f3a40cdc
commit 7840ef2f43
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
2 changed files with 2 additions and 2 deletions

View File

@ -526,7 +526,6 @@ AS_CASE(["$target_os"],
RT_VER=`echo "$rb_cv_msvcrt" | tr -cd [0-9]`
test "$RT_VER" = "" && RT_VER=60
test "$rb_cv_msvcrt" = "ucrt" && RT_VER=140
AS_IF([test $RT_VER -lt 120], AC_MSG_ERROR(Runtime library $RT_VER is not supported))
AC_DEFINE_UNQUOTED(RUBY_MSVCRT_VERSION, $RT_VER)
sysconfdir=
])

View File

@ -1076,7 +1076,8 @@ NORETURN(static void die(void));
static void
die(void)
{
#if defined(_WIN32)
#if defined(_WIN32) && defined(RUBY_MSVCRT_VERSION) && RUBY_MSVCRT_VERSION >= 80
/* mingw32 declares in stdlib.h but does not provide. */
_set_abort_behavior( 0, _CALL_REPORTFAULT);
#endif