diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | ext/rbconfig/sizeof/depend | 6 | ||||
-rw-r--r-- | ext/rbconfig/sizeof/extconf.rb | 1 | ||||
-rw-r--r-- | template/sizes.c.tmpl | 3 |
5 files changed, 18 insertions, 7 deletions
@@ -1,3 +1,14 @@ +Wed Jun 3 21:00:47 2015 Tanaka Akira <akr@fsij.org> + + * 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 <ko1@atdot.net> * 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 <sys/types.h>]) 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)', } |