aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-12 16:01:10 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-12 17:02:42 +0900
commit21c5726418136d6efa98cbf205860a8bee328907 (patch)
tree9a3e16b98842197e57864b1950d79c93d23348ea /configure.ac
parente53c0bc906c514ca6f0d40e2140dee1e23b4591e (diff)
downloadruby-21c5726418136d6efa98cbf205860a8bee328907.tar.gz
Omit checks for C89 standard or later
Now we require C99, these features available of course. * prototypes * stdarg prototypes * token pasting * stringization * string literal concatenation
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac72
1 files changed, 0 insertions, 72 deletions
diff --git a/configure.ac b/configure.ac
index 1ab36e8d0f..65494b4917 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1376,78 +1376,6 @@ RUBY_REPLACE_TYPE(clockid_t, [], CLOCKID, [@%:@ifdef HAVE_TIME_H
@%:@ include <sys/time.h>
@%:@endif])
-AC_CACHE_CHECK(for prototypes, rb_cv_have_prototypes,
- [AC_TRY_COMPILE([int foo(int x) { return 0; }], [return foo(10);],
- rb_cv_have_prototypes=yes,
- rb_cv_have_prototypes=no)])
-AS_IF([test "$rb_cv_have_prototypes" = yes], [
- AC_DEFINE(HAVE_PROTOTYPES)
-])
-
-AC_CACHE_CHECK(token paste string, rb_cv_tokenpaste,
- [AC_TRY_COMPILE([@%:@define paste(a,b) a@%:@@%:@b],
- [int xy = 1; return paste(x,y);],
- rb_cv_tokenpaste=ansi,
- rb_cv_tokenpaste=knr)])
-AS_IF([test "$rb_cv_tokenpaste" = ansi], [
- AC_DEFINE(TOKEN_PASTE(x,y),[x@%:@@%:@y])
-], [
- AC_DEFINE(TOKEN_PASTE(x,y),[x/**/y])
-])
-
-AC_CACHE_CHECK(stringization, rb_cv_stringization, [
- rb_cv_stringization=no
- for string in "#expr" '"expr"'; do
- AC_COMPILE_IFELSE([
- AC_LANG_BOOL_COMPILE_TRY([
-#define STRINGIZE0(expr) $string
-#define STRINGIZE(expr) STRINGIZE0(expr)
-#undef real_test_for_stringization
-#define test_for_stringization -.real_test_for_stringization.-
-const char stringized[[]] = STRINGIZE(test_for_stringization);
-], [sizeof(stringized) == 32])],
- [rb_cv_stringization="$string"; break],
- [rb_cv_stringization=no])
- done]
-)
-AC_DEFINE(STRINGIZE(expr),STRINGIZE0(expr))
-AS_IF([test x"$rb_cv_stringization" != xno -a "$rb_cv_stringization" != "#expr"], [
- AC_DEFINE_UNQUOTED(STRINGIZE0(expr),$rb_cv_stringization)
- AC_DEFINE(OLD_FASHIONED_STRINGIZATION,1)
-])
-
-AC_CACHE_CHECK([string literal concatenation],
- rb_cv_string_literal_concatenation, [
- AC_COMPILE_IFELSE([
- AC_LANG_BOOL_COMPILE_TRY([
-const char concatenated_literal[[]] = "literals" "to"
- "be" "concatenated.";
-], [sizeof(concatenated_literal) == 26])],
- [rb_cv_string_literal_concatenation=yes],
- [rb_cv_string_literal_concatenation=no])]
-)
-AS_IF([test "$rb_cv_string_literal_concatenation" = no], [
- AC_MSG_ERROR([No string literal concatenation])
-])
-
-AC_CACHE_CHECK(for variable length prototypes and stdarg.h, rb_cv_stdarg,
- [AC_TRY_COMPILE([
-#include <stdarg.h>
-int foo(int x, ...) {
- va_list va;
- va_start(va, x);
- va_arg(va, int);
- va_arg(va, char *);
- va_arg(va, double);
- return 0;
-}
-], [return foo(10, "", 3.14);],
- rb_cv_stdarg=yes,
- rb_cv_stdarg=no)])
-AS_IF([test "$rb_cv_stdarg" = yes], [
- AC_DEFINE(HAVE_STDARG_PROTOTYPES)
-])
-
# __VA_ARGS__ is also tested in AC_PROG_CC_C99 since autoconf 2.60a (around
# 2006). The check below is redundant and should always success. Remain not
# deleted for backward compat.