From 2f9b7898f6fa4716d61eb8bff03cc645749e9838 Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 3 Jun 2015 12:00:50 +0000 Subject: [PATCH] * configure.in: Don't check __int128. * ext/rbconfig/sizeof/extconf.rb: Check __int128. * ext/rbconfig/sizeof/depend: sizes.c depends on ext/rbconfig/sizeof/extconf.rb. * template/sizes.c.tmpl: Detect check_sizeof. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 11 +++++++++++ configure.in | 4 ---- ext/rbconfig/sizeof/depend | 6 ++++-- ext/rbconfig/sizeof/extconf.rb | 1 + template/sizes.c.tmpl | 3 ++- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 009aa1d678..b35f901a88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Wed Jun 3 21:00:47 2015 Tanaka Akira + + * configure.in: Don't check __int128. + + * ext/rbconfig/sizeof/extconf.rb: Check __int128. + + * ext/rbconfig/sizeof/depend: sizes.c depends on + ext/rbconfig/sizeof/extconf.rb. + + * template/sizes.c.tmpl: Detect check_sizeof. + Wed Jun 3 20:07:07 2015 Koichi Sasada * class.c (clone_method): remove redundant check for me->def != NULL. diff --git a/configure.in b/configure.in index c66590d469..5c62676c38 100644 --- a/configure.in +++ b/configure.in @@ -1379,7 +1379,6 @@ RUBY_CHECK_SIZEOF(short) RUBY_CHECK_SIZEOF(long, [int], [ILP LP]) RUBY_CHECK_SIZEOF(long long) RUBY_CHECK_SIZEOF(__int64) -RUBY_CHECK_SIZEOF(__int128) RUBY_CHECK_SIZEOF(off_t) RUBY_CHECK_SIZEOF(void*, [int long "long long"], [ILP LP LLP]) RUBY_CHECK_SIZEOF(float) @@ -1867,7 +1866,6 @@ typedef $1 t; int s = sizeof(t) == 42;])], ["$ac_cv_sizeof_long"], [ rb_cv_type_$1="m4_if([$3], [], [], [$3 ])long"], ["$ac_cv_sizeof_long_long"], [ rb_cv_type_$1="m4_if([$3], [], [], [$3 ])long long"], ["$ac_cv_sizeof___int64"], [ rb_cv_type_$1="m4_if([$3], [], [], [$3 ])__int64"], - ["$ac_cv_sizeof___int128"], [ rb_cv_type_$1="m4_if([$3], [], [], [$3 ])__int128"], [ rb_cv_type_$1=no])])]) if test "${rb_cv_type_$1}" != no; then AC_DEFINE([HAVE_]AS_TR_CPP($1), 1) @@ -1889,8 +1887,6 @@ RUBY_DEFINT(int32_t, 4) RUBY_DEFINT(uint32_t, 4, unsigned) RUBY_DEFINT(int64_t, 8) RUBY_DEFINT(uint64_t, 8, unsigned) -RUBY_DEFINT(int128_t, 16) -RUBY_DEFINT(uint128_t, 16, unsigned) RUBY_DEFINT(intptr_t, void*) RUBY_DEFINT(uintptr_t, void*, unsigned) RUBY_DEFINT(ssize_t, size_t, [], [@%:@include ]) dnl may differ from int, so not use AC_TYPE_SSIZE_T. diff --git a/ext/rbconfig/sizeof/depend b/ext/rbconfig/sizeof/depend index 1bcaa9c6f4..56564b1b99 100644 --- a/ext/rbconfig/sizeof/depend +++ b/ext/rbconfig/sizeof/depend @@ -1,6 +1,8 @@ -sizes.c: $(top_srcdir)/tool/generic_erb.rb $(top_srcdir)/template/sizes.c.tmpl $(top_srcdir)/configure.in +sizes.c: $(top_srcdir)/tool/generic_erb.rb $(top_srcdir)/template/sizes.c.tmpl $(top_srcdir)/configure.in $(top_srcdir)/ext/rbconfig/sizeof/extconf.rb $(Q) $(RUBY) $(top_srcdir)/tool/generic_erb.rb --output=$@ \ - $(top_srcdir)/template/sizes.c.tmpl $(top_srcdir)/configure.in + $(top_srcdir)/template/sizes.c.tmpl \ + $(top_srcdir)/configure.in \ + $(top_srcdir)/ext/rbconfig/sizeof/extconf.rb # AUTOGENERATED DEPENDENCIES START sizes.o: $(RUBY_EXTCONF_H) diff --git a/ext/rbconfig/sizeof/extconf.rb b/ext/rbconfig/sizeof/extconf.rb index ac66b6ac26..f4379b0bd5 100644 --- a/ext/rbconfig/sizeof/extconf.rb +++ b/ext/rbconfig/sizeof/extconf.rb @@ -1,3 +1,4 @@ $srcs = %w[sizes.c] $distcleanfiles.concat($srcs) +check_sizeof('__int128') create_makefile('rbconfig/sizeof') diff --git a/template/sizes.c.tmpl b/template/sizes.c.tmpl index ac9964dd5b..045e69ee71 100644 --- a/template/sizes.c.tmpl +++ b/template/sizes.c.tmpl @@ -6,7 +6,8 @@ class String strip.upcase.tr_s("^A-Z0-9_*", "_").tr_s("*", "P") end end -types = ARGF.grep(/^\s*RUBY_CHECK_SIZEOF\((\w[^\[\],#]*)[^#]*\)/) {$1} +types = ARGF.grep(/^\s*RUBY_CHECK_SIZEOF\((\w[^\[\],#]*)[^#]*\)| + ^\s*check_sizeof\('(\w+)'/x) {$+} conditions = { "long long" => 'defined(HAVE_TRUE_LONG_LONG)', }