summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-08-27 00:12:03 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-08-27 00:12:03 +0900
commit5c98ee02d2ac7f20ab978be7645801adf03e4302 (patch)
treea4feb52465c7a7a95780fa28d238caaca33eaf5a
parenta97dedf761c6931cbb2b9267faad2395481a3f57 (diff)
Define bounds-checking interfaces macro for each file
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/8301
-rw-r--r--configure.ac3
-rw-r--r--util.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 05dd41e79c..8447eba105 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2153,9 +2153,6 @@ AC_CHECK_FUNCS(__sinpi)
AS_IF([test "x$ac_cv_member_struct_statx_stx_btime" = xyes],
[AC_CHECK_FUNCS(statx)])
-AS_CASE(["$ac_cv_func_memset_s:$ac_cv_func_qsort_s"], [*yes*],
- [RUBY_DEFINE_IF([!defined __STDC_WANT_LIB_EXT1__], [__STDC_WANT_LIB_EXT1__], 1)])
-
AS_IF([test "$ac_cv_func_getcwd" = yes], [
AC_CACHE_CHECK(if getcwd allocates buffer if NULL is given, [rb_cv_getcwd_malloc],
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
diff --git a/util.c b/util.c
index 1030c3ecbe..f39e17b8b7 100644
--- a/util.c
+++ b/util.c
@@ -13,6 +13,10 @@
# define MINGW_HAS_SECURE_API 1
#endif
+#ifndef __STDC_WANT_LIB_EXT1__
+#define __STDC_WANT_LIB_EXT1__ 1
+#endif
+
#include "ruby/internal/config.h"
#include <ctype.h>