aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2017-04-14 09:48:46 +0900
committerKazuki Yamaguchi <k@rhe.jp>2017-09-09 16:32:29 +0900
commit434fd3f01b1d08011dbe8d252bab57265dde53da (patch)
treebc8fc5d718b6b907eaf1b93aa8b6a731d9117a64
parentc0b019908f2aa8d5d55f6341d6f1b519745acce7 (diff)
downloadruby-434fd3f01b1d08011dbe8d252bab57265dde53da.tar.gz
configure.in: don't check whether # operator works
It is part of C89.
-rw-r--r--configure.in21
-rw-r--r--include/ruby/defines.h4
2 files changed, 1 insertions, 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 <stdarg.h>
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