From 434fd3f01b1d08011dbe8d252bab57265dde53da Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Fri, 14 Apr 2017 09:48:46 +0900 Subject: configure.in: don't check whether # operator works It is part of C89. --- configure.in | 21 --------------------- include/ruby/defines.h | 4 +--- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/configure.in b/configure.in index 8e4de82417..a74460292b 100644 --- a/configure.in +++ b/configure.in @@ -1780,27 +1780,6 @@ AS_IF([test "$rb_cv_tokenpaste" = ansi], [ 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(for variable length prototypes and stdarg.h, rb_cv_stdarg, [AC_TRY_COMPILE([ #include diff --git a/include/ruby/defines.h b/include/ruby/defines.h index 8474179515..250b7b7ce2 100644 --- a/include/ruby/defines.h +++ b/include/ruby/defines.h @@ -197,10 +197,8 @@ void *xrealloc(void*,size_t) RUBY_ATTR_ALLOC_SIZE((2)); void *xrealloc2(void*,size_t,size_t) RUBY_ATTR_ALLOC_SIZE((2,3)); void xfree(void*); -#define STRINGIZE(expr) STRINGIZE0(expr) -#ifndef STRINGIZE0 #define STRINGIZE0(expr) #expr -#endif +#define STRINGIZE(expr) STRINGIZE0(expr) #ifdef HAVE_LONG_LONG # define HAVE_TRUE_LONG_LONG 1 -- cgit v1.2.3