Skip to content

Commit

Permalink
* configure.in: Don't check __int128.
Browse files Browse the repository at this point in the history
* 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:https://ci.ruby-lang.org/ruby/trunk@50749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
akr committed Jun 3, 2015
1 parent c3cc282 commit 2f9b789
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
11 changes: 11 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
Wed Jun 3 21:00:47 2015 Tanaka Akira <[email protected]>

* 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 <[email protected]>

* class.c (clone_method): remove redundant check for me->def != NULL.
Expand Down
4 changes: 0 additions & 4 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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.
Expand Down
6 changes: 4 additions & 2 deletions ext/rbconfig/sizeof/depend
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
1 change: 1 addition & 0 deletions ext/rbconfig/sizeof/extconf.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
$srcs = %w[sizes.c]
$distcleanfiles.concat($srcs)
check_sizeof('__int128')
create_makefile('rbconfig/sizeof')
3 changes: 2 additions & 1 deletion template/sizes.c.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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)',
}
Expand Down

0 comments on commit 2f9b789

Please sign in to comment.